[Python-modules-commits] r27558 - in packages/enum34/trunk/debian (4 files)

barry at users.alioth.debian.org barry at users.alioth.debian.org
Thu Feb 6 20:47:15 UTC 2014


    Date: Thursday, February 6, 2014 @ 20:47:14
  Author: barry
Revision: 27558

* New upstream release.
* d/control: Bump Standards-Version to 3.9.5 with no other changes necessary.
* d/patches/python34-fixes.patch: Fix test failures with Python 3.4, and
  at least one with Python 3.3 also.  (Closes: #737878)

Added:
  packages/enum34/trunk/debian/patches/python34-fixes.patch
Modified:
  packages/enum34/trunk/debian/changelog
  packages/enum34/trunk/debian/control
  packages/enum34/trunk/debian/patches/series

Modified: packages/enum34/trunk/debian/changelog
===================================================================
--- packages/enum34/trunk/debian/changelog	2014-02-06 09:43:17 UTC (rev 27557)
+++ packages/enum34/trunk/debian/changelog	2014-02-06 20:47:14 UTC (rev 27558)
@@ -1,3 +1,12 @@
+enum34 (0.9.20-1) unstable; urgency=medium
+
+  * New upstream release.
+  * d/control: Bump Standards-Version to 3.9.5 with no other changes necessary.
+  * d/patches/python34-fixes.patch: Fix test failures with Python 3.4, and
+    at least one with Python 3.3 also.  (Closes: #737878)
+
+ -- Barry Warsaw <barry at debian.org>  Thu, 06 Feb 2014 14:34:39 -0500
+
 enum34 (0.9.19-1) unstable; urgency=low
 
   * New upstream release.

Modified: packages/enum34/trunk/debian/control
===================================================================
--- packages/enum34/trunk/debian/control	2014-02-06 09:43:17 UTC (rev 27557)
+++ packages/enum34/trunk/debian/control	2014-02-06 20:47:14 UTC (rev 27558)
@@ -14,7 +14,7 @@
                python-sphinx (>= 1.0.7+dfsg-1~),
                python3-all,
                python3-setuptools
-Standards-Version: 3.9.4
+Standards-Version: 3.9.5
 Vcs-Svn: svn://anonscm.debian.org/python-modules/packages/enum34/trunk/
 Vcs-Browser: http://anonscm.debian.org/viewvc/python-modules/packages/enum34/trunk/
 

Added: packages/enum34/trunk/debian/patches/python34-fixes.patch
===================================================================
--- packages/enum34/trunk/debian/patches/python34-fixes.patch	                        (rev 0)
+++ packages/enum34/trunk/debian/patches/python34-fixes.patch	2014-02-06 20:47:14 UTC (rev 27558)
@@ -0,0 +1,48 @@
+Description: Fix some test failures under Python 3.4 (and at least one under
+  3.3).  Python 3.4's highest pickle protocol cannot pickle the nested enums,
+  so there, use protocol 3 (i.e. the highest protocol under Python <= 3.3).
+  Also, add a required symbol to locals for exec().
+Author: Barry Warsaw <barry at debian.org>
+Bug: https://bitbucket.org/stoneleaf/enum34/issue/3/build-failures-in-python-34-and-33-in
+
+--- a/enum/test_enum.py
++++ b/enum/test_enum.py
+@@ -6,6 +6,8 @@
+ 
+ pyver = float('%s.%s' % sys.version_info[:2])
+ 
++SAFE_PROTOCOL = HIGHEST_PROTOCOL - (0 if pyver <= 3.3 else 1)
++
+ try:
+     any
+ except NameError:
+@@ -366,7 +368,7 @@
+ 
+     if pyver >= 3.0:
+         cls = vars()
+-        result = {}
++        result = dict(Enum=Enum)
+         exec("""def test_duplicate_name(self):
+             with self.assertRaises(TypeError):
+                 class Color(Enum):
+@@ -1019,9 +1021,9 @@
+         globals()['NEI'] = NEI
+         NI5 = NamedInt('test', 5)
+         self.assertEqual(NI5, 5)
+-        self.assertEqual(loads(dumps(NI5, protocol=HIGHEST_PROTOCOL)), 5)
++        self.assertEqual(loads(dumps(NI5, protocol=SAFE_PROTOCOL)), 5)
+         self.assertEqual(NEI.y.value, 2)
+-        self.assertTrue(loads(dumps(NEI.y, protocol=HIGHEST_PROTOCOL)) is NEI.y)
++        self.assertTrue(loads(dumps(NEI.y, protocol=SAFE_PROTOCOL)) is NEI.y)
+ 
+     def test_subclasses_without_getnewargs(self):
+         class NamedInt(int):
+@@ -1097,7 +1099,7 @@
+         self.assertTrue(isinstance(SomeTuple.second, tuple))
+         self.assertEqual(SomeTuple.third, (3, 'for the music'))
+         globals()['SomeTuple'] = SomeTuple
+-        self.assertTrue(loads(dumps(SomeTuple.first, protocol=HIGHEST_PROTOCOL)) is SomeTuple.first)
++        self.assertTrue(loads(dumps(SomeTuple.first, protocol=SAFE_PROTOCOL)) is SomeTuple.first)
+ 
+     def test_duplicate_values_give_unique_enum_items(self):
+         class AutoNumber(Enum):

Modified: packages/enum34/trunk/debian/patches/series
===================================================================
--- packages/enum34/trunk/debian/patches/series	2014-02-06 09:43:17 UTC (rev 27557)
+++ packages/enum34/trunk/debian/patches/series	2014-02-06 20:47:14 UTC (rev 27558)
@@ -0,0 +1 @@
+python34-fixes.patch




More information about the Python-modules-commits mailing list