1
0

Compare commits

8 Commits

Author SHA256 Message Date
60ed3dd457 Accepting request 1331656 from devel:languages:python
- Added fix_test_callback.patch: to fix JobCallbackTestCase for modern RQ versions
  (gh#rq/rq-scheduler#328)

OBS-URL: https://build.opensuse.org/request/show/1331656
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/python-rq-scheduler?expand=0&rev=5
2026-02-06 18:10:16 +00:00
3809026b2f OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-rq-scheduler?expand=0&rev=14 2026-02-06 12:48:32 +00:00
28a6c88d4e - Added fix_test_callback.patch: to fix JobCallbackTestCase for modern RQ versions
(gh#rq/rq-scheduler#328)

OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-rq-scheduler?expand=0&rev=13
2026-02-06 09:42:54 +00:00
dfd8ef6997 Accepting request 1238942 from devel:languages:python
OBS-URL: https://build.opensuse.org/request/show/1238942
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/python-rq-scheduler?expand=0&rev=4
2025-01-20 16:14:41 +00:00
549fdac495 - Add %{?sle15_python_module_pythons}
OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-rq-scheduler?expand=0&rev=11
2025-01-20 09:00:01 +00:00
d400a6430c Accepting request 1224652 from devel:languages:python
- Update to 1.14
  * Support for RQ 2.0. Thanks @selwin!
- Drop rq-compat-removal.patch (rq-compat not in upstream anymore)

OBS-URL: https://build.opensuse.org/request/show/1224652
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/python-rq-scheduler?expand=0&rev=3
2024-11-18 19:00:49 +00:00
65790814fb OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-rq-scheduler?expand=0&rev=9 2024-11-17 11:08:08 +00:00
e948810c4c Accepting request 1224484 from home:nkrapp:branches:devel:languages:python
- Update to 1.14
  * Support for RQ 2.0. Thanks @selwin!
- Drop rq-compat-removal.patch (rq-compat not in upstream anymore)

OBS-URL: https://build.opensuse.org/request/show/1224484
OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-rq-scheduler?expand=0&rev=8
2024-11-17 11:02:42 +00:00
6 changed files with 55 additions and 50 deletions

24
fix_test_callback.patch Normal file
View File

@@ -0,0 +1,24 @@
Index: rq-scheduler-0.14/tests/test_callbacks.py
===================================================================
--- rq-scheduler-0.14.orig/tests/test_callbacks.py
+++ rq-scheduler-0.14/tests/test_callbacks.py
@@ -108,7 +108,8 @@ class JobCallbackTestCase(RQTestCase):
self.assertEqual(job._success_callback, UNEVALUATED)
self.assertEqual(job.success_callback, None)
# _success_callback becomes `None` after `job.success_callback` is called if there's no success callback
- self.assertEqual(job._success_callback, None)
+ self.assertIsNotNone(job._success_callback)
+ self.assertEqual(job.success_callback, None)
# job.success_callback is assigned properly
job = Job.create(say_hello, on_success=print, connection=self.testconn)
@@ -127,7 +128,8 @@ class JobCallbackTestCase(RQTestCase):
self.assertEqual(job._failure_callback, UNEVALUATED)
self.assertEqual(job.failure_callback, None)
# _failure_callback becomes `None` after `job.failure_callback` is called if there's no failure callback
- self.assertEqual(job._failure_callback, None)
+ self.assertIsNotNone(job._failure_callback)
+ self.assertEqual(job.failure_callback, None)
# job.failure_callback is assigned properly
job = Job.create(say_hello, on_failure=print, connection=self.testconn)

View File

@@ -1,3 +1,21 @@
-------------------------------------------------------------------
Fri Feb 6 08:52:39 UTC 2026 - Marius Grossu <marius.grossu@suse.com>
- Added fix_test_callback.patch: to fix JobCallbackTestCase for modern RQ versions
(gh#rq/rq-scheduler#328)
-------------------------------------------------------------------
Sat Jan 18 11:29:45 UTC 2025 - ecsos <ecsos@opensuse.org>
- Add %{?sle15_python_module_pythons}
-------------------------------------------------------------------
Fri Nov 15 15:04:44 UTC 2024 - Nico Krapp <nico.krapp@suse.com>
- Update to 1.14
* Support for RQ 2.0. Thanks @selwin!
- Drop rq-compat-removal.patch (rq-compat not in upstream anymore)
-------------------------------------------------------------------
Wed Dec 6 22:44:42 UTC 2023 - Dirk Müller <dmueller@suse.com>

View File

@@ -1,7 +1,7 @@
#
# spec file for package python-rq-scheduler
#
# Copyright (c) 2023 SUSE LLC
# Copyright (c) 2026 SUSE LLC and contributors
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
@@ -16,14 +16,17 @@
#
%define long_version 0.14.0
%{?sle15_python_module_pythons}
Name: python-rq-scheduler
Version: 0.13.1
Version: 0.14
Release: 0
Summary: Provides job scheduling capabilities to RQ (Redis Queue)
License: MIT
URL: https://github.com/rq/rq-scheduler
Source: https://github.com/rq/rq-scheduler/archive/refs/tags/v%{version}.tar.gz#/rq-scheduler-%{version}-gh.tar.gz
Patch1: rq-compat-removal.patch
# PATCH-FIX-UPSTREAM fix_test_callback.patch -- based on PR 328
Patch0: fix_test_callback.patch
BuildRequires: %{python_module pip}
BuildRequires: %{python_module setuptools}
BuildRequires: %{python_module wheel}
@@ -42,7 +45,7 @@ Requires: python-freezegun
Requires: python-python-dateutil
Requires: python-rq >= 0.13
Requires(post): update-alternatives
Requires(postun):update-alternatives
Requires(postun): update-alternatives
BuildArch: noarch
%python_subpackages
@@ -51,6 +54,8 @@ Provides job scheduling capabilities to RQ (Redis Queue)
%prep
%autosetup -p1 -n rq-scheduler-%{version}
sed -E -i "1{s|^#\!\s*/usr/bin/env python$|#\!%{_bindir}/python3|}" rq_scheduler/scripts/rqscheduler.py
sed -E -i "1{s|^#\!\s*/usr/bin/env python$|#\!%{_bindir}/python3|}" run_tests.py
%build
%pyproject_wheel
@@ -77,6 +82,6 @@ trap "kill $spid || true" EXIT
%license LICENSE.txt
%python_alternative %{_bindir}/rqscheduler
%{python_sitelib}/rq_scheduler
%{python_sitelib}/rq_scheduler-%{version}.dist-info
%{python_sitelib}/rq_scheduler-%{long_version}.dist-info
%changelog

View File

@@ -1,42 +0,0 @@
Index: rq-scheduler-0.13.1/tests/fixtures.py
===================================================================
--- rq-scheduler-0.13.1.orig/tests/fixtures.py
+++ rq-scheduler-0.13.1/tests/fixtures.py
@@ -17,7 +17,6 @@ from multiprocessing import Process
from redis import Redis
from rq import Connection, get_current_job, get_current_connection, Queue
from rq.decorators import job
-from rq.compat import text_type
from rq.worker import HerokuWorker, Worker
@@ -39,7 +38,7 @@ async def say_hello_async(name=None):
def say_hello_unicode(name=None):
"""A job with a single argument and a return value."""
- return text_type(say_hello(name)) # noqa
+ return str(say_hello(name)) # noqa
def do_nothing():
Index: rq-scheduler-0.13.1/tests/test_scheduler.py
===================================================================
--- rq-scheduler-0.13.1.orig/tests/test_scheduler.py
+++ rq-scheduler-0.13.1/tests/test_scheduler.py
@@ -10,7 +10,6 @@ import freezegun
from dateutil.tz import tzlocal
from dateutil.tz import UTC
from rq import Queue
-from rq.compat import as_text
from rq.job import Job
from rq_scheduler import Scheduler
@@ -28,7 +27,7 @@ def say_hello(name=None):
def tl(l):
- return [as_text(i) for i in l]
+ return [str(i) for i in l]
def simple_addition(x, y, z):

View File

@@ -1,3 +0,0 @@
version https://git-lfs.github.com/spec/v1
oid sha256:f51dd86d31a196b3246b0f7492445ff07816804b621a4c49c1c293b304cdd6a6
size 23549

View File

@@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:71e8ac1d1e202f0f22f766fa3e3e0c593faa8aa09f85f440464a98d805b8bf77
size 23117