[Python-modules-commits] r26837 - in packages/python-docutils/trunk/debian (3 files)

michi at users.alioth.debian.org michi at users.alioth.debian.org
Sat Dec 21 16:28:51 UTC 2013


    Date: Saturday, December 21, 2013 @ 16:28:50
  Author: michi
Revision: 26837

[python-docutils] New patch test_nodes-2to3.diff, closes: #732679

Added:
  packages/python-docutils/trunk/debian/patches/test_nodes-2to3.diff
Modified:
  packages/python-docutils/trunk/debian/changelog
  packages/python-docutils/trunk/debian/patches/series

Modified: packages/python-docutils/trunk/debian/changelog
===================================================================
--- packages/python-docutils/trunk/debian/changelog	2013-12-21 16:16:03 UTC (rev 26836)
+++ packages/python-docutils/trunk/debian/changelog	2013-12-21 16:28:50 UTC (rev 26837)
@@ -6,6 +6,11 @@
   [ Dmitry Shachnev ]
   * Fix package names in Recommends: python(3)-imaging → python(3)-pil.
 
+  [ Michael Schutte ]
+  * New patch test_nodes-2to3.diff: Do not rely on a bug in 2to3 string
+    literal conversion in test_nodes.ElementTests.test_empty, closes: #732679.
+    Thanks to Martin Pitt and Jakub Wilk for investigating.
+
  -- Jakub Wilk <jwilk at debian.org>  Wed, 11 Sep 2013 11:30:09 +0200
 
 python-docutils (0.11-2) unstable; urgency=low

Modified: packages/python-docutils/trunk/debian/patches/series
===================================================================
--- packages/python-docutils/trunk/debian/patches/series	2013-12-21 16:16:03 UTC (rev 26836)
+++ packages/python-docutils/trunk/debian/patches/series	2013-12-21 16:28:50 UTC (rev 26837)
@@ -11,3 +11,4 @@
 no-local-roman.diff
 rst2odt_prepstyles-elementtree.diff
 odt-writer-ascii-filenames.diff
+test_nodes-2to3.diff

Added: packages/python-docutils/trunk/debian/patches/test_nodes-2to3.diff
===================================================================
--- packages/python-docutils/trunk/debian/patches/test_nodes-2to3.diff	                        (rev 0)
+++ packages/python-docutils/trunk/debian/patches/test_nodes-2to3.diff	2013-12-21 16:28:50 UTC (rev 26837)
@@ -0,0 +1,25 @@
+Description: Make ElementTests.test_empty pass in the test_nodes.py 2to3 conversion
+ A bug in former versions of 2to3 has caused \uXXXX escapes in str
+ literals, which are not interpreted as such in Python 2, to end up as
+ the corresponding (actually interpreted) \uXXXX sequence in the
+ resulting Python 3 code (see http://bugs.python.org/issue18037).
+ test_nodes.ElementTests.test_empty relies on this behavior.
+ .
+ Fix the issue by using a Unicode literal in the Python 2 code.  This
+ solution has been suggested by Jakub Wilk.
+Author: Michael Schutte <michi at debian.org>
+Forwarded: https://sourceforge.net/p/docutils/patches/115/
+Bug-Debian: http://bugs.debian.org/732679
+Last-Update: 2013-12-21
+
+--- a/test/test_nodes.py
++++ b/test/test_nodes.py
+@@ -92,7 +92,7 @@
+         if sys.version_info < (3,):
+             self.assertEqual(str(element), '<Element mark="\\u2022"/>')
+         else:
+-            self.assertEqual(str(element), '<Element mark="\u2022"/>')
++            self.assertEqual(str(element), u'<Element mark="\u2022"/>')
+         dom = element.asdom()
+         self.assertEqual(dom.toxml(), u'<Element mark="\u2022"/>')
+         dom.unlink()




More information about the Python-modules-commits mailing list