Ubuntu Pastebin

Paste from coreycb at Fri, 13 Jan 2017 13:59:33 +0000

Download as text
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
diff -Nru kombu-3.0.7/debian/changelog kombu-3.0.7/debian/changelog
--- kombu-3.0.7/debian/changelog        2014-01-07 14:15:13.000000000 -0500
+++ kombu-3.0.7/debian/changelog        2017-01-13 08:39:16.000000000 -0500
@@ -1,3 +1,10 @@
+kombu (3.0.7-1ubuntu1.1) trusty; urgency=medium
+
+  * d/p/fix-uuid-shim.patch: Cherry-pick patch from upstream to fix uuid
+    shim in newer Python versions.
+
+ -- Corey Bryant <corey.bryant@canonical.com>  Fri, 13 Jan 2017 08:39:16 -0500
+
 kombu (3.0.7-1ubuntu1) trusty; urgency=medium

   * Merge with Debian; remaining changes:
diff -Nru kombu-3.0.7/debian/patches/fix-uuid-shim.patch kombu-3.0.7/debian/patches/fix-uuid-shim.patch
--- kombu-3.0.7/debian/patches/fix-uuid-shim.patch      1969-12-31 19:00:00.000000000 -0500
+++ kombu-3.0.7/debian/patches/fix-uuid-shim.patch      2017-01-13 08:39:16.000000000 -0500
@@ -0,0 +1,48 @@
+Description: Fix uuid shim in newer Python versions.
+  After a recent change in cpython, uuid._uuid_generate_random() no longer
+  exists.
+
+  https://hg.python.org/cpython/rev/70be1f9c9255
+  http://bugs.python.org/issue25515
+
+  The issue being worked around was resolved in 2007, so it might be
+  sensible to just remove the work around.
+Author: Kai Groner <kai@gronr.com>
+Origin: upstream commit c8a8983db5bb352a6ebd6b7021bf5b153f504bfb
+
+---
+ kombu/utils/__init__.py | 13 ++++++++-----
+ 1 file changed, 8 insertions(+), 5 deletions(-)
+
+--- a/kombu/utils/__init__.py
++++ b/kombu/utils/__init__.py
+@@ -14,7 +14,11 @@
+ from contextlib import contextmanager
+ from itertools import count, repeat
+ from time import sleep
+-from uuid import UUID, uuid4 as _uuid4, _uuid_generate_random
++from uuid import UUID, uuid4
++try:
++    from uuid import _uuid_generate_random
++except ImportError:
++    _uuid_generate_random = None
+
+ from kombu.five import int_types, items, reraise, string_t
+
+@@ -125,13 +129,12 @@
+     print(str(m).format(*fargs, **fkwargs), file=sys.stderr)
+
+
+-def uuid4():
+-    # Workaround for http://bugs.python.org/issue4607
+-    if ctypes and _uuid_generate_random:  # pragma: no cover
++if ctypes and _uuid_generate_random:  # pragma: no cover
++    def uuid4():
++        # Workaround for http://bugs.python.org/issue4607
+         buffer = ctypes.create_string_buffer(16)
+         _uuid_generate_random(buffer)
+         return UUID(bytes=buffer.raw)
+-    return _uuid4()
+
+
+ def uuid():
diff -Nru kombu-3.0.7/debian/patches/series kombu-3.0.7/debian/patches/series
--- kombu-3.0.7/debian/patches/series   2013-12-17 04:10:26.000000000 -0500
+++ kombu-3.0.7/debian/patches/series   2017-01-13 08:38:44.000000000 -0500
@@ -1 +1,2 @@
 remove_nose-cover3.patch
+fix-uuid-shim.patch
Download as text