forked from pool/python-packaging
- add no-legacyversion-warning.patch to restore compatibility with 20.4
OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-packaging?expand=0&rev=48
This commit is contained in:
parent
3fc200ffa0
commit
8a4d414225
30
no-legacyversion-warning.patch
Normal file
30
no-legacyversion-warning.patch
Normal file
@ -0,0 +1,30 @@
|
|||||||
|
--- packaging-20.9/packaging/specifiers.py
|
||||||
|
+++ packaging-20.9/packaging/specifiers.py
|
||||||
|
@@ -280,12 +280,6 @@
|
||||||
|
# type: (str, Optional[bool]) -> None
|
||||||
|
super(LegacySpecifier, self).__init__(spec, prereleases)
|
||||||
|
|
||||||
|
- warnings.warn(
|
||||||
|
- "Creating a LegacyVersion has been deprecated and will be "
|
||||||
|
- "removed in the next major release",
|
||||||
|
- DeprecationWarning,
|
||||||
|
- )
|
||||||
|
-
|
||||||
|
def _coerce_version(self, version):
|
||||||
|
# type: (Union[ParsedVersion, str]) -> LegacyVersion
|
||||||
|
if not isinstance(version, LegacyVersion):
|
||||||
|
--- packaging-20.9/packaging/version.py
|
||||||
|
+++ packaging-20.9/packaging/version.py
|
||||||
|
@@ -124,12 +124,6 @@
|
||||||
|
self._version = str(version)
|
||||||
|
self._key = _legacy_cmpkey(self._version)
|
||||||
|
|
||||||
|
- warnings.warn(
|
||||||
|
- "Creating a LegacyVersion has been deprecated and will be "
|
||||||
|
- "removed in the next major release",
|
||||||
|
- DeprecationWarning,
|
||||||
|
- )
|
||||||
|
-
|
||||||
|
def __str__(self):
|
||||||
|
# type: () -> str
|
||||||
|
return self._version
|
@ -1,3 +1,8 @@
|
|||||||
|
-------------------------------------------------------------------
|
||||||
|
Sat May 1 21:03:52 UTC 2021 - Dirk Müller <dmueller@suse.com>
|
||||||
|
|
||||||
|
- add no-legacyversion-warning.patch to restore compatibility with 20.4
|
||||||
|
|
||||||
-------------------------------------------------------------------
|
-------------------------------------------------------------------
|
||||||
Tue Feb 2 01:02:21 UTC 2021 - Dirk Müller <dmueller@suse.com>
|
Tue Feb 2 01:02:21 UTC 2021 - Dirk Müller <dmueller@suse.com>
|
||||||
|
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
#
|
#
|
||||||
# spec file for package python-packaging
|
# spec file for package python-packaging-test
|
||||||
#
|
#
|
||||||
# Copyright (c) 2021 SUSE LLC
|
# Copyright (c) 2021 SUSE LLC
|
||||||
#
|
#
|
||||||
@ -32,6 +32,8 @@ Summary: Core utilities for Python packages
|
|||||||
License: Apache-2.0
|
License: Apache-2.0
|
||||||
URL: https://github.com/pypa/packaging
|
URL: https://github.com/pypa/packaging
|
||||||
Source: https://files.pythonhosted.org/packages/source/p/packaging/packaging-%{version}.tar.gz
|
Source: https://files.pythonhosted.org/packages/source/p/packaging/packaging-%{version}.tar.gz
|
||||||
|
# Restore compatibility with 20.4 for setuptools
|
||||||
|
Patch1: no-legacyversion-warning.patch
|
||||||
BuildRequires: %{python_module six}
|
BuildRequires: %{python_module six}
|
||||||
BuildRequires: fdupes
|
BuildRequires: fdupes
|
||||||
BuildRequires: python-rpm-macros
|
BuildRequires: python-rpm-macros
|
||||||
@ -55,6 +57,7 @@ Core utilities for Python packages
|
|||||||
|
|
||||||
%prep
|
%prep
|
||||||
%setup -q -n packaging-%{version}
|
%setup -q -n packaging-%{version}
|
||||||
|
%patch1 -p1
|
||||||
# sdist must provide a packaging.egg-info, used below in install phase
|
# sdist must provide a packaging.egg-info, used below in install phase
|
||||||
test -d packaging.egg-info
|
test -d packaging.egg-info
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user