Sync from SUSE:SLFO:Main python-deprecation revision d083b4cde804bb8865e02cd1267072f9
This commit is contained in:
commit
166f93cfd6
23
.gitattributes
vendored
Normal file
23
.gitattributes
vendored
Normal file
@ -0,0 +1,23 @@
|
|||||||
|
## Default LFS
|
||||||
|
*.7z filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.bsp filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.bz2 filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.gem filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.gz filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.jar filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.lz filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.lzma filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.obscpio filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.oxt filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.pdf filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.png filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.rpm filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.tbz filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.tbz2 filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.tgz filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.ttf filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.txz filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.whl filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.xz filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.zip filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.zst filter=lfs diff=lfs merge=lfs -text
|
BIN
deprecation-2.1.0.tar.gz
(Stored with Git LFS)
Normal file
BIN
deprecation-2.1.0.tar.gz
(Stored with Git LFS)
Normal file
Binary file not shown.
41
python-deprecation-no-unittest2.patch
Normal file
41
python-deprecation-no-unittest2.patch
Normal file
@ -0,0 +1,41 @@
|
|||||||
|
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()
|
45
python-deprecation.changes
Normal file
45
python-deprecation.changes
Normal file
@ -0,0 +1,45 @@
|
|||||||
|
-------------------------------------------------------------------
|
||||||
|
Mon Jun 1 11:52:54 UTC 2020 - pgajdos@suse.com
|
||||||
|
|
||||||
|
- use %pytest macro
|
||||||
|
- do not require unittest2 for python3
|
||||||
|
- added patches
|
||||||
|
unittest2 is not neccessary for python3
|
||||||
|
+ python-deprecation-no-unittest2.patch
|
||||||
|
|
||||||
|
-------------------------------------------------------------------
|
||||||
|
Wed May 27 05:12:21 UTC 2020 - Steve Kowalik <steven.kowalik@suse.com>
|
||||||
|
|
||||||
|
- Update to 2.1.0:
|
||||||
|
* No upstream changelog
|
||||||
|
|
||||||
|
-------------------------------------------------------------------
|
||||||
|
Fri Sep 13 08:56:51 UTC 2019 - Tomáš Chvátal <tchvatal@suse.com>
|
||||||
|
|
||||||
|
- Update to 2.0.7:
|
||||||
|
* no upstream changelog
|
||||||
|
|
||||||
|
-------------------------------------------------------------------
|
||||||
|
Thu Mar 7 14:11:32 UTC 2019 - Tomáš Chvátal <tchvatal@suse.com>
|
||||||
|
|
||||||
|
- Update to 2.0.6:
|
||||||
|
* Use sphinx deprecated directive
|
||||||
|
* no upstream changelog
|
||||||
|
- Make sure to run tests
|
||||||
|
|
||||||
|
-------------------------------------------------------------------
|
||||||
|
Tue Dec 4 12:47:15 UTC 2018 - Matej Cepl <mcepl@suse.com>
|
||||||
|
|
||||||
|
- Remove superfluous devel dependency for noarch package
|
||||||
|
|
||||||
|
-------------------------------------------------------------------
|
||||||
|
Tue May 2 15:47:16 UTC 2017 - tbechtold@suse.com
|
||||||
|
|
||||||
|
- update to 1.0.1
|
||||||
|
- remove 0001-Fix-encoding-when-reading-README.rst.patch . Applied
|
||||||
|
upstream.
|
||||||
|
|
||||||
|
-------------------------------------------------------------------
|
||||||
|
Tue May 2 14:13:34 UTC 2017 - tbechtold@suse.com
|
||||||
|
|
||||||
|
- Initial packaging (version 1.0)
|
68
python-deprecation.spec
Normal file
68
python-deprecation.spec
Normal file
@ -0,0 +1,68 @@
|
|||||||
|
#
|
||||||
|
# spec file for package python-deprecation
|
||||||
|
#
|
||||||
|
# Copyright (c) 2020 SUSE LLC
|
||||||
|
#
|
||||||
|
# All modifications and additions to the file contributed by third parties
|
||||||
|
# remain the property of their copyright owners, unless otherwise agreed
|
||||||
|
# upon. The license for this file, and modifications and additions to the
|
||||||
|
# file, is the same license as for the pristine package itself (unless the
|
||||||
|
# license for the pristine package is not an Open Source License, in which
|
||||||
|
# case the license is the MIT License). An "Open Source License" is a
|
||||||
|
# license that conforms to the Open Source Definition (Version 1.9)
|
||||||
|
# published by the Open Source Initiative.
|
||||||
|
|
||||||
|
# Please submit bugfixes or comments via https://bugs.opensuse.org/
|
||||||
|
#
|
||||||
|
|
||||||
|
|
||||||
|
%{?!python_module:%define python_module() python-%{**} python3-%{**}}
|
||||||
|
%bcond_without python2
|
||||||
|
Name: python-deprecation
|
||||||
|
Version: 2.1.0
|
||||||
|
Release: 0
|
||||||
|
Summary: A library to handle automated deprecations
|
||||||
|
License: Apache-2.0
|
||||||
|
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}
|
||||||
|
# SECTION test requirements
|
||||||
|
BuildRequires: %{python_module pytest}
|
||||||
|
%if %{with python2}
|
||||||
|
BuildRequires: python-unittest2
|
||||||
|
%endif
|
||||||
|
# /SECTION
|
||||||
|
BuildRequires: fdupes
|
||||||
|
BuildRequires: python-rpm-macros
|
||||||
|
BuildArch: noarch
|
||||||
|
%python_subpackages
|
||||||
|
|
||||||
|
%description
|
||||||
|
The `deprecation` library provides a `deprecated` decorator and a
|
||||||
|
`fail_if_not_removed` decorator for your tests. Together, the two
|
||||||
|
enable the automation of several things:
|
||||||
|
|
||||||
|
%prep
|
||||||
|
%setup -q -n deprecation-%{version}
|
||||||
|
%patch0 -p1
|
||||||
|
|
||||||
|
%build
|
||||||
|
|
||||||
|
%python_build
|
||||||
|
|
||||||
|
%install
|
||||||
|
%python_install
|
||||||
|
%python_expand %fdupes %{buildroot}%{$python_sitelib}
|
||||||
|
|
||||||
|
%check
|
||||||
|
%pytest
|
||||||
|
|
||||||
|
%files %{python_files}
|
||||||
|
%license LICENSE
|
||||||
|
%doc README.rst
|
||||||
|
%{python_sitelib}/*
|
||||||
|
|
||||||
|
%changelog
|
Loading…
Reference in New Issue
Block a user