forked from pool/python-celery
Accepting request 913346 from home:mcalabkova:branches:devel:languages:python:setuptools
- Add relax-click.patch to fix requirements (boo#1189286) OBS-URL: https://build.opensuse.org/request/show/913346 OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-celery?expand=0&rev=146
This commit is contained in:
@@ -1,3 +1,8 @@
|
||||
-------------------------------------------------------------------
|
||||
Fri Aug 20 13:00:14 UTC 2021 - Markéta Machová <mmachova@suse.com>
|
||||
|
||||
- Add relax-click.patch to fix requirements (boo#1189286)
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Fri Jul 2 08:03:23 UTC 2021 - Markéta Machová <mmachova@suse.com>
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
#
|
||||
# spec file for package python-celery
|
||||
# spec file
|
||||
#
|
||||
# Copyright (c) 2021 SUSE LLC
|
||||
#
|
||||
@@ -35,22 +35,23 @@ License: BSD-3-Clause
|
||||
URL: http://celeryproject.org
|
||||
Source: https://files.pythonhosted.org/packages/source/c/celery/celery-%{version}.tar.gz
|
||||
Patch0: move-pytest-configuration-to-conftest.patch
|
||||
Patch1: relax-click.patch
|
||||
BuildRequires: %{python_module setuptools}
|
||||
BuildRequires: fdupes
|
||||
BuildRequires: netcfg
|
||||
BuildRequires: python-rpm-macros
|
||||
Requires: python-billiard >= 3.6.3.0
|
||||
Requires: python-click >= 7.0
|
||||
Requires: python-click >= 8.0
|
||||
Requires: python-click-didyoumean >= 0.0.3
|
||||
Requires: python-click-plugins >= 1.1.1
|
||||
Requires: python-click-repl >= 0.1.6
|
||||
Requires: python-click-repl >= 0.2.0
|
||||
Requires: python-kombu >= 5.0.0
|
||||
Requires: python-pytz >= 2016.7
|
||||
Requires: python-vine >= 5.0.0
|
||||
Requires(post): update-alternatives
|
||||
Requires(postun): update-alternatives
|
||||
Recommends: python-curses
|
||||
Requires(postun):update-alternatives
|
||||
Recommends: python-cryptography
|
||||
Recommends: python-curses
|
||||
Suggests: python-eventlet
|
||||
Suggests: python-gevent
|
||||
Suggests: python-pymongo
|
||||
@@ -58,8 +59,8 @@ Suggests: python-python-daemon
|
||||
Suggests: python-pytyrant
|
||||
BuildArch: noarch
|
||||
%if %{with test}
|
||||
BuildRequires: %{python_module SQLAlchemy}
|
||||
BuildRequires: %{python_module PyYAML}
|
||||
BuildRequires: %{python_module SQLAlchemy}
|
||||
BuildRequires: %{python_module boto3 >= 1.9.178}
|
||||
BuildRequires: %{python_module case >= 1.3.1}
|
||||
BuildRequires: %{python_module celery = %{version}}
|
||||
|
||||
75
relax-click.patch
Normal file
75
relax-click.patch
Normal file
@@ -0,0 +1,75 @@
|
||||
From ef026ea44f59e5d234c195c3ce73927f8323f9ee Mon Sep 17 00:00:00 2001
|
||||
From: Thomas Grainger <tagrain@gmail.com>
|
||||
Date: Tue, 20 Jul 2021 17:19:02 +0100
|
||||
Subject: [PATCH] relaxed click version (#6861)
|
||||
|
||||
* relaxed click version
|
||||
|
||||
* fix get_default
|
||||
|
||||
* pre-check WorkersPool click.Choice type before calling super
|
||||
|
||||
https://github.com/pallets/click/issues/1898#issuecomment-841546735
|
||||
|
||||
* apply pre-commit run --all-files
|
||||
|
||||
Co-authored-by: Asif Saif Uddin <auvipy@gmail.com>
|
||||
---
|
||||
celery/bin/base.py | 4 ++--
|
||||
celery/bin/worker.py | 4 ++++
|
||||
requirements/default.txt | 4 ++--
|
||||
3 files changed, 8 insertions(+), 4 deletions(-)
|
||||
|
||||
Index: celery-5.0.5/celery/bin/base.py
|
||||
===================================================================
|
||||
--- celery-5.0.5.orig/celery/bin/base.py
|
||||
+++ celery-5.0.5/celery/bin/base.py
|
||||
@@ -137,10 +137,10 @@ def handle_preload_options(f):
|
||||
class CeleryOption(click.Option):
|
||||
"""Customized option for Celery."""
|
||||
|
||||
- def get_default(self, ctx):
|
||||
+ def get_default(self, ctx, *args, **kwargs):
|
||||
if self.default_value_from_context:
|
||||
self.default = ctx.obj[self.default_value_from_context]
|
||||
- return super().get_default(ctx)
|
||||
+ return super().get_default(ctx, *args, **kwargs)
|
||||
|
||||
def __init__(self, *args, **kwargs):
|
||||
"""Initialize a Celery option."""
|
||||
Index: celery-5.0.5/celery/bin/worker.py
|
||||
===================================================================
|
||||
--- celery-5.0.5.orig/celery/bin/worker.py
|
||||
+++ celery-5.0.5/celery/bin/worker.py
|
||||
@@ -11,6 +11,7 @@ from celery import concurrency
|
||||
from celery.bin.base import (COMMA_SEPARATED_LIST, LOG_LEVEL,
|
||||
CeleryDaemonCommand, CeleryOption,
|
||||
handle_preload_options)
|
||||
+from celery.concurrency.base import BasePool
|
||||
from celery.platforms import (EX_FAILURE, EX_OK, detached,
|
||||
maybe_drop_privileges)
|
||||
from celery.utils.log import get_logger
|
||||
@@ -44,6 +45,9 @@ class WorkersPool(click.Choice):
|
||||
def convert(self, value, param, ctx):
|
||||
# Pools like eventlet/gevent needs to patch libs as early
|
||||
# as possible.
|
||||
+ if isinstance(value, type) and issubclass(value, BasePool):
|
||||
+ return value
|
||||
+
|
||||
return concurrency.get_implementation(
|
||||
value) or ctx.obj.app.conf.worker_pool
|
||||
|
||||
Index: celery-5.0.5/requirements/default.txt
|
||||
===================================================================
|
||||
--- celery-5.0.5.orig/requirements/default.txt
|
||||
+++ celery-5.0.5/requirements/default.txt
|
||||
@@ -2,7 +2,7 @@ pytz>dev
|
||||
billiard>=3.6.3.0,<4.0
|
||||
kombu>=5.0.0,<6.0
|
||||
vine>=5.0.0,<6.0
|
||||
-click>=7.0,<8.0
|
||||
+click>=8.0,<9.0
|
||||
click-didyoumean>=0.0.3
|
||||
-click-repl>=0.1.6
|
||||
+click-repl>=0.2.0
|
||||
click-plugins>=1.1.1
|
||||
Reference in New Issue
Block a user