[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#927870: unblock: kombu/4.2.1-3



Package: release.debian.org
Severity: normal
User: release.debian.org@packages.debian.org
Usertags: unblock

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA512

Please unblock package kombu

python-redis (>= 3) changed its API, breaking kombu (#924976).

kombu/4.2.1-3 includes an upstream patch to fix this. See the attached debdiff
for changes.

unblock kombu/4.2.1-3

- -- System Information:
Debian Release: 10.0
  APT prefers unstable
  APT policy: (500, 'unstable'), (1, 'experimental')
Architecture: amd64 (x86_64)
Foreign Architectures: armhf

Kernel: Linux 4.19.0-4-amd64 (SMP w/2 CPU cores)
Locale: LANG=en_DK.UTF-8, LC_CTYPE=en_DK.UTF-8 (charmap=UTF-8), LANGUAGE=en_US:en (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
Init: systemd (via /run/systemd/system)
LSM: AppArmor: enabled

-----BEGIN PGP SIGNATURE-----

iQFFBAEBCgAvFiEEqVSlRXW87UkkCnJc/9PIi5l90WoFAlzATBQRHGZsYWRpQGRl
Ymlhbi5vcmcACgkQ/9PIi5l90Wq/WwgAr05bZZUywy7PXo+cfXoMYSdrrUiBi5MH
A6mgWzlCrQ+bBnbIanqmLoEvz21Y8t/Lp85Tjd9Q+/EcfdkoMm5a1C+bHr3as0KK
LFnPw1jT/IXQ4BPMqKcH4r7XpQTM8xfVJKBnsValccfZeLRWOSSw+56xcKXoAC7b
GiQT8QhvtIYFFKErQKq7oid2IXmD86gmTG6iUZ6d6px552GixLJHtGxSLzVIwIhz
x86pXIe6uB/Fpf7QaBjdqh9O7/0aBT5oxs63Yk0mmMMC7jp51RuHwi0b7pdwZWRC
3M3XhDERmaBQgyCToiKLVdAQUAh5hx5VJj08D5gsIDyQeDfkSUHiVQ==
=6IQy
-----END PGP SIGNATURE-----
diff -Nru kombu-4.2.1/debian/changelog kombu-4.2.1/debian/changelog
--- kombu-4.2.1/debian/changelog	2019-03-01 20:03:25.000000000 +0100
+++ kombu-4.2.1/debian/changelog	2019-04-22 21:04:43.000000000 +0200
@@ -1,3 +1,12 @@
+kombu (4.2.1-3) unstable; urgency=medium
+
+  [ Josue Ortega ]
+  * Team upload.
+  * Add debian/patch/0005-Fix-compat-with-redis3.patch to fix compatibility with
+    python-redis (>= 3) (Closes: #924976).
+
+ -- Michael Fladischer <fladi@debian.org>  Mon, 22 Apr 2019 21:04:43 +0200
+
 kombu (4.2.1-2) unstable; urgency=high
 
   [ Ondřej Nový ]
diff -Nru kombu-4.2.1/debian/patches/0005-Fix-compat-with-redis3.patch kombu-4.2.1/debian/patches/0005-Fix-compat-with-redis3.patch
--- kombu-4.2.1/debian/patches/0005-Fix-compat-with-redis3.patch	1970-01-01 01:00:00.000000000 +0100
+++ kombu-4.2.1/debian/patches/0005-Fix-compat-with-redis3.patch	2019-04-22 21:04:43.000000000 +0200
@@ -0,0 +1,41 @@
+Description: Fix compat with redis >= 3
+Author: Josue Ortega <josue@debian.org>
+Last-Update: 2019-04-15
+
+--- a/kombu/transport/redis.py
++++ b/kombu/transport/redis.py
+@@ -145,8 +145,14 @@
+     def append(self, message, delivery_tag):
+         delivery = message.delivery_info
+         EX, RK = delivery['exchange'], delivery['routing_key']
++
++        # Redis-py changed the format of zadd args in v3.0.0
++        zadd_args = [{delivery_tag: time()}]
++        if redis.VERSION[0] < 3:
++            zadd_args = [time(), delivery_tag]
++
+         with self.pipe_or_acquire() as pipe:
+-            pipe.zadd(self.unacked_index_key, time(), delivery_tag) \
++            pipe.zadd(self.unacked_index_key, *zadd_args) \
+                 .hset(self.unacked_key, delivery_tag,
+                       dumps([message._raw, EX, RK])) \
+                 .execute()
+--- a/t/unit/transport/test_redis.py
++++ b/t/unit/transport/test_redis.py
+@@ -75,8 +75,14 @@
+     def sadd(self, key, member, *args):
+         self.sets[key].add(member)
+ 
+-    def zadd(self, key, score1, member1, *args):
+-        self.sets[key].add(member1)
++    def zadd(self, key, *args):
++        if redis.redis.VERSION[0] >= 3:
++            (mapping,) = args
++            for item in mapping:
++                self.sets[key].add(item)
++        else:
++            (score1, member1) = args
++            self.sets[key].add(member1)
+ 
+     def smembers(self, key):
+         return self.sets.get(key, set())
diff -Nru kombu-4.2.1/debian/patches/series kombu-4.2.1/debian/patches/series
--- kombu-4.2.1/debian/patches/series	2019-03-01 20:03:25.000000000 +0100
+++ kombu-4.2.1/debian/patches/series	2019-04-22 21:04:43.000000000 +0200
@@ -1,3 +1,4 @@
+0005-Fix-compat-with-redis3.patch
 0001-Remove-image-from-remote-donation-site-privacy-issue.patch
 0002-Disable-intershpinx-mapping-for-now.patch
 0003-Remove-pytest-sugar-from-test-requirements.patch

Reply to: