14
0

Accepting request 764015 from home:mcalabkova:branches:devel:languages:python

- update to version 3.6.3
  * just pytest4 compatibility
- drop obsolete patch compat-pytest4+.patch

OBS-URL: https://build.opensuse.org/request/show/764015
OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-APScheduler?expand=0&rev=33
This commit is contained in:
Tomáš Chvátal
2020-01-13 14:40:47 +00:00
committed by Git OBS Bridge
parent 10a566135c
commit 37e015dc6d
5 changed files with 15 additions and 83 deletions

View File

@@ -1,3 +0,0 @@
version https://git-lfs.github.com/spec/v1
oid sha256:dcbf7ee41d7fc45b2514ad2a25e654e97162bc3af2649f230a5fb66b3f83214b
size 96320

3
APScheduler-3.6.3.tar.gz Normal file
View File

@@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:3bb5229eed6fbbdafc13ce962712ae66e175aa214c69bed35a06bffcf0c5e244
size 96309

View File

@@ -1,69 +0,0 @@
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

View File

@@ -1,3 +1,10 @@
-------------------------------------------------------------------
Mon Jan 13 14:12:51 UTC 2020 - Marketa Calabkova <mcalabkova@suse.com>
- update to version 3.6.3
* just pytest4 compatibility
- drop obsolete patch compat-pytest4+.patch
------------------------------------------------------------------- -------------------------------------------------------------------
Mon Nov 4 23:50:32 CET 2019 - Matej Cepl <mcepl@suse.com> Mon Nov 4 23:50:32 CET 2019 - Matej Cepl <mcepl@suse.com>

View File

@@ -1,7 +1,7 @@
# #
# spec file for package python-APScheduler # spec file for package python-APScheduler
# #
# Copyright (c) 2019 SUSE LINUX GmbH, Nuernberg, Germany. # Copyright (c) 2020 SUSE LLC
# #
# All modifications and additions to the file contributed by third parties # All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed # remain the property of their copyright owners, unless otherwise agreed
@@ -18,24 +18,22 @@
%{?!python_module:%define python_module() python-%{**} python3-%{**}} %{?!python_module:%define python_module() python-%{**} python3-%{**}}
Name: python-APScheduler Name: python-APScheduler
Version: 3.6.2 Version: 3.6.3
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-cov}
BuildRequires: %{python_module pytest-tornado} BuildRequires: %{python_module pytest-tornado}
BuildRequires: %{python_module pytest} BuildRequires: %{python_module pytest}
BuildRequires: %{python_module pytz} BuildRequires: %{python_module pytz}
BuildRequires: %{python_module setuptools >= 0.7} BuildRequires: %{python_module setuptools >= 36.2.7}
BuildRequires: %{python_module setuptools_scm} BuildRequires: %{python_module setuptools_scm >= 1.7.0}
BuildRequires: %{python_module six >= 1.4.0} BuildRequires: %{python_module six >= 1.4.0}
BuildRequires: %{python_module tornado} BuildRequires: %{python_module tornado}
BuildRequires: %{python_module tzlocal >= 1.2} BuildRequires: %{python_module tzlocal >= 1.2}
@@ -87,10 +85,6 @@ 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
rm setup.cfg
%build %build
%python_build %python_build