[Python-apps-commits] r13204 - in packages/pyflakes/trunk/debian (6 files)

barry at users.alioth.debian.org barry at users.alioth.debian.org
Wed May 11 21:34:27 UTC 2016


    Date: Wednesday, May 11, 2016 @ 21:34:25
  Author: barry
Revision: 13204

* d/patches/relative-import.patch: Fix for crash on relative imports.
  (Closes: #824072)
* d/tests/relative-import.sh: New test for testing upstream regression.

Added:
  packages/pyflakes/trunk/debian/patches/
  packages/pyflakes/trunk/debian/patches/relative-import.patch
  packages/pyflakes/trunk/debian/patches/series
  packages/pyflakes/trunk/debian/tests/relative-import.sh
Modified:
  packages/pyflakes/trunk/debian/changelog
  packages/pyflakes/trunk/debian/tests/control

Modified: packages/pyflakes/trunk/debian/changelog
===================================================================
--- packages/pyflakes/trunk/debian/changelog	2016-05-11 15:26:11 UTC (rev 13203)
+++ packages/pyflakes/trunk/debian/changelog	2016-05-11 21:34:25 UTC (rev 13204)
@@ -1,3 +1,11 @@
+pyflakes (1.2.2-2) UNRELEASED; urgency=medium
+
+  * d/patches/relative-import.patch: Fix for crash on relative imports.
+    (Closes: #824072)
+  * d/tests/relative-import.sh: New test for testing upstream regression.
+
+ -- Barry Warsaw <barry at debian.org>  Wed, 11 May 2016 17:12:12 -0400
+
 pyflakes (1.2.2-1) unstable; urgency=medium
 
   * New upstream release.

Added: packages/pyflakes/trunk/debian/patches/relative-import.patch
===================================================================
--- packages/pyflakes/trunk/debian/patches/relative-import.patch	                        (rev 0)
+++ packages/pyflakes/trunk/debian/patches/relative-import.patch	2016-05-11 21:34:25 UTC (rev 13204)
@@ -0,0 +1,18 @@
+Description: Relative imports of the form "from . import foo" crash PyFlakes
+ 1.2.2 with a TypeError trying to append a string to None.
+Origin: https://bugs.launchpad.net/debian/+source/pyflakes/+bug/1560134/comments/14
+Bug-Debian: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=824072
+Bug-Ubuntu: https://bugs.launchpad.net/debian/+source/pyflakes/+bug/1560134
+Forwarded: No
+
+--- a/pyflakes/checker.py
++++ b/pyflakes/checker.py
+@@ -209,7 +209,7 @@
+     def __init__(self, name, source, module, real_name=None):
+         self.module = module
+         self.real_name = real_name or name
+-        full_name = module + '.' + self.real_name
++        full_name = (module or '') + '.' + self.real_name
+         super(ImportationFrom, self).__init__(name, source, full_name)
+ 
+     def __str__(self):

Added: packages/pyflakes/trunk/debian/patches/series
===================================================================
--- packages/pyflakes/trunk/debian/patches/series	                        (rev 0)
+++ packages/pyflakes/trunk/debian/patches/series	2016-05-11 21:34:25 UTC (rev 13204)
@@ -0,0 +1 @@
+relative-import.patch

Modified: packages/pyflakes/trunk/debian/tests/control
===================================================================
--- packages/pyflakes/trunk/debian/tests/control	2016-05-11 15:26:11 UTC (rev 13203)
+++ packages/pyflakes/trunk/debian/tests/control	2016-05-11 21:34:25 UTC (rev 13204)
@@ -9,3 +9,6 @@
 
 Test-Command: pyflakes3 --help
 Depends: pyflakes3
+
+Tests: relative-import.sh
+Depends: python-pyflakes, python3-pyflakes

Added: packages/pyflakes/trunk/debian/tests/relative-import.sh
===================================================================
--- packages/pyflakes/trunk/debian/tests/relative-import.sh	                        (rev 0)
+++ packages/pyflakes/trunk/debian/tests/relative-import.sh	2016-05-11 21:34:25 UTC (rev 13204)
@@ -0,0 +1,12 @@
+# LP: #1560134
+
+cd $ADTTMP
+
+cat > relative.py <<EOF
+from . import foo
+
+foo()
+EOF
+
+python -m pyflakes relative.py
+python3 -m pyflakes relative.py




More information about the Python-apps-commits mailing list