Hello community, here is the log from the commit of package python-APScheduler for openSUSE:Factory checked in at 2019-11-06 14:04:31 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/python-APScheduler (Old) and /work/SRC/openSUSE:Factory/.python-APScheduler.new.2990 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "python-APScheduler" Wed Nov 6 14:04:31 2019 rev:9 rq:745282 version:3.6.2 Changes: -------- --- /work/SRC/openSUSE:Factory/python-APScheduler/python-APScheduler.changes 2019-09-07 11:50:39.906297631 +0200 +++ /work/SRC/openSUSE:Factory/.python-APScheduler.new.2990/python-APScheduler.changes 2019-11-06 14:04:42.012697746 +0100 @@ -1,0 +2,13 @@ +Mon Nov 4 23:50:32 CET 2019 - Matej Cepl <mc...@suse.com> + +- Update to 3.6.2, which fixes (together with the patch + compat-pytest4+.patch, which replaces pytest4.patch) + incompatibility with pytest 4+. gh#agronholm/apscheduler#401 + +------------------------------------------------------------------- +Mon Nov 4 13:30:55 CET 2019 - Matej Cepl <mc...@suse.com> + +- Add pytest4.patch to make test suite work even with pytest 4. + gh#agronholm/apscheduler#401 + +------------------------------------------------------------------- Old: ---- APScheduler-3.6.1.tar.gz New: ---- APScheduler-3.6.2.tar.gz compat-pytest4+.patch ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ python-APScheduler.spec ++++++ --- /var/tmp/diff_new_pack.TkGARA/_old 2019-11-06 14:04:44.040699869 +0100 +++ /var/tmp/diff_new_pack.TkGARA/_new 2019-11-06 14:04:44.040699869 +0100 @@ -18,18 +18,21 @@ %{?!python_module:%define python_module() python-%{**} python3-%{**}} Name: python-APScheduler -Version: 3.6.1 +Version: 3.6.2 Release: 0 Summary: In-process task scheduler with Cron-like capabilities License: MIT Group: Development/Languages/Python URL: https://github.com/agronholm/apscheduler Source: https://files.pythonhosted.org/packages/source/A/APScheduler/APScheduler-%{version}.tar.gz +# PATCH-FIX-UPSTREAM compat-pytest4+.patch gh#agronholm/apscheduler#401 mc...@suse.com +# fix the test suite to be compatible with pytest4+ +Patch0: compat-pytest4+.patch BuildRequires: %{python_module SQLAlchemy >= 0.8} BuildRequires: %{python_module Twisted} BuildRequires: %{python_module gevent} BuildRequires: %{python_module pytest-tornado} -BuildRequires: %{python_module pytest < 4} +BuildRequires: %{python_module pytest} BuildRequires: %{python_module pytz} BuildRequires: %{python_module setuptools >= 0.7} BuildRequires: %{python_module setuptools_scm} @@ -84,6 +87,8 @@ %prep %setup -q -n APScheduler-%{version} +%autopatch -p1 + # we don't want the tweaked pytest config options rm setup.cfg @@ -95,7 +100,7 @@ %python_expand %fdupes %{buildroot}%{$python_sitelib} %check -%python_expand PYTHONPATH=%{buildroot}%{$python_sitelib} py.test-%{$python_bin_suffix} -v +%pytest %files %{python_files} %license LICENSE.txt ++++++ APScheduler-3.6.1.tar.gz -> APScheduler-3.6.2.tar.gz ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/APScheduler-3.6.1/APScheduler.egg-info/PKG-INFO new/APScheduler-3.6.2/APScheduler.egg-info/PKG-INFO --- old/APScheduler-3.6.1/APScheduler.egg-info/PKG-INFO 2019-07-19 12:09:59.000000000 +0200 +++ new/APScheduler-3.6.2/APScheduler.egg-info/PKG-INFO 2019-11-04 21:43:05.000000000 +0100 @@ -1,6 +1,6 @@ Metadata-Version: 2.1 Name: APScheduler -Version: 3.6.1 +Version: 3.6.2 Summary: In-process task scheduler with Cron-like capabilities Home-page: https://github.com/agronholm/apscheduler Author: Alex Grönholm @@ -95,14 +95,14 @@ Classifier: Programming Language :: Python :: 3.5 Classifier: Programming Language :: Python :: 3.6 Classifier: Programming Language :: Python :: 3.7 -Provides-Extra: mongodb +Provides-Extra: asyncio Provides-Extra: gevent +Provides-Extra: mongodb Provides-Extra: redis -Provides-Extra: asyncio Provides-Extra: rethinkdb -Provides-Extra: testing Provides-Extra: sqlalchemy -Provides-Extra: zookeeper -Provides-Extra: doc Provides-Extra: tornado Provides-Extra: twisted +Provides-Extra: zookeeper +Provides-Extra: testing +Provides-Extra: doc diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/APScheduler-3.6.1/APScheduler.egg-info/SOURCES.txt new/APScheduler-3.6.2/APScheduler.egg-info/SOURCES.txt --- old/APScheduler-3.6.1/APScheduler.egg-info/SOURCES.txt 2019-07-19 12:09:59.000000000 +0200 +++ new/APScheduler-3.6.2/APScheduler.egg-info/SOURCES.txt 2019-11-04 21:43:06.000000000 +0100 @@ -117,4 +117,5 @@ tests/test_jobstores.py tests/test_schedulers.py tests/test_triggers.py -tests/test_util.py \ No newline at end of file +tests/test_util.py +tests/test_util_py35.py \ No newline at end of file diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/APScheduler-3.6.1/PKG-INFO new/APScheduler-3.6.2/PKG-INFO --- old/APScheduler-3.6.1/PKG-INFO 2019-07-19 12:09:59.000000000 +0200 +++ new/APScheduler-3.6.2/PKG-INFO 2019-11-04 21:43:06.000000000 +0100 @@ -1,6 +1,6 @@ Metadata-Version: 2.1 Name: APScheduler -Version: 3.6.1 +Version: 3.6.2 Summary: In-process task scheduler with Cron-like capabilities Home-page: https://github.com/agronholm/apscheduler Author: Alex Grönholm @@ -95,14 +95,14 @@ Classifier: Programming Language :: Python :: 3.5 Classifier: Programming Language :: Python :: 3.6 Classifier: Programming Language :: Python :: 3.7 -Provides-Extra: mongodb +Provides-Extra: asyncio Provides-Extra: gevent +Provides-Extra: mongodb Provides-Extra: redis -Provides-Extra: asyncio Provides-Extra: rethinkdb -Provides-Extra: testing Provides-Extra: sqlalchemy -Provides-Extra: zookeeper -Provides-Extra: doc Provides-Extra: tornado Provides-Extra: twisted +Provides-Extra: zookeeper +Provides-Extra: testing +Provides-Extra: doc diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/APScheduler-3.6.1/apscheduler/executors/asyncio.py new/APScheduler-3.6.2/apscheduler/executors/asyncio.py --- old/APScheduler-3.6.1/apscheduler/executors/asyncio.py 2019-07-19 12:09:36.000000000 +0200 +++ new/APScheduler-3.6.2/apscheduler/executors/asyncio.py 2019-11-04 21:42:44.000000000 +0100 @@ -3,12 +3,11 @@ import sys from apscheduler.executors.base import BaseExecutor, run_job +from apscheduler.util import iscoroutinefunction_partial try: - from asyncio import iscoroutinefunction from apscheduler.executors.base_py3 import run_coroutine_job except ImportError: - from trollius import iscoroutinefunction run_coroutine_job = None @@ -46,7 +45,7 @@ else: self._run_job_success(job.id, events) - if iscoroutinefunction(job.func): + if iscoroutinefunction_partial(job.func): if run_coroutine_job is not None: coro = run_coroutine_job(job, job._jobstore_alias, run_times, self._logger.name) f = self._eventloop.create_task(coro) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/APScheduler-3.6.1/apscheduler/executors/tornado.py new/APScheduler-3.6.2/apscheduler/executors/tornado.py --- old/APScheduler-3.6.1/apscheduler/executors/tornado.py 2019-07-19 12:09:36.000000000 +0200 +++ new/APScheduler-3.6.2/apscheduler/executors/tornado.py 2019-11-04 21:42:44.000000000 +0100 @@ -8,10 +8,10 @@ from apscheduler.executors.base import BaseExecutor, run_job try: - from inspect import iscoroutinefunction from apscheduler.executors.base_py3 import run_coroutine_job + from apscheduler.util import iscoroutinefunction_partial except ImportError: - def iscoroutinefunction(func): + def iscoroutinefunction_partial(func): return False @@ -44,7 +44,7 @@ else: self._run_job_success(job.id, events) - if iscoroutinefunction(job.func): + if iscoroutinefunction_partial(job.func): f = run_coroutine_job(job, job._jobstore_alias, run_times, self._logger.name) else: f = self.executor.submit(run_job, job, job._jobstore_alias, run_times, diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/APScheduler-3.6.1/apscheduler/util.py new/APScheduler-3.6.2/apscheduler/util.py --- old/APScheduler-3.6.1/apscheduler/util.py 2019-07-19 12:09:36.000000000 +0200 +++ new/APScheduler-3.6.2/apscheduler/util.py 2019-11-04 21:42:44.000000000 +0100 @@ -21,6 +21,11 @@ except ImportError: TIMEOUT_MAX = 4294967 # Maximum value accepted by Event.wait() on Windows +try: + from asyncio import iscoroutinefunction +except ImportError: + from trollius import iscoroutinefunction + __all__ = ('asint', 'asbool', 'astimezone', 'convert_to_datetime', 'datetime_to_utc_timestamp', 'utc_timestamp_to_datetime', 'timedelta_seconds', 'datetime_ceil', 'get_callable_name', 'obj_to_ref', 'ref_to_obj', 'maybe_ref', 'repr_escape', 'check_callable_args', @@ -409,3 +414,12 @@ raise ValueError( 'The target callable does not accept the following keyword arguments: %s' % ', '.join(unmatched_kwargs)) + + +def iscoroutinefunction_partial(f): + while isinstance(f, partial): + f = f.func + + # The asyncio version of iscoroutinefunction includes testing for @coroutine + # decorations vs. the inspect version which does not. + return iscoroutinefunction(f) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/APScheduler-3.6.1/docs/versionhistory.rst new/APScheduler-3.6.2/docs/versionhistory.rst --- old/APScheduler-3.6.1/docs/versionhistory.rst 2019-07-19 12:09:36.000000000 +0200 +++ new/APScheduler-3.6.2/docs/versionhistory.rst 2019-11-04 21:42:44.000000000 +0100 @@ -4,6 +4,13 @@ To find out how to migrate your application from a previous version of APScheduler, see the :doc:`migration section <migration>`. +3.6.2 +----- + +* Fixed handling of :func:`~functools.partial` wrapped coroutine functions in ``AsyncIOExecutor`` + and ``TornadoExecutor`` (PR by shipmints) + + 3.6.1 ----- diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/APScheduler-3.6.1/tests/test_util_py35.py new/APScheduler-3.6.2/tests/test_util_py35.py --- old/APScheduler-3.6.1/tests/test_util_py35.py 1970-01-01 01:00:00.000000000 +0100 +++ new/APScheduler-3.6.2/tests/test_util_py35.py 2019-11-04 21:42:44.000000000 +0100 @@ -0,0 +1,22 @@ +from functools import partial + +from apscheduler.util import iscoroutinefunction_partial + + +class TestIsCoroutineFunctionPartial: + @staticmethod + def not_a_coro(x): + pass + + @staticmethod + async def a_coro(x): + pass + + def test_non_coro(self): + assert not iscoroutinefunction_partial(self.not_a_coro) + + def test_coro(self): + assert iscoroutinefunction_partial(self.a_coro) + + def test_coro_partial(self): + assert iscoroutinefunction_partial(partial(self.a_coro, 1)) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/APScheduler-3.6.1/tox.ini new/APScheduler-3.6.2/tox.ini --- old/APScheduler-3.6.1/tox.ini 2019-07-19 12:09:36.000000000 +0200 +++ new/APScheduler-3.6.2/tox.ini 2019-11-04 21:42:44.000000000 +0100 @@ -16,6 +16,9 @@ zookeeper deps = {py35,py36,py37}: PyQt5 +[testenv:py34] +deps = twisted < 19.7 + [testenv:flake8] deps = flake8 commands = flake8 apscheduler tests ++++++ compat-pytest4+.patch ++++++ >From 9f123913c89d3cec143dd3da985854a2835eda22 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Alex=20Gr=C3=B6nholm?= <alex.gronh...@nextday.fi> Date: Mon, 4 Nov 2019 23:51:12 +0200 Subject: [PATCH] Fixed compatibility with pytest 4+ Fixes #401. --- setup.py | 2 +- tests/test_util.py | 30 +++++++++++++----------------- 2 files changed, 14 insertions(+), 18 deletions(-) diff --git a/setup.py b/setup.py index 6988f74..f195542 100644 --- a/setup.py +++ b/setup.py @@ -55,7 +55,7 @@ 'twisted': ['twisted'], 'zookeeper': ['kazoo'], 'testing': [ - 'pytest < 3.7', + 'pytest', 'pytest-cov', 'pytest-tornado5' ], diff --git a/tests/test_util.py b/tests/test_util.py index f1f07e6..57a322a 100644 --- a/tests/test_util.py +++ b/tests/test_util.py @@ -220,27 +220,23 @@ def nested(): assert str(exc.value) == 'Cannot create a reference to a nested function' @pytest.mark.parametrize('input,expected', [ - pytest.mark.skipif(sys.version_info[:2] == (3, 2), - reason="Unbound methods can't be resolved on Python 3.2")( - (DummyClass.meth, 'tests.test_util:DummyClass.meth') - ), + (DummyClass.meth, 'tests.test_util:DummyClass.meth'), (DummyClass.classmeth, 'tests.test_util:DummyClass.classmeth'), - pytest.mark.skipif(sys.version_info < (3, 3), - reason="Requires __qualname__ (Python 3.3+)")( - (DummyClass.InnerDummyClass.innerclassmeth, - 'tests.test_util:DummyClass.InnerDummyClass.innerclassmeth') - ), - pytest.mark.skipif(sys.version_info < (3, 3), - reason="Requires __qualname__ (Python 3.3+)")( - (DummyClass.staticmeth, 'tests.test_util:DummyClass.staticmeth') + pytest.param( + DummyClass.InnerDummyClass.innerclassmeth, + 'tests.test_util:DummyClass.InnerDummyClass.innerclassmeth', + marks=[pytest.mark.skipif(sys.version_info < (3, 3), + reason="Requires __qualname__ (Python 3.3+)")] ), - pytest.mark.skipif(sys.version_info >= (3, 2), - reason="Unbound methods (Python 3.2) and __qualname__ (Python 3.3+)")( - (InheritedDummyClass.pause, 'tests.test_util:InheritedDummyClass.pause') + pytest.param( + DummyClass.staticmeth, + 'tests.test_util:DummyClass.staticmeth', + marks=[pytest.mark.skipif(sys.version_info < (3, 3), + reason="Requires __qualname__ (Python 3.3+)")] ), (timedelta, 'datetime:timedelta'), - ], ids=['unbound method', 'class method', 'inner class method', 'static method', - 'inherited class method', 'timedelta']) + ], ids=['class method', 'inner class method', 'static method', 'inherited class method', + 'timedelta']) def test_valid_refs(self, input, expected): assert obj_to_ref(input) == expected