forked from pool/python-APScheduler
- Update to 3.6.0:
* Adapted RedisJobStore to v3.0 of the redis library * Adapted RethinkDBJobStore to v2.4 of the rethink library * Fixed DeprecationWarnings about collections.abc on Python 3.7 (PR by Roman Levin) - Remove merged patches: * fix-tests.patch * 0001-Correct-update_job-to-raise-with-job-id.patch OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-APScheduler?expand=0&rev=22
This commit is contained in:
committed by
Git OBS Bridge
parent
56a530c2f8
commit
2fe17ddda2
@@ -1,22 +0,0 @@
|
|||||||
From faef2bd7017f4414510b075fe71d6b43f8f2fdfc Mon Sep 17 00:00:00 2001
|
|
||||||
From: Ugrend <Ugrend@users.noreply.github.com>
|
|
||||||
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)
|
|
@@ -1,3 +0,0 @@
|
|||||||
version https://git-lfs.github.com/spec/v1
|
|
||||||
oid sha256:6599bc78901ee7e9be85cbd073d9cc155c42d2bc867c5cde4d4d1cc339ebfbeb
|
|
||||||
size 95527
|
|
3
APScheduler-3.6.0.tar.gz
Normal file
3
APScheduler-3.6.0.tar.gz
Normal file
@@ -0,0 +1,3 @@
|
|||||||
|
version https://git-lfs.github.com/spec/v1
|
||||||
|
oid sha256:8f56b888fdc9dc57dd18d79c124b5093a01e29144be84e3e99130600eea34260
|
||||||
|
size 97112
|
@@ -1,40 +0,0 @@
|
|||||||
From: Antonio Larrosa <alarrosa@suse.com
|
|
||||||
Subject: Fix false positive tests
|
|
||||||
|
|
||||||
Fix two tests that fail with python 3.7
|
|
||||||
Index: APScheduler-3.5.3/tests/test_triggers.py
|
|
||||||
===================================================================
|
|
||||||
--- APScheduler-3.5.3.orig/tests/test_triggers.py
|
|
||||||
+++ APScheduler-3.5.3/tests/test_triggers.py
|
|
||||||
@@ -538,9 +538,13 @@ class TestIntervalTrigger(object):
|
|
||||||
assert repr(trigger) == "<CronTrigger (day='1-2,4-7', timezone='Europe/Berlin')>"
|
|
||||||
|
|
||||||
def test_repr(self, trigger):
|
|
||||||
- assert repr(trigger) == ("<IntervalTrigger (interval=datetime.timedelta(0, 1), "
|
|
||||||
- "start_date='2009-08-04 00:00:02 CEST', "
|
|
||||||
- "timezone='Europe/Berlin')>")
|
|
||||||
+ assert (repr(trigger) == ("<IntervalTrigger (interval=datetime.timedelta(0, 1), "
|
|
||||||
+ "start_date='2009-08-04 00:00:02 CEST', "
|
|
||||||
+ "timezone='Europe/Berlin')>") or
|
|
||||||
+ repr(trigger) == ("<IntervalTrigger (interval=datetime.timedelta(seconds=1), "
|
|
||||||
+ "start_date='2009-08-04 00:00:02 CEST', "
|
|
||||||
+ "timezone='Europe/Berlin')>"))
|
|
||||||
+
|
|
||||||
|
|
||||||
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'
|
|
||||||
|
|
@@ -1,3 +1,14 @@
|
|||||||
|
-------------------------------------------------------------------
|
||||||
|
Tue Mar 19 14:30:17 UTC 2019 - Tomáš Chvátal <tchvatal@suse.com>
|
||||||
|
|
||||||
|
- Update to 3.6.0:
|
||||||
|
* Adapted RedisJobStore to v3.0 of the redis library
|
||||||
|
* Adapted RethinkDBJobStore to v2.4 of the rethink library
|
||||||
|
* Fixed DeprecationWarnings about collections.abc on Python 3.7 (PR by Roman Levin)
|
||||||
|
- Remove merged patches:
|
||||||
|
* fix-tests.patch
|
||||||
|
* 0001-Correct-update_job-to-raise-with-job-id.patch
|
||||||
|
|
||||||
-------------------------------------------------------------------
|
-------------------------------------------------------------------
|
||||||
Sun Feb 3 16:13:03 UTC 2019 - Antonio Larrosa <alarrosa@suse.com>
|
Sun Feb 3 16:13:03 UTC 2019 - Antonio Larrosa <alarrosa@suse.com>
|
||||||
|
|
||||||
|
@@ -18,17 +18,13 @@
|
|||||||
|
|
||||||
%{?!python_module:%define python_module() python-%{**} python3-%{**}}
|
%{?!python_module:%define python_module() python-%{**} python3-%{**}}
|
||||||
Name: python-APScheduler
|
Name: python-APScheduler
|
||||||
Version: 3.5.3
|
Version: 3.6.0
|
||||||
Release: 0
|
Release: 0
|
||||||
Summary: In-process task scheduler with Cron-like capabilities
|
Summary: In-process task scheduler with Cron-like capabilities
|
||||||
License: MIT
|
License: MIT
|
||||||
Group: Development/Languages/Python
|
Group: Development/Languages/Python
|
||||||
URL: http://pypi.python.org/pypi/APScheduler/
|
URL: https://github.com/agronholm/apscheduler
|
||||||
Source: https://files.pythonhosted.org/packages/source/A/APScheduler/APScheduler-%{version}.tar.gz
|
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 SQLAlchemy >= 0.8}
|
||||||
BuildRequires: %{python_module Twisted}
|
BuildRequires: %{python_module Twisted}
|
||||||
BuildRequires: %{python_module gevent}
|
BuildRequires: %{python_module gevent}
|
||||||
@@ -88,8 +84,6 @@ APscheduler provides multiple job stores.
|
|||||||
|
|
||||||
%prep
|
%prep
|
||||||
%setup -q -n APScheduler-%{version}
|
%setup -q -n APScheduler-%{version}
|
||||||
%patch0 -p1
|
|
||||||
%patch1 -p1
|
|
||||||
# we don't want the tweaked pytest config options
|
# we don't want the tweaked pytest config options
|
||||||
rm setup.cfg
|
rm setup.cfg
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user