[Python-modules-commits] r29289 - in packages/python-werkzeug/trunk/debian/patches (2 files)

piotr at users.alioth.debian.org piotr at users.alioth.debian.org
Tue Jun 10 20:21:39 UTC 2014


    Date: Tuesday, June 10, 2014 @ 20:21:38
  Author: piotr
Revision: 29289

add missing patches

Added:
  packages/python-werkzeug/trunk/debian/patches/0bad0c25.patch
  packages/python-werkzeug/trunk/debian/patches/13218de4.patch

Added: packages/python-werkzeug/trunk/debian/patches/0bad0c25.patch
===================================================================
--- packages/python-werkzeug/trunk/debian/patches/0bad0c25.patch	                        (rev 0)
+++ packages/python-werkzeug/trunk/debian/patches/0bad0c25.patch	2014-06-10 20:21:38 UTC (rev 29289)
@@ -0,0 +1,24 @@
+# taken from commit 0bad0c25f7d04da98328907d1c94a9b72fe57c57
+# Author: Daniel Neuhäuser <dasdasich at gmail.com>
+# Date:   Tue Sep 3 20:42:42 2013 +0200
+#
+#    Use maxsize in generate_adhoc_ssl_pair
+#    
+#    maxint is not available on Python 3.x because integers have no maximum
+#    size on 3.x.
+#    
+#    The test I added fails because of a bug in pyopenssl.
+
+diff --git a/werkzeug/serving.py b/werkzeug/serving.py
+index 2fb8660..43c4c71 100644
+--- a/werkzeug/serving.py
++++ b/werkzeug/serving.py
+@@ -277,7 +277,7 @@ def generate_adhoc_ssl_pair(cn=None):
+         cn = '*'
+ 
+     cert = crypto.X509()
+-    cert.set_serial_number(int(random() * sys.maxint))
++    cert.set_serial_number(int(random() * sys.maxsize))
+     cert.gmtime_adj_notBefore(0)
+     cert.gmtime_adj_notAfter(60 * 60 * 24 * 365)
+ 

Added: packages/python-werkzeug/trunk/debian/patches/13218de4.patch
===================================================================
--- packages/python-werkzeug/trunk/debian/patches/13218de4.patch	                        (rev 0)
+++ packages/python-werkzeug/trunk/debian/patches/13218de4.patch	2014-06-10 20:21:38 UTC (rev 29289)
@@ -0,0 +1,47 @@
+commit 13218deae25b6ee77d8dbab8af98ff1d38712ae4
+Author: Daniel Neuhäuser <dasdasich at gmail.com>
+Date:   Fri Mar 21 21:45:41 2014 +0100
+
+    Fix #502
+    
+    The code so far made far too many assumptions about the format used by
+    pickle, the changes introduced by PEP 3154 finally caused this to become
+    a real issue. This changes the code to make no assumptions about the
+    representation whatsoever, making it work with protocol 4, all future
+    protocols.
+
+diff --git a/werkzeug/testsuite/datastructures.py b/werkzeug/testsuite/datastructures.py
+index 28441ea..fdbda45 100644
+--- a/werkzeug/testsuite/datastructures.py
++++ b/werkzeug/testsuite/datastructures.py
+@@ -64,16 +64,26 @@ class MutableMultiDictBaseTestCase(WerkzeugTestCase):
+     def test_pickle(self):
+         cls = self.storage_class
+ 
+-        for protocol in range(pickle.HIGHEST_PROTOCOL + 1):
+-            d = cls()
++        def create_instance(module=None):
++            if module is None:
++                d = cls()
++            else:
++                old = cls.__module__
++                cls.__module__ = module
++                d = cls()
++                cls.__module__ = old
+             d.setlist(b'foo', [1, 2, 3, 4])
+             d.setlist(b'bar', b'foo bar baz'.split())
++            return d
++
++        for protocol in range(pickle.HIGHEST_PROTOCOL + 1):
++            d = create_instance()
+             s = pickle.dumps(d, protocol)
+             ud = pickle.loads(s)
+             self.assert_equal(type(ud), type(d))
+             self.assert_equal(ud, d)
+-            self.assert_equal(pickle.loads(
+-                s.replace(b'werkzeug.datastructures', b'werkzeug')), d)
++            alternative = pickle.dumps(create_instance('werkzeug'), protocol)
++            self.assert_equal(pickle.loads(alternative), d)
+             ud[b'newkey'] = b'bla'
+             self.assert_not_equal(ud, d)
+ 




More information about the Python-modules-commits mailing list