Hello community, here is the log from the commit of package python-deprecation for openSUSE:Factory checked in at 2020-06-02 14:39:54 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/python-deprecation (Old) and /work/SRC/openSUSE:Factory/.python-deprecation.new.3606 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "python-deprecation" Tue Jun 2 14:39:54 2020 rev:6 rq:810621 version:2.1.0 Changes: -------- --- /work/SRC/openSUSE:Factory/python-deprecation/python-deprecation.changes 2020-05-28 09:14:35.652688750 +0200 +++ /work/SRC/openSUSE:Factory/.python-deprecation.new.3606/python-deprecation.changes 2020-06-02 14:40:36.035893415 +0200 @@ -1,0 +2,9 @@ +Mon Jun 1 11:52:54 UTC 2020 - pgaj...@suse.com + +- use %pytest macro +- do not require unittest2 for python3 +- added patches + unittest2 is not neccessary for python3 + + python-deprecation-no-unittest2.patch + +------------------------------------------------------------------- New: ---- python-deprecation-no-unittest2.patch ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ python-deprecation.spec ++++++ --- /var/tmp/diff_new_pack.YBxNs2/_old 2020-06-02 14:40:38.339900698 +0200 +++ /var/tmp/diff_new_pack.YBxNs2/_new 2020-06-02 14:40:38.343900711 +0200 @@ -17,6 +17,7 @@ %{?!python_module:%define python_module() python-%{**} python3-%{**}} +%bcond_without python2 Name: python-deprecation Version: 2.1.0 Release: 0 @@ -25,8 +26,15 @@ Group: Development/Languages/Python URL: https://github.com/briancurtin/deprecation Source: https://files.pythonhosted.org/packages/source/d/deprecation/deprecation-%{version}.tar.gz +# https://github.com/briancurtin/deprecation/pull/50 +Patch0: python-deprecation-no-unittest2.patch BuildRequires: %{python_module setuptools} -BuildRequires: %{python_module unittest2} +# SECTION test requirements +BuildRequires: %{python_module pytest} +%if %{with python2} +BuildRequires: python-unittest2 +%endif +# /SECTION BuildRequires: fdupes BuildRequires: python-rpm-macros BuildArch: noarch @@ -39,6 +47,7 @@ %prep %setup -q -n deprecation-%{version} +%patch0 -p1 %build @@ -49,7 +58,7 @@ %python_expand %fdupes %{buildroot}%{$python_sitelib} %check -%python_exec setup.py test +%pytest %files %{python_files} %license LICENSE ++++++ python-deprecation-no-unittest2.patch ++++++ Index: deprecation-2.1.0/tests/test_deprecation.py =================================================================== --- deprecation-2.1.0.orig/tests/test_deprecation.py 2020-04-20 16:14:19.000000000 +0200 +++ deprecation-2.1.0/tests/test_deprecation.py 2020-06-01 13:51:55.484939683 +0200 @@ -12,14 +12,16 @@ # As we unfortunately support Python 2.7, it lacks TestCase.subTest which # is in 3.4+ or in unittest2 -import unittest2 +import unittest +if not hasattr(unittest.TestCase, "subTest"): + import unittest2 as unittest import warnings import deprecation from datetime import date -class Test_deprecated(unittest2.TestCase): +class Test_deprecated(unittest.TestCase): def test_args_set_on_base_class(self): args = (1, 2, 3, 4) @@ -230,7 +232,7 @@ class Test_deprecated(unittest2.TestCase self.assertEqual(sot.method(), ret_val) -class Test_fail_if_not_removed(unittest2.TestCase): +class Test_fail_if_not_removed(unittest.TestCase): @deprecation.deprecated(deprecated_in="1.0", current_version="2.0") def _deprecated_method(self): @@ -259,7 +261,7 @@ class Test_fail_if_not_removed(unittest2 except AssertionError: self.fail("A DeprecatedWarning shouldn't cause a failure") - @unittest2.expectedFailure + @unittest.expectedFailure @deprecation.fail_if_not_removed def test_literal_UnsupportedWarning(self): self._unsupported_method()