[bpython] Add patch to fix import crash (bz #823662)

terjeros terjeros at fedoraproject.org
Wed Mar 6 19:28:00 UTC 2013


commit 10fb45acead8314718ea3608e065d007ed3dec11
Author: Terje Røsten <terje.rosten at ntnu.no>
Date:   Wed Mar 6 20:27:56 2013 +0100

    Add patch to fix import crash (bz #823662)

 bpython-0.12-imp.patch |   23 +++++++++++++++++++++++
 bpython.spec           |    7 ++++++-
 2 files changed, 29 insertions(+), 1 deletions(-)
---
diff --git a/bpython-0.12-imp.patch b/bpython-0.12-imp.patch
new file mode 100644
index 0000000..f0ec86a
--- /dev/null
+++ b/bpython-0.12-imp.patch
@@ -0,0 +1,23 @@
+#
+# https://bitbucket.org/bobf/bpython/commits/c921fc4081bab577ea9cb8591da2a122bbda9464/raw/
+#
+# HG changeset patch
+# User Andreas Stuehrk <andreas at bpython-interpreter.org>
+# Date 1362260102 -3600
+# Branch 0.12-bugfix
+# Node ID c921fc4081bab577ea9cb8591da2a122bbda9464
+# Parent  1fe02b22a071ebcaebeea1b54bec9b749a4bef2a
+Ignore IOError raised by ``imp.find_module``. Fixes #237.
+
+diff -r 1fe02b22a071ebcaebeea1b54bec9b749a4bef2a -r c921fc4081bab577ea9cb8591da2a122bbda9464 bpython/importcompletion.py
+--- a/bpython/importcompletion.py	Sun Jan 27 16:15:02 2013 +0100
++++ b/bpython/importcompletion.py	Sat Mar 02 22:35:02 2013 +0100
+@@ -134,7 +134,7 @@
+             with catch_warnings():
+                 warnings.simplefilter("ignore", ImportWarning)
+                 fo, pathname, _ = imp.find_module(name, [path])
+-        except (ImportError, SyntaxError):
++        except (ImportError, IOError, SyntaxError):
+             continue
+         except UnicodeEncodeError:
+             # Happens with Python 3 when there is a filename in some
diff --git a/bpython.spec b/bpython.spec
index 87ef972..846ad0f 100644
--- a/bpython.spec
+++ b/bpython.spec
@@ -3,7 +3,7 @@
 Name:          bpython
 Summary:       Fancy curses interface to the Python interactive interpreter
 Version:       0.12
-Release:       1%{?dist}
+Release:       2%{?dist}
 URL:           http://www.bpython-interpreter.org/
 Group:         Development/Libraries
 License:       MIT
@@ -11,6 +11,7 @@ Source0:       http://www.bpython-interpreter.org/releases/bpython-%{version}.ta
 # some gimp resize of http://bpython-interpreter.org/static/img/bpython-logo.png
 Source1:       bpython.png
 Patch0:        bpython-0.9.7.1-desktop.patch
+Patch1:        bpython-0.12-imp.patch
 BuildArch:     noarch
 BuildRequires: python-devel
 BuildRequires: python-setuptools
@@ -65,6 +66,7 @@ This is the Python 3 build of bpython
 %prep
 %setup -q
 %patch0 -p1
+%patch1 -p1
 %if 0%{?with_python3}
 rm -rf %{py3dir}
 cp -a . %{py3dir}
@@ -134,6 +136,9 @@ desktop-file-install --delete-original         \
 %endif # with_python3
 
 %changelog
+* Wed Mar 06 2013 Terje Rosten <terje.rosten at ntnu.no> - 0.12-2
+- Add patch to fix import crash (bz #823662)
+
 * Wed Jan 30 2013 Terje Rosten <terje.rosten at ntnu.no> - 0.12-1
 - 0.12
 


More information about the scm-commits mailing list