forked from pool/python-APScheduler
Accepting request 745282 from devel:languages:python
- 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 - Add pytest4.patch to make test suite work even with pytest 4. gh#agronholm/apscheduler#401 OBS-URL: https://build.opensuse.org/request/show/745282 OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/python-APScheduler?expand=0&rev=9
This commit is contained in:
@@ -1,3 +0,0 @@
|
|||||||
version https://git-lfs.github.com/spec/v1
|
|
||||||
oid sha256:529afb7909e08416132891188cbfea5351eb35e4a684b67e983d819e8d01a6b0
|
|
||||||
size 95921
|
|
||||||
3
APScheduler-3.6.2.tar.gz
Normal file
3
APScheduler-3.6.2.tar.gz
Normal file
@@ -0,0 +1,3 @@
|
|||||||
|
version https://git-lfs.github.com/spec/v1
|
||||||
|
oid sha256:dcbf7ee41d7fc45b2514ad2a25e654e97162bc3af2649f230a5fb66b3f83214b
|
||||||
|
size 96320
|
||||||
69
compat-pytest4+.patch
Normal file
69
compat-pytest4+.patch
Normal file
@@ -0,0 +1,69 @@
|
|||||||
|
From 9f123913c89d3cec143dd3da985854a2835eda22 Mon Sep 17 00:00:00 2001
|
||||||
|
From: =?UTF-8?q?Alex=20Gr=C3=B6nholm?= <alex.gronholm@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
|
||||||
|
|
||||||
@@ -1,3 +1,16 @@
|
|||||||
|
-------------------------------------------------------------------
|
||||||
|
Mon Nov 4 23:50:32 CET 2019 - Matej Cepl <mcepl@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 <mcepl@suse.com>
|
||||||
|
|
||||||
|
- Add pytest4.patch to make test suite work even with pytest 4.
|
||||||
|
gh#agronholm/apscheduler#401
|
||||||
|
|
||||||
-------------------------------------------------------------------
|
-------------------------------------------------------------------
|
||||||
Thu Sep 5 13:32:21 UTC 2019 - Todd R <toddrme2178@gmail.com>
|
Thu Sep 5 13:32:21 UTC 2019 - Todd R <toddrme2178@gmail.com>
|
||||||
|
|
||||||
|
|||||||
@@ -18,18 +18,21 @@
|
|||||||
|
|
||||||
%{?!python_module:%define python_module() python-%{**} python3-%{**}}
|
%{?!python_module:%define python_module() python-%{**} python3-%{**}}
|
||||||
Name: python-APScheduler
|
Name: python-APScheduler
|
||||||
Version: 3.6.1
|
Version: 3.6.2
|
||||||
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: https://github.com/agronholm/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 compat-pytest4+.patch gh#agronholm/apscheduler#401 mcepl@suse.com
|
||||||
|
# fix the test suite to be compatible with pytest4+
|
||||||
|
Patch0: compat-pytest4+.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}
|
||||||
BuildRequires: %{python_module pytest-tornado}
|
BuildRequires: %{python_module pytest-tornado}
|
||||||
BuildRequires: %{python_module pytest < 4}
|
BuildRequires: %{python_module pytest}
|
||||||
BuildRequires: %{python_module pytz}
|
BuildRequires: %{python_module pytz}
|
||||||
BuildRequires: %{python_module setuptools >= 0.7}
|
BuildRequires: %{python_module setuptools >= 0.7}
|
||||||
BuildRequires: %{python_module setuptools_scm}
|
BuildRequires: %{python_module setuptools_scm}
|
||||||
@@ -84,6 +87,8 @@ APscheduler provides multiple job stores.
|
|||||||
|
|
||||||
%prep
|
%prep
|
||||||
%setup -q -n APScheduler-%{version}
|
%setup -q -n APScheduler-%{version}
|
||||||
|
%autopatch -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
|
||||||
|
|
||||||
@@ -95,7 +100,7 @@ rm setup.cfg
|
|||||||
%python_expand %fdupes %{buildroot}%{$python_sitelib}
|
%python_expand %fdupes %{buildroot}%{$python_sitelib}
|
||||||
|
|
||||||
%check
|
%check
|
||||||
%python_expand PYTHONPATH=%{buildroot}%{$python_sitelib} py.test-%{$python_bin_suffix} -v
|
%pytest
|
||||||
|
|
||||||
%files %{python_files}
|
%files %{python_files}
|
||||||
%license LICENSE.txt
|
%license LICENSE.txt
|
||||||
|
|||||||
Reference in New Issue
Block a user