diff --git a/0001-Correct-update_job-to-raise-with-job-id.patch b/0001-Correct-update_job-to-raise-with-job-id.patch new file mode 100644 index 0000000..fb95844 --- /dev/null +++ b/0001-Correct-update_job-to-raise-with-job-id.patch @@ -0,0 +1,22 @@ +From faef2bd7017f4414510b075fe71d6b43f8f2fdfc Mon Sep 17 00:00:00 2001 +From: Ugrend +Date: Fri, 14 Dec 2018 09:23:25 +1100 +Subject: [PATCH] Correct update_job to raise with job id + +--- + apscheduler/jobstores/sqlalchemy.py | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/apscheduler/jobstores/sqlalchemy.py b/apscheduler/jobstores/sqlalchemy.py +index beb27fb..fecbd83 100644 +--- a/apscheduler/jobstores/sqlalchemy.py ++++ b/apscheduler/jobstores/sqlalchemy.py +@@ -106,7 +106,7 @@ def update_job(self, job): + }).where(self.jobs_t.c.id == job.id) + result = self.engine.execute(update) + if result.rowcount == 0: +- raise JobLookupError(id) ++ raise JobLookupError(job.id) + + def remove_job(self, job_id): + delete = self.jobs_t.delete().where(self.jobs_t.c.id == job_id) diff --git a/APScheduler-3.5.1.tar.gz b/APScheduler-3.5.1.tar.gz deleted file mode 100644 index 2fd9e0c..0000000 --- a/APScheduler-3.5.1.tar.gz +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:952c8f46a11f32b9d5bfbe3e347dac2cdf0680d8b4799590dc9c3a9865b73b65 -size 93129 diff --git a/APScheduler-3.5.3.tar.gz b/APScheduler-3.5.3.tar.gz new file mode 100644 index 0000000..13e0700 --- /dev/null +++ b/APScheduler-3.5.3.tar.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:6599bc78901ee7e9be85cbd073d9cc155c42d2bc867c5cde4d4d1cc339ebfbeb +size 95527 diff --git a/fix-tests.patch b/fix-tests.patch new file mode 100644 index 0000000..de010e3 --- /dev/null +++ b/fix-tests.patch @@ -0,0 +1,40 @@ +From: Antonio Larrosa " + + def test_repr(self, trigger): +- assert repr(trigger) == ("") ++ assert (repr(trigger) == ("") or ++ repr(trigger) == ("")) ++ + + def test_str(self, trigger): + assert str(trigger) == "interval[0:00:01]" +Index: APScheduler-3.5.3/tests/test_schedulers.py +=================================================================== +--- APScheduler-3.5.3.orig/tests/test_schedulers.py ++++ APScheduler-3.5.3/tests/test_schedulers.py +@@ -729,7 +729,9 @@ Jobstore other: + + def test_create_trigger_bad_plugin_type(self, scheduler): + scheduler._trigger_classes = {} +- scheduler._trigger_plugins = {'dummy': MagicMock(return_value=object)} ++ mock = MagicMock() ++ mock.load = MagicMock(return_value=object) ++ scheduler._trigger_plugins = {'dummy': mock} + exc = pytest.raises(TypeError, scheduler._create_trigger, 'dummy', {}) + assert str(exc.value) == 'The trigger entry point does not point to a trigger class' + diff --git a/python-APScheduler.changes b/python-APScheduler.changes index b513679..104a998 100644 --- a/python-APScheduler.changes +++ b/python-APScheduler.changes @@ -1,3 +1,22 @@ +------------------------------------------------------------------- +Sun Feb 3 16:13:03 UTC 2019 - Antonio Larrosa + +- update to 3.5.3 + * Fixed regression introduced in 3.5.2: Class methods were mistaken + for instance methods and thus were broken during serialization + * Fixed callable name detection for methods in old style classes +- update to 3.5.2 + * Fixed scheduling of bound methods on persistent job stores (the + workaround of scheduling YourClass.methodname along with an + explicit self argument is no longer necessary as this is now done + automatically for you) + * Added the FAQ section to the docs + * Made BaseScheduler.start() raise a RuntimeError if running under + uWSGI with threads disabled +- Add fix-tests.patch to fix tests that fail with python 3.7 +- Add 0001-Correct-update_job-to-raise-with-job-id.patch from upstream + to fix a wrong variable being used. + ------------------------------------------------------------------- Thu Oct 18 08:02:10 UTC 2018 - Tomáš Chvátal diff --git a/python-APScheduler.spec b/python-APScheduler.spec index 9c4b29f..de4bbe0 100644 --- a/python-APScheduler.spec +++ b/python-APScheduler.spec @@ -1,7 +1,7 @@ # # spec file for package python-APScheduler # -# Copyright (c) 2018 SUSE LINUX GmbH, Nuernberg, Germany. +# Copyright (c) 2019 SUSE LINUX GmbH, Nuernberg, Germany. # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -18,13 +18,17 @@ %{?!python_module:%define python_module() python-%{**} python3-%{**}} Name: python-APScheduler -Version: 3.5.1 +Version: 3.5.3 Release: 0 Summary: In-process task scheduler with Cron-like capabilities License: MIT Group: Development/Languages/Python URL: http://pypi.python.org/pypi/APScheduler/ Source: https://files.pythonhosted.org/packages/source/A/APScheduler/APScheduler-%{version}.tar.gz +# PATCH-FIX-UPSTREAM fix-tests.patch -- Fix python 3.7 incompatibilities +Patch0: fix-tests.patch +# PATCH-FIX-UPSTREAM 0001-Correct-update_job-to-raise-with-job-id.patch +Patch1: 0001-Correct-update_job-to-raise-with-job-id.patch BuildRequires: %{python_module SQLAlchemy >= 0.8} BuildRequires: %{python_module Twisted} BuildRequires: %{python_module gevent} @@ -84,6 +88,8 @@ APscheduler provides multiple job stores. %prep %setup -q -n APScheduler-%{version} +%patch0 -p1 +%patch1 -p1 # we don't want the tweaked pytest config options rm setup.cfg