From 8b49d383a16e320e43de654976299b8e59299ba75253373260717840d795543f Mon Sep 17 00:00:00 2001 From: Dirk Mueller Date: Thu, 30 Mar 2023 08:31:37 +0000 Subject: [PATCH] - update to 0.7: * Support passing multiple or keyword arguments by disabling Celery's ``typing`` feature for ``Batches`` tasks. * Support |using a custom Request class|_ for ``Batches`` tasks. * Support calling tasks with an ``eta`` or ``countdown`` specified. * Handle "hybrid" messages that have moved between Celery versions. * Fix task ETA issues when timezone is defined in configuration. * Simplify tests. * Improve PyPI metadata. * Update README badges to include PyPI and GitHub Actions * Update copyright information. * Document use-cases and include more examples. * Run the unit tests against RabbitMQ & Redis brokers/backends. * Run `black `_, `isort `_, * `flake8 `_, `pyupgrade `_, * Fix a bug when passing a ``request`` to ``mark_as_done`` with Celery 5.1.0. * Clean-up and re-organize code. * Support Celery 5.2. * Drop support for Python 3.6. * Support Python 3.10. OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-celery-batches?expand=0&rev=11 --- celery-batches-0.4.tar.gz | 3 --- celery-batches-0.7.tar.gz | 3 +++ celery-fixtures.patch | 21 +++++++++++++-------- python-celery-batches.changes | 31 +++++++++++++++++++++++++++++++ python-celery-batches.spec | 21 +++++++++------------ 5 files changed, 56 insertions(+), 23 deletions(-) delete mode 100644 celery-batches-0.4.tar.gz create mode 100644 celery-batches-0.7.tar.gz diff --git a/celery-batches-0.4.tar.gz b/celery-batches-0.4.tar.gz deleted file mode 100644 index fc9bed1..0000000 --- a/celery-batches-0.4.tar.gz +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:da30ecedc03074ae8c15f5f5c00a63a57910df2b51f00a5441bac5ac39e3d229 -size 12162 diff --git a/celery-batches-0.7.tar.gz b/celery-batches-0.7.tar.gz new file mode 100644 index 0000000..510b6b8 --- /dev/null +++ b/celery-batches-0.7.tar.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:0fc42b0c90cfb2861f69652949f1602cc1fae922134244df3f507dca490e54f0 +size 17939 diff --git a/celery-fixtures.patch b/celery-fixtures.patch index 8943e90..70bd699 100644 --- a/celery-fixtures.patch +++ b/celery-fixtures.patch @@ -1,13 +1,18 @@ -Index: celery-batches-0.4/t/integration/test_batches.py +Index: celery-batches-0.7/t/integration/test_batches.py =================================================================== ---- celery-batches-0.4.orig/t/integration/test_batches.py -+++ celery-batches-0.4/t/integration/test_batches.py -@@ -7,6 +7,8 @@ from celery import signals +--- celery-batches-0.7.orig/t/integration/test_batches.py ++++ celery-batches-0.7/t/integration/test_batches.py +@@ -6,11 +6,13 @@ from celery_batches import Batches, Simp + + from celery import Celery, signals, states from celery.app.task import Task - from celery.result import allow_join_result - from celery.contrib.testing.tasks import ping -+# some fixtures +from celery.contrib.pytest import * + from celery.contrib.testing.tasks import ping + from celery.contrib.testing.worker import TestWorkController + from celery.result import allow_join_result + from celery.worker.request import Request - from .tasks import add, cumadd, Results ++ + import pytest + from .tasks import add, cumadd diff --git a/python-celery-batches.changes b/python-celery-batches.changes index 9bddd81..6e37110 100644 --- a/python-celery-batches.changes +++ b/python-celery-batches.changes @@ -1,3 +1,34 @@ +------------------------------------------------------------------- +Thu Mar 30 08:18:18 UTC 2023 - Dirk Müller + +- update to 0.7: + * Support passing multiple or keyword arguments by disabling + Celery's ``typing`` feature for ``Batches`` tasks. + * Support |using a custom Request class|_ for ``Batches`` + tasks. + * Support calling tasks with an ``eta`` or ``countdown`` + specified. + * Handle "hybrid" messages that have moved between Celery + versions. + * Fix task ETA issues when timezone is defined in + configuration. + * Simplify tests. + * Improve PyPI metadata. + * Update README badges to include PyPI and GitHub Actions + * Update copyright information. + * Document use-cases and include more examples. + * Run the unit tests against RabbitMQ & Redis brokers/backends. + * Run `black `_, `isort + `_, + * `flake8 `_, `pyupgrade + `_, + * Fix a bug when passing a ``request`` to ``mark_as_done`` with + Celery 5.1.0. + * Clean-up and re-organize code. + * Support Celery 5.2. + * Drop support for Python 3.6. + * Support Python 3.10. + ------------------------------------------------------------------- Tue Jan 26 13:07:49 UTC 2021 - Markéta Machová diff --git a/python-celery-batches.spec b/python-celery-batches.spec index 3726abd..01cf92b 100644 --- a/python-celery-batches.spec +++ b/python-celery-batches.spec @@ -1,7 +1,7 @@ # -# spec file for package python-celery-batches +# spec file # -# Copyright (c) 2021 SUSE LLC +# Copyright (c) 2023 SUSE LLC # Copyright (c) 2018 Matthias Fehring # # All modifications and additions to the file contributed by third parties @@ -20,7 +20,7 @@ %{?!python_module:%define python_module() python-%{**} python3-%{**}} %define _pkgname celery-batches Name: python-%{_pkgname} -Version: 0.4 +Version: 0.7 Release: 0 Summary: Django module to process multiple Celery task requests together License: BSD-3-Clause @@ -28,11 +28,13 @@ Group: Development/Languages/Python URL: https://github.com/percipient/celery-batches Source: https://github.com/percipient/%{_pkgname}/archive/v%{version}.tar.gz#/%{_pkgname}-%{version}.tar.gz Patch0: celery-fixtures.patch +BuildRequires: %{python_module base >= 3.7} BuildRequires: %{python_module celery >= 4.4} BuildRequires: %{python_module coverage} +BuildRequires: %{python_module pip} BuildRequires: %{python_module pytest} BuildRequires: %{python_module pytz} -BuildRequires: %{python_module setuptools} +BuildRequires: %{python_module wheel} BuildRequires: fdupes BuildRequires: python-rpm-macros Requires: python-celery >= 4.4 @@ -47,18 +49,13 @@ the standard way of doing things in Django, so that it still works with any other form application. %prep -%setup -q -n %{_pkgname}-%{version} -%patch0 -p1 +%autosetup -p1 -n %{_pkgname}-%{version} %build -%python_build +%pyproject_wheel %install -%python_install -# Remove test suite -%{python_expand rm -r %{buildroot}%{$python_sitelib}/t/ -%fdupes %{buildroot}%{$python_sitelib} -} +%pyproject_install %check %pytest t/