[packages/python-celery] Version: 4.2.1, Python 3.7 compat fix
jajcus
jajcus at pld-linux.org
Wed Sep 26 13:13:16 CEST 2018
commit d056e0abe669001580c87825dabd1ab53194b73e
Author: Jacek Konieczny <j.konieczny at eggsoft.pl>
Date: Wed Sep 26 13:12:54 2018 +0200
Version: 4.2.1, Python 3.7 compat fix
intersphinx.patch | 20 ---------------
python-celery.spec | 35 +++++++++++++-------------
python3.5-ordereddict.patch | 60 ---------------------------------------------
unittest2.patch | 7 ------
4 files changed, 18 insertions(+), 104 deletions(-)
---
diff --git a/python-celery.spec b/python-celery.spec
index 2f502da..99fa908 100644
--- a/python-celery.spec
+++ b/python-celery.spec
@@ -5,7 +5,7 @@
# package! Real-life deployments will mostly be application-specific.
# Conditional build:
-%bcond_without doc # don't build doc
+%bcond_with doc # do build doc (too much dependencies to be worth the trouble)
%bcond_with tests # run tests (broken)
%bcond_without python2 # CPython 2.x module
%bcond_without python3 # CPython 3.x module
@@ -18,21 +18,18 @@
%define module celery
Summary: Celery - Distributed Task Query
Name: python-%{module}
-Version: 3.1.19
-Release: 8
+Version: 4.2.1
+Release: 1
License: BSD-like
Group: Development/Languages/Python
-Source0: http://pypi.python.org/packages/source/c/%{module}/%{module}-%{version}.tar.gz
-# Source0-md5: fba8c4b269814dc6dbc36abb0e66c384
+Source0: https://files.pythonhosted.org/packages/source/c/%{module}/%{module}-%{version}.tar.gz
+# Source0-md5: 71397f019700edc97a41ebadf09daf42
Source1: amqp-objects.inv
Source2: cyme-objects.inv
Source3: djcelery-objects.inv
Source4: kombu-objects.inv
Source5: python-objects.inv
Patch0: pytz_dependency.patch
-Patch1: unittest2.patch
-Patch2: intersphinx.patch
-Patch3: python3.5-ordereddict.patch
URL: http://celeryproject.org/
BuildRequires: rpm-pythonprov
BuildRequires: rpmbuild(macros) >= 1.710
@@ -67,8 +64,8 @@ BuildRequires: python3-sphinxcontrib-issuetracker
BuildRequires: sphinx-pdg-3
%endif
%endif
-Requires: python-billiard >= 3.3.0.21
-Requires: python-kombu >= 3.0.29
+Requires: python-billiard >= 3.5.0.2
+Requires: python-kombu >= 4.2.0
Requires: python-pytz
BuildArch: noarch
BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
@@ -81,10 +78,10 @@ scheduling as well.
%package -n python3-%{module}
Summary: Celery - Distributed Task Query
Group: Development/Languages/Python
-Requires: python3-billiard >= 3.3.0.21
-Requires: python3-billiard < 3.4
-Requires: python3-kombu >= 3.0.29
-Requires: python3-kombu < 3.1
+Requires: python3-billiard >= 3.5.0.2
+Requires: python3-billiard < 4.0
+Requires: python3-kombu >= 4.2.0
+Requires: python3-kombu < 5.0
Requires: python3-pytz
%description -n python3-%{module}
@@ -132,12 +129,16 @@ Dokumentacja API %{module}.
%setup -q -n %{module}-%{version}
%patch0 -p1
-%patch1 -p1
-%patch2 -p1
-%patch3 -p1
cp -a %{SOURCE1} %{SOURCE2} %{SOURCE3} %{SOURCE4} %{SOURCE5} docs
+# python 3.7 fix
+cd celery/backends
+mv async.py asynchronous.py
+sed -i 's/async/asynchronous/g' redis.py
+sed -i 's/async/asynchronous/g' rpc.py
+cd ../..
+
%build
%if %{with python2}
%py_build %{?with_tests:test}
diff --git a/intersphinx.patch b/intersphinx.patch
deleted file mode 100644
index c0f28cb..0000000
--- a/intersphinx.patch
+++ /dev/null
@@ -1,20 +0,0 @@
-diff -dur celery-3.1.19.orig/docs/conf.py celery-3.1.19/docs/conf.py
---- celery-3.1.19.orig/docs/conf.py 2015-10-26 21:04:39.000000000 +0100
-+++ celery-3.1.19/docs/conf.py 2015-11-17 09:53:06.000000000 +0100
-@@ -76,11 +76,11 @@
- add_function_parentheses = True
-
- intersphinx_mapping = {
-- 'python': ('http://docs.python.org/dev', None),
-- 'kombu': ('http://kombu.readthedocs.org/en/latest/', None),
-- 'djcelery': ('http://django-celery.readthedocs.org/en/latest', None),
-- 'cyme': ('http://cyme.readthedocs.org/en/latest', None),
-- 'amqp': ('http://amqp.readthedocs.org/en/latest', None),
-+ 'python': ('http://docs.python.org/dev', "python-objects.inv"),
-+ 'kombu': ('http://kombu.readthedocs.org/en/latest/', "kombu-objects.inv"),
-+ 'djcelery': ('http://django-celery.readthedocs.org/en/latest', "djcelery-objects.inv"),
-+ 'cyme': ('http://cyme.readthedocs.org/en/latest', "cyme-objects.inv"),
-+ 'amqp': ('http://amqp.readthedocs.org/en/latest', "amqp-objects.inv"),
- }
-
- # The name of the Pygments (syntax highlighting) style to use.
diff --git a/python3.5-ordereddict.patch b/python3.5-ordereddict.patch
deleted file mode 100644
index 6e79302..0000000
--- a/python3.5-ordereddict.patch
+++ /dev/null
@@ -1,60 +0,0 @@
-From 810b72e9d3f3d3c9af0d0e13df8c681f8d692ab8 Mon Sep 17 00:00:00 2001
-From: Dennis Brakhane <dennis.brakhane at inoio.de>
-Date: Fri, 30 Oct 2015 20:05:11 +0100
-Subject: [PATCH] Fix LRUCache.update for Python 3.5
-
-Python 3.5's OrderedDict does not allow mutation while it is being
-iterated over. This breaks "update" if it is called with a dict
-larger than the maximum size.
-
-This commit changes the code to a version that does not iterate over
-the dict, and should also be a little bit faster.
-
-Closes #2897
----
- CONTRIBUTORS.txt | 1 +
- celery/tests/utils/test_functional.py | 5 +++++
- celery/utils/functional.py | 7 +++----
- 3 files changed, 9 insertions(+), 4 deletions(-)
-
-diff --git a/celery/tests/utils/test_functional.py b/celery/tests/utils/test_functional.py
-index c60419d..043646f 100644
---- a/celery/tests/utils/test_functional.py
-+++ b/celery/tests/utils/test_functional.py
-@@ -63,6 +63,11 @@ def test_least_recently_used(self):
- x[7] = 7
- self.assertEqual(list(x.keys()), [3, 6, 7])
-
-+ def test_update_larger_than_cache_size(self):
-+ x = LRUCache(2)
-+ x.update({x: x for x in range(100)})
-+ self.assertEqual(list(x.keys()), [98, 99])
-+
- def assertSafeIter(self, method, interval=0.01, size=10000):
- if sys.version_info >= (3, 5):
- raise SkipTest('Fails on Py3.5')
-diff --git a/celery/utils/functional.py b/celery/utils/functional.py
-index fbb4fc4..1af2914 100644
---- a/celery/utils/functional.py
-+++ b/celery/utils/functional.py
-@@ -20,7 +20,7 @@
- from kombu.utils import cached_property
- from kombu.utils.functional import lazy, maybe_evaluate, is_list, maybe_list
-
--from celery.five import UserDict, UserList, items, keys
-+from celery.five import UserDict, UserList, items, keys, range
-
- __all__ = ['LRUCache', 'is_list', 'maybe_list', 'memoize', 'mlazy', 'noop',
- 'first', 'firstmethod', 'chunks', 'padlist', 'mattrgetter', 'uniq',
-@@ -71,9 +71,8 @@ def update(self, *args, **kwargs):
- data.update(*args, **kwargs)
- if limit and len(data) > limit:
- # pop additional items in case limit exceeded
-- # negative overflow will lead to an empty list
-- for item in islice(iter(data), len(data) - limit):
-- data.pop(item)
-+ for _ in range(len(data) - limit):
-+ data.popitem(last=False)
-
- def popitem(self, last=True):
- with self.mutex:
diff --git a/unittest2.patch b/unittest2.patch
deleted file mode 100644
index 0933b56..0000000
--- a/unittest2.patch
+++ /dev/null
@@ -1,7 +0,0 @@
-diff -dur celery-3.1.19.orig/requirements/test.txt celery-3.1.19/requirements/test.txt
---- celery-3.1.19.orig/requirements/test.txt 2015-10-26 21:04:39.000000000 +0100
-+++ celery-3.1.19/requirements/test.txt 2015-11-17 09:42:12.000000000 +0100
-@@ -1,3 +1,2 @@
--unittest2>=0.5.1
- nose
- mock>=1.0.1
================================================================
---- gitweb:
http://git.pld-linux.org/gitweb.cgi/packages/python-celery.git/commitdiff/d056e0abe669001580c87825dabd1ab53194b73e
More information about the pld-cvs-commit
mailing list