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

stefanor at users.alioth.debian.org stefanor at users.alioth.debian.org
Mon Mar 19 14:14:59 UTC 2012


    Date: Monday, March 19, 2012 @ 14:14:57
  Author: stefanor
Revision: 20874

* Rebuild against python3-defaults 3.2.3~rc1-2, to generate correct
  ${python3:Depends}.
* no-et-roundtrip.patch: Avoid round-trip trohugh ET that loses namespaces.
  (LP: #924240)

Added:
  packages/python-wadllib/trunk/debian/patches/no-et-roundtrip.patch
Modified:
  packages/python-wadllib/trunk/debian/changelog
  packages/python-wadllib/trunk/debian/patches/series

Modified: packages/python-wadllib/trunk/debian/changelog
===================================================================
--- packages/python-wadllib/trunk/debian/changelog	2012-03-19 13:54:21 UTC (rev 20873)
+++ packages/python-wadllib/trunk/debian/changelog	2012-03-19 14:14:57 UTC (rev 20874)
@@ -1,3 +1,12 @@
+python-wadllib (1.3.0-2) UNRELEASED; urgency=low
+
+  * Rebuild against python3-defaults 3.2.3~rc1-2, to generate correct
+    ${python3:Depends}.
+  * no-et-roundtrip.patch: Avoid round-trip trohugh ET that loses namespaces.
+    (LP: #924240)
+
+ -- Stefano Rivera <stefanor at debian.org>  Mon, 19 Mar 2012 15:48:47 +0200
+
 python-wadllib (1.3.0-1) unstable; urgency=low
 
   * New upstream release. (Closes: #658051)

Added: packages/python-wadllib/trunk/debian/patches/no-et-roundtrip.patch
===================================================================
--- packages/python-wadllib/trunk/debian/patches/no-et-roundtrip.patch	                        (rev 0)
+++ packages/python-wadllib/trunk/debian/patches/no-et-roundtrip.patch	2012-03-19 14:14:57 UTC (rev 20874)
@@ -0,0 +1,30 @@
+Description: Don't roundtrip through ET, losing namespaces
+ I don't understand the purpose of the roundtrippnig through ET in
+ _from_string. More to the point, it claims to track namespaces, but clearly
+ doesn't correctly, causing LP: #924240.
+ .
+ My not understanding, is entirely possibly due to me not knowing this code at
+ all, but the change fixes the issue for me, and the tests still pass under
+ python 2 & 3.
+Forwarded: https://code.launchpad.net/~stefanor/wadllib/datetime-924240/+merge/97099
+Author: Stefano Rivera <stefanor at debian.org>
+Last-Update: 2012-03-19
+
+--- a/src/wadllib/application.py
++++ b/src/wadllib/application.py
+@@ -1104,13 +1104,8 @@
+         return ET.ElementTree(root)
+ 
+     def _from_string(self, markup):
+-        """Turns markup into a document.
+-
+-        Just a wrapper around ElementTree which keeps track of namespaces.
+-        """
+-        # We're using the ET fromstring/tostring to help make sure we maintain
+-        # py2/3 compatiblity and keeping things in Unicode.
+-        return self._from_stream(BytesIO(ET.tostring(ET.fromstring(markup))))
++        """Turns markup into a document."""
++        return self._from_stream(BytesIO(markup))
+ 
+     def get_resource_type(self, resource_type_url):
+         """Retrieve a resource type by the URL of its description."""

Modified: packages/python-wadllib/trunk/debian/patches/series
===================================================================
--- packages/python-wadllib/trunk/debian/patches/series	2012-03-19 13:54:21 UTC (rev 20873)
+++ packages/python-wadllib/trunk/debian/patches/series	2012-03-19 14:14:57 UTC (rev 20874)
@@ -1 +1,2 @@
 install-data
+no-et-roundtrip.patch




More information about the Python-modules-commits mailing list