[Python-modules-commits] [django-q] 06/10: Add d/patches/0003 to mitigate an issue with python3-only code line

Pierre-Elliott Bécue peb-guest at moszumanska.debian.org
Tue Feb 6 08:37:55 UTC 2018


This is an automated email from the git hooks/post-receive script.

peb-guest pushed a commit to branch master
in repository django-q.

commit 9dbd9fef4b90151773dfc40b84ba94eba011f390
Author: Pierre-Elliott Bécue <becue at crans.org>
Date:   Tue Feb 6 09:30:02 2018 +0100

    Add d/patches/0003 to mitigate an issue with python3-only code line
---
 debian/changelog                                   |  3 +-
 ...tional-on-a-python3-only-part-of-the-code.patch | 33 ++++++++++++++++++++++
 debian/patches/series                              |  1 +
 3 files changed, 36 insertions(+), 1 deletion(-)

diff --git a/debian/changelog b/debian/changelog
index 7e86b1e..7927ce3 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -4,8 +4,9 @@ django-q (0.9.1-1) unstable; urgency=medium
     - Set Multi-Arch: foreign on -doc package
   * Drop git-dpm
   * New upstream release 0.9.1
+  * Add d/patches/0003 to mitigate an issue with python3-only code line
 
- -- Pierre-Elliott Bécue <becue at crans.org>  Mon, 05 Feb 2018 23:27:02 +0100
+ -- Pierre-Elliott Bécue <becue at crans.org>  Tue, 06 Feb 2018 09:29:25 +0100
 
 django-q (0.8.1-1) unstable; urgency=medium
 
diff --git a/debian/patches/0003-Use-conditional-on-a-python3-only-part-of-the-code.patch b/debian/patches/0003-Use-conditional-on-a-python3-only-part-of-the-code.patch
new file mode 100644
index 0000000..67fe50f
--- /dev/null
+++ b/debian/patches/0003-Use-conditional-on-a-python3-only-part-of-the-code.patch
@@ -0,0 +1,33 @@
+From: =?utf-8?q?Pierre-Elliott_B=C3=A9cue?= <becue at crans.org>
+Date: Tue, 6 Feb 2018 09:28:46 +0100
+Subject: Use conditional on a python3-only part of the code
+
+---
+ django_q/queues.py | 7 ++++++-
+ 1 file changed, 6 insertions(+), 1 deletion(-)
+
+diff --git a/django_q/queues.py b/django_q/queues.py
+index ad729a1..6466fa2 100644
+--- a/django_q/queues.py
++++ b/django_q/queues.py
+@@ -2,6 +2,8 @@
+ The code is derived from https://github.com/althonos/pronto/commit/3384010dfb4fc7c66a219f59276adef3288a886b
+ """
+ 
++import sys
++
+ import multiprocessing
+ import multiprocessing.queues
+ 
+@@ -48,7 +50,10 @@ class Queue(multiprocessing.queues.Queue):
+     """
+ 
+     def __init__(self, *args, **kwargs):
+-        super(Queue, self).__init__(*args, ctx=multiprocessing.get_context(), **kwargs)
++        if sys.version_info < (3, 0):
++            super(Queue, self).__init__(*args, **kwargs)
++        else:
++            super(Queue, self).__init__(*args, ctx=multiprocessing.get_context(), **kwargs)
+         self.size = SharedCounter(0)
+ 
+     def put(self, *args, **kwargs):
diff --git a/debian/patches/series b/debian/patches/series
index 8ef3012..cff441c 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -1,2 +1,3 @@
 0001-Removes-all-links-that-trigger-a-privacy-breach.patch
 0002-Removes-.rst-call-to-now-inexistent-images.patch
+0003-Use-conditional-on-a-python3-only-part-of-the-code.patch

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/python-modules/packages/django-q.git



More information about the Python-modules-commits mailing list