From 6ce21c9090a046dfc2826bb5dd907e9bb00a7eaa3d16a289c8ae6a1a11eea81e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tom=C3=A1=C5=A1=20Chv=C3=A1tal?= Date: Fri, 19 Jul 2019 13:08:05 +0000 Subject: [PATCH] - Update to 4.3.0: * See the changelog for in-depth details - Remove merged patches: * python37-1.patch * python37-2.patch * python37-3.patch * disable-pytest-log-capturing.patch * celery-no-redis.patch * relax-billiard-pin.patch - Rebase patch unpin-pytest.patch OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-celery?expand=0&rev=118 --- celery-4.2.1.tar.gz | 3 - celery-4.3.0.tar.gz | 3 + celery-no-redis.patch | 26 ------- disable-pytest-log-capturing.patch | 21 ----- python-celery.changes | 14 ++++ python-celery.spec | 26 +++---- python37-1.patch | 120 ----------------------------- python37-2.patch | 58 -------------- python37-3.patch | 28 ------- relax-billiard-pin.patch | 7 -- unpin-pytest.patch | 14 ++-- 11 files changed, 38 insertions(+), 282 deletions(-) delete mode 100644 celery-4.2.1.tar.gz create mode 100644 celery-4.3.0.tar.gz delete mode 100644 celery-no-redis.patch delete mode 100644 disable-pytest-log-capturing.patch delete mode 100644 python37-1.patch delete mode 100644 python37-2.patch delete mode 100644 python37-3.patch delete mode 100644 relax-billiard-pin.patch diff --git a/celery-4.2.1.tar.gz b/celery-4.2.1.tar.gz deleted file mode 100644 index 2fee338..0000000 --- a/celery-4.2.1.tar.gz +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:77dab4677e24dc654d42dfbdfed65fa760455b6bb563a0877ecc35f4cfcfc678 -size 1364075 diff --git a/celery-4.3.0.tar.gz b/celery-4.3.0.tar.gz new file mode 100644 index 0000000..d4e333f --- /dev/null +++ b/celery-4.3.0.tar.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:4c4532aa683f170f40bd76f928b70bc06ff171a959e06e71bf35f2f9d6031ef9 +size 1398430 diff --git a/celery-no-redis.patch b/celery-no-redis.patch deleted file mode 100644 index f568c8c..0000000 --- a/celery-no-redis.patch +++ /dev/null @@ -1,26 +0,0 @@ -From b2668607c909c61becd151905b4525190c19ff4a Mon Sep 17 00:00:00 2001 -From: Jon Dufresne -Date: Sat, 23 Jun 2018 16:08:47 -0700 -Subject: [PATCH] Require the redis module for test - test_timeouts_in_url_coerced (#4847) - -The test requires the redis module to be installed. It is referenced in -the function RedisBackend._params_from_url(). - -Fixes AppVeyor build failures. ---- - t/unit/backends/test_redis.py | 1 + - 1 file changed, 1 insertion(+) - -diff --git a/t/unit/backends/test_redis.py b/t/unit/backends/test_redis.py -index ee2ecf7959..166aa0dc34 100644 ---- a/t/unit/backends/test_redis.py -+++ b/t/unit/backends/test_redis.py -@@ -234,6 +234,7 @@ def test_url(self): - assert x.connparams['socket_timeout'] == 30.0 - assert x.connparams['socket_connect_timeout'] == 100.0 - -+ @skip.unless_module('redis') - def test_timeouts_in_url_coerced(self): - x = self.Backend( - ('redis://:bosco@vandelay.com:123//1?' diff --git a/disable-pytest-log-capturing.patch b/disable-pytest-log-capturing.patch deleted file mode 100644 index 99a952e..0000000 --- a/disable-pytest-log-capturing.patch +++ /dev/null @@ -1,21 +0,0 @@ -From: Michael Fladischer -Date: Wed, 28 Mar 2018 21:08:22 +0200 -Subject: Disable pytest (>=3.3) log capturing to avoid changing log handlers - (Closes: #892640). - ---- - setup.cfg | 1 + - 1 file changed, 1 insertion(+) - -diff --git a/setup.cfg b/setup.cfg -index 1a3f0b4..9f836e1 100644 ---- a/setup.cfg -+++ b/setup.cfg -@@ -1,6 +1,7 @@ - [tool:pytest] - testpaths = t/unit/ - python_classes = test_* -+addopts=-p no:logging - - [build_sphinx] - source-dir = docs/ diff --git a/python-celery.changes b/python-celery.changes index e35e9d2..1d4f405 100644 --- a/python-celery.changes +++ b/python-celery.changes @@ -1,3 +1,17 @@ +------------------------------------------------------------------- +Fri Jul 19 12:48:17 UTC 2019 - Tomáš Chvátal + +- Update to 4.3.0: + * See the changelog for in-depth details +- Remove merged patches: + * python37-1.patch + * python37-2.patch + * python37-3.patch + * disable-pytest-log-capturing.patch + * celery-no-redis.patch + * relax-billiard-pin.patch +- Rebase patch unpin-pytest.patch + ------------------------------------------------------------------- Wed Apr 24 14:10:26 UTC 2019 - Marketa Calabkova diff --git a/python-celery.spec b/python-celery.spec index 9b96c65..cc21d2b 100644 --- a/python-celery.spec +++ b/python-celery.spec @@ -18,41 +18,37 @@ %{?!python_module:%define python_module() python-%{**} python3-%{**}} Name: python-celery -Version: 4.2.1 +Version: 4.3.0 Release: 0 Summary: Distributed Task Queue module for Python License: BSD-3-Clause Group: Development/Languages/Python URL: http://celeryproject.org Source: https://files.pythonhosted.org/packages/source/c/celery/celery-%{version}.tar.gz -Patch0: disable-pytest-log-capturing.patch -Patch1: celery-no-redis.patch Patch2: unpin-pytest.patch -Patch3: relax-billiard-pin.patch -# Upstream patches for Python 3.7 support -Patch4: python37-1.patch -Patch5: python37-2.patch -Patch6: python37-3.patch BuildRequires: %{python_module SQLAlchemy} -BuildRequires: %{python_module billiard >= 3.5.0.2} +BuildRequires: %{python_module billiard >= 3.6.0} +BuildRequires: %{python_module boto3 >= 1.9.125} BuildRequires: %{python_module case >= 1.3.1} BuildRequires: %{python_module curses} BuildRequires: %{python_module eventlet} BuildRequires: %{python_module gevent} -BuildRequires: %{python_module kombu >= 4.0.2} +BuildRequires: %{python_module kombu >= 4.4.0} +BuildRequires: %{python_module moto >= 1.3.7} BuildRequires: %{python_module pyOpenSSL} -BuildRequires: %{python_module pytest >= 3.0} +BuildRequires: %{python_module pytest >= 4.3.1} BuildRequires: %{python_module python-dateutil} BuildRequires: %{python_module pytz >= 2016.7} BuildRequires: %{python_module setuptools} +BuildRequires: %{python_module vine >= 1.3.0} BuildRequires: fdupes BuildRequires: netcfg BuildRequires: python-rpm-macros -Requires: python-billiard >= 3.5.0.2 -Requires: python-kombu >= 4.0.2 +Requires: python-billiard >= 3.6.0 +Requires: python-kombu >= 4.4.0 Requires: python-python-dateutil Requires: python-pytz >= 2016.7 -Requires: python-vine +Requires: python-vine >= 1.3.0 %ifpython3 Requires: python3-dbm %endif @@ -74,6 +70,8 @@ scheduling as well. %prep %setup -q -n celery-%{version} %autopatch -p1 +# do not hardcode versions +sed -i -e 's:==:>=:g' requirements/*.txt %build %python_build diff --git a/python37-1.patch b/python37-1.patch deleted file mode 100644 index 6ab3793..0000000 --- a/python37-1.patch +++ /dev/null @@ -1,120 +0,0 @@ -From e7002769211f7340f38df80b3112706a8e07cafb Mon Sep 17 00:00:00 2001 -From: Asif Saifuddin Auvi -Date: Mon, 9 Jul 2018 11:33:36 +0600 -Subject: [PATCH] Python 3.7 compat issues (#4852) - -* renamed banckend.async to asynchronous - -* adjust redis imports of async - -* adjust imports of async - -* import style adjust - -* renamed doc from async to asynchronous - -* renamed doc contents from async to asynchronous ---- - celery/backends/{async.py => asynchronous.py} | 0 - celery/backends/redis.py | 7 ++++--- - celery/backends/rpc.py | 2 +- - ...backends.async.rst => celery.backends.asynchronous.rst} | 6 +++--- - t/unit/backends/test_redis.py | 4 ++-- - 5 files changed, 10 insertions(+), 9 deletions(-) - rename celery/backends/{async.py => asynchronous.py} (100%) - rename docs/internals/reference/{celery.backends.async.rst => celery.backends.asynchronous.rst} (52%) - -diff --git a/celery/backends/async.py b/celery/backends/asynchronous.py -similarity index 100% -rename from celery/backends/async.py -rename to celery/backends/asynchronous.py -diff --git a/celery/backends/redis.py b/celery/backends/redis.py -index 012db0f36e..6c311d8273 100644 ---- a/celery/backends/redis.py -+++ b/celery/backends/redis.py -@@ -19,7 +19,8 @@ - from celery.utils.log import get_logger - from celery.utils.time import humanize_seconds - --from . import async, base -+from .asynchronous import AsyncBackendMixin, BaseResultConsumer -+from .base import BaseKeyValueStoreBackend - - try: - from urllib.parse import unquote -@@ -74,7 +75,7 @@ - logger = get_logger(__name__) - - --class ResultConsumer(async.BaseResultConsumer): -+class ResultConsumer(BaseResultConsumer): - _pubsub = None - - def __init__(self, *args, **kwargs): -@@ -138,7 +139,7 @@ def cancel_for(self, task_id): - self._pubsub.unsubscribe(key) - - --class RedisBackend(base.BaseKeyValueStoreBackend, async.AsyncBackendMixin): -+class RedisBackend(BaseKeyValueStoreBackend, AsyncBackendMixin): - """Redis task result store.""" - - ResultConsumer = ResultConsumer -diff --git a/celery/backends/rpc.py b/celery/backends/rpc.py -index 6e31cef75e..5e6e407ce6 100644 ---- a/celery/backends/rpc.py -+++ b/celery/backends/rpc.py -@@ -17,7 +17,7 @@ - from celery.five import items, range - - from . import base --from .async import AsyncBackendMixin, BaseResultConsumer -+from .asynchronous import AsyncBackendMixin, BaseResultConsumer - - __all__ = ('BacklogLimitExceeded', 'RPCBackend') - -diff --git a/docs/internals/reference/celery.backends.async.rst b/docs/internals/reference/celery.backends.asynchronous.rst -similarity index 52% -rename from docs/internals/reference/celery.backends.async.rst -rename to docs/internals/reference/celery.backends.asynchronous.rst -index 03d10feb33..fef524294e 100644 ---- a/docs/internals/reference/celery.backends.async.rst -+++ b/docs/internals/reference/celery.backends.asynchronous.rst -@@ -1,12 +1,12 @@ - ===================================== -- ``celery.backends.async`` -+ ``celery.backends.asynchronous`` - ===================================== - - .. contents:: - :local: --.. currentmodule:: celery.backends.async -+.. currentmodule:: celery.backends.asynchronous - --.. automodule:: celery.backends.async -+.. automodule:: celery.backends.asynchronous - :members: - :undoc-members: - -diff --git a/t/unit/backends/test_redis.py b/t/unit/backends/test_redis.py -index 166aa0dc34..6a7dbbd501 100644 ---- a/t/unit/backends/test_redis.py -+++ b/t/unit/backends/test_redis.py -@@ -146,7 +146,7 @@ class _RedisBackend(RedisBackend): - def get_consumer(self): - return self.get_backend().result_consumer - -- @patch('celery.backends.async.BaseResultConsumer.on_after_fork') -+ @patch('celery.backends.asynchronous.BaseResultConsumer.on_after_fork') - def test_on_after_fork(self, parent_method): - consumer = self.get_consumer() - consumer.start('none') -@@ -172,7 +172,7 @@ def test_on_after_fork(self, parent_method): - parent_method.assert_called_once() - - @patch('celery.backends.redis.ResultConsumer.cancel_for') -- @patch('celery.backends.async.BaseResultConsumer.on_state_change') -+ @patch('celery.backends.asynchronous.BaseResultConsumer.on_state_change') - def test_on_state_change(self, parent_method, cancel_for): - consumer = self.get_consumer() - meta = {'task_id': 'testing', 'status': states.SUCCESS} diff --git a/python37-2.patch b/python37-2.patch deleted file mode 100644 index a8d37a5..0000000 --- a/python37-2.patch +++ /dev/null @@ -1,58 +0,0 @@ -From 1c3a15938d0b9dde674d4666689d6a6c733d64e4 Mon Sep 17 00:00:00 2001 -From: kidoz -Date: Thu, 12 Jul 2018 20:02:10 +0300 -Subject: [PATCH] Added compatibility with python 3.7 (#4902) - ---- - celery/app/routes.py | 8 +++++++- - t/unit/app/test_routes.py | 5 +++++ - 2 files changed, 12 insertions(+), 1 deletion(-) - -diff --git a/celery/app/routes.py b/celery/app/routes.py -index 9957a4feae..dc06eb988e 100644 ---- a/celery/app/routes.py -+++ b/celery/app/routes.py -@@ -17,6 +17,12 @@ - from celery.utils.functional import maybe_evaluate, mlazy - from celery.utils.imports import symbol_by_name - -+try: -+ Pattern = re._pattern_type -+except AttributeError: # pragma: no cover -+ # for support Python 3.7 -+ Pattern = re.Pattern -+ - __all__ = ('MapRoute', 'Router', 'prepare') - - -@@ -33,7 +39,7 @@ def __init__(self, map): - self.map = {} - self.patterns = OrderedDict() - for k, v in map: -- if isinstance(k, re._pattern_type): -+ if isinstance(k, Pattern): - self.patterns[k] = v - elif '*' in k: - self.patterns[re.compile(glob_to_re(k))] = v -diff --git a/t/unit/app/test_routes.py b/t/unit/app/test_routes.py -index 8d3eac0417..5ed8c53b1c 100644 ---- a/t/unit/app/test_routes.py -+++ b/t/unit/app/test_routes.py -@@ -78,12 +78,17 @@ def test_route_for_task(self): - assert route('celery.awesome') is None - - def test_route_for_task__glob(self): -+ from re import compile -+ - route = routes.MapRoute([ - ('proj.tasks.*', 'routeA'), - ('demoapp.tasks.bar.*', {'exchange': 'routeB'}), -+ (compile(r'(video|image)\.tasks\..*'), {'queue': 'media'}), - ]) - assert route('proj.tasks.foo') == {'queue': 'routeA'} - assert route('demoapp.tasks.bar.moo') == {'exchange': 'routeB'} -+ assert route('video.tasks.foo') == {'queue': 'media'} -+ assert route('image.tasks.foo') == {'queue': 'media'} - assert route('demoapp.foo.bar.moo') is None - - def test_expand_route_not_found(self): diff --git a/python37-3.patch b/python37-3.patch deleted file mode 100644 index 690b98b..0000000 --- a/python37-3.patch +++ /dev/null @@ -1,28 +0,0 @@ -From 6ab775eb6b5643311af21557fa84d10ce605eb17 Mon Sep 17 00:00:00 2001 -From: Omer Katz -Date: Fri, 4 Jan 2019 07:12:10 +0200 -Subject: [PATCH] Avoid raising StopIterator in generators. (#5263) - -According to [PEP-479](https://www.python.org/dev/peps/pep-0479/) StopIteration should not be used any more to indicate the termination of a generator. -Starting from Python 3.7 this behaviour is always enforced and a RuntimeError is raised instead. -Instead of raising a StopIterator exception, we now never execute our yield statement. -Since it is present Gen is still a generator but it will never yield any value. ---- - t/unit/worker/test_loops.py | 4 ++-- - 1 file changed, 2 insertions(+), 2 deletions(-) - -diff --git a/t/unit/worker/test_loops.py b/t/unit/worker/test_loops.py -index f86f730f16..d57b416e47 100644 ---- a/t/unit/worker/test_loops.py -+++ b/t/unit/worker/test_loops.py -@@ -383,8 +383,8 @@ def test_poll_write_generator_stopped(self): - x = X(self.app) - - def Gen(): -- raise StopIteration() -- yield -+ if 0: -+ yield - gen = Gen() - x.hub.add_writer(6, gen) - x.hub.on_tick.add(x.close_then_error(Mock(name='tick'), 2)) diff --git a/relax-billiard-pin.patch b/relax-billiard-pin.patch deleted file mode 100644 index da51d48..0000000 --- a/relax-billiard-pin.patch +++ /dev/null @@ -1,7 +0,0 @@ ---- celery-4.2.1-orig/requirements/default.txt 2018-05-21 14:35:08.000000000 +0700 -+++ celery-4.2.1/requirements/default.txt 2019-02-15 17:25:21.902960298 +0700 -@@ -1,3 +1,3 @@ - pytz>dev --billiard>=3.5.0.2,<3.6.0 -+billiard>=3.5.0.2 - kombu>=4.2.0,<5.0 diff --git a/unpin-pytest.patch b/unpin-pytest.patch index 42705e4..00590d0 100644 --- a/unpin-pytest.patch +++ b/unpin-pytest.patch @@ -1,6 +1,10 @@ ---- celery-4.2.1/requirements/test.txt.orig 2019-02-21 17:43:53.252577134 +0700 -+++ celery-4.2.1/requirements/test.txt 2019-02-21 17:44:02.860644766 +0700 -@@ -1,2 +1,2 @@ +Index: celery-4.3.0/requirements/test.txt +=================================================================== +--- celery-4.3.0.orig/requirements/test.txt ++++ celery-4.3.0/requirements/test.txt +@@ -1,4 +1,4 @@ case>=1.3.1 --pytest>=3.0,<3.3 -+pytest>=3.0 +-pytest>=4.3.1,<4.4.0 ++pytest>=4.3.1 + boto3>=1.4.6 + moto==1.3.7