diff --git a/0001-use-pytest.param-in-parametrize-decorator.patch b/0001-use-pytest.param-in-parametrize-decorator.patch new file mode 100644 index 0000000..133f606 --- /dev/null +++ b/0001-use-pytest.param-in-parametrize-decorator.patch @@ -0,0 +1,55 @@ +From ea99dae0b4b0cfcd232498e8af832874fdaeb983 Mon Sep 17 00:00:00 2001 +From: Fabien Boucher +Date: Tue, 16 Jun 2020 13:47:17 +0200 +Subject: [PATCH] use pytest.param in parametrize decorator + +--- + tests/test_util.py | 31 ++++++++++++++++++------------- + 1 file changed, 18 insertions(+), 13 deletions(-) + +diff --git a/tests/test_util.py b/tests/test_util.py +index 973b81a..81d37c2 100644 +--- a/tests/test_util.py ++++ b/tests/test_util.py +@@ -215,20 +215,25 @@ class TestObjToRef(object): + 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') +- ), ++ pytest.param( ++ DummyClass.meth, ++ 'tests.test_util:DummyClass.meth', ++ marks=pytest.mark.skipif( ++ sys.version_info[:2] == (3, 2), ++ reason="Unbound methods can't be resolved on Python 3.2")), + (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.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', 'timedelta']) + def test_valid_refs(self, input, expected): +-- +2.25.4 + diff --git a/python-APScheduler.spec b/python-APScheduler.spec index 4cfbe67..f00efab 100644 --- a/python-APScheduler.spec +++ b/python-APScheduler.spec @@ -2,12 +2,13 @@ Name: python-%{pypi_name} Version: 3.5.3 -Release: 3%{?dist} +Release: 4%{?dist} Summary: In-process task scheduler with Cron-like capabilities License: MIT URL: https://pypi.python.org/pypi/%{pypi_name} Source0: https://pypi.python.org/packages/source/A/%{pypi_name}/%{pypi_name}-%{version}.tar.gz +Patch0: 0001-use-pytest.param-in-parametrize-decorator.patch BuildArch: noarch BuildRequires: python3-devel @@ -48,7 +49,7 @@ BuildRequires: python3-sphinx Documentation of the Advanced Python Scheduler library. %prep -%autosetup -n %{pypi_name}-%{version} +%autosetup -p1 -n %{pypi_name}-%{version} rm -rf %{pypi_name}.egg-info %build @@ -79,6 +80,9 @@ export TZ=UTC %doc docs/_build/html %changelog +* Tue Jun 16 2020 Fabien Boucher - 3.5.3-4 +- Patch to fix #1714212 due to marks in pytest.mark.parametrize deprecated + * Sat Feb 02 2019 Fedora Release Engineering - 3.5.3-3 - Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild