From 324aec86546484f69b00c52437a7a975907d33d4b35c15f39d5c54021afc8953 Mon Sep 17 00:00:00 2001 From: Dirk Mueller Date: Sat, 6 Nov 2021 18:35:22 +0000 Subject: [PATCH 1/4] - update to 21.2: * Update documentation entry for 21.1. * Update pin to pyparsing to exclude 3.0.0. * PEP 656: musllinux support * Drop support for Python 2.7, Python 3.4 and Python 3.5. * Replace distutils usage with sysconfig * Add support for zip files in ``parse_sdist_filename`` * Use cached ``_hash`` attribute to short-circuit tag equality comparisons * Specify the default value for the ``specifier`` argument to ``SpecifierSet`` * Proper keyword-only "warn" argument in packaging.tags * Correctly remove prerelease suffixes from ~= check * Fix type hints for ``Version.post`` and ``Version.dev`` * Use typing alias ``UnparsedVersion`` * Improve type inference for ``packaging.specifiers.filter()`` * Tighten the return type of ``canonicalize_version()`` - drop no-legacyversion-warning.patch: setuptools has been updated OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-packaging?expand=0&rev=50 --- no-legacyversion-warning.patch | 30 ------------------------------ packaging-20.9.tar.gz | 3 --- packaging-21.2.tar.gz | 3 +++ python-packaging.changes | 20 ++++++++++++++++++++ python-packaging.spec | 8 ++------ 5 files changed, 25 insertions(+), 39 deletions(-) delete mode 100644 no-legacyversion-warning.patch delete mode 100644 packaging-20.9.tar.gz create mode 100644 packaging-21.2.tar.gz diff --git a/no-legacyversion-warning.patch b/no-legacyversion-warning.patch deleted file mode 100644 index bfa7a8f..0000000 --- a/no-legacyversion-warning.patch +++ /dev/null @@ -1,30 +0,0 @@ ---- 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 diff --git a/packaging-20.9.tar.gz b/packaging-20.9.tar.gz deleted file mode 100644 index 51d2d13..0000000 --- a/packaging-20.9.tar.gz +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:5b327ac1320dc863dca72f4514ecc086f31186744b84a230374cc1fd776feae5 -size 81267 diff --git a/packaging-21.2.tar.gz b/packaging-21.2.tar.gz new file mode 100644 index 0000000..9201530 --- /dev/null +++ b/packaging-21.2.tar.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:096d689d78ca690e4cd8a89568ba06d07ca097e3306a4381635073ca91479966 +size 84403 diff --git a/python-packaging.changes b/python-packaging.changes index 797944f..63d7edb 100644 --- a/python-packaging.changes +++ b/python-packaging.changes @@ -1,3 +1,23 @@ +------------------------------------------------------------------- +Sat Nov 6 18:30:50 UTC 2021 - Dirk Müller + +- update to 21.2: + * Update documentation entry for 21.1. + * Update pin to pyparsing to exclude 3.0.0. + * PEP 656: musllinux support + * Drop support for Python 2.7, Python 3.4 and Python 3.5. + * Replace distutils usage with sysconfig + * Add support for zip files in ``parse_sdist_filename`` + * Use cached ``_hash`` attribute to short-circuit tag equality comparisons + * Specify the default value for the ``specifier`` argument to ``SpecifierSet`` + * Proper keyword-only "warn" argument in packaging.tags + * Correctly remove prerelease suffixes from ~= check + * Fix type hints for ``Version.post`` and ``Version.dev`` + * Use typing alias ``UnparsedVersion`` + * Improve type inference for ``packaging.specifiers.filter()`` + * Tighten the return type of ``canonicalize_version()`` +- drop no-legacyversion-warning.patch: setuptools has been updated + ------------------------------------------------------------------- Thu Jun 17 17:28:43 UTC 2021 - Ben Greiner diff --git a/python-packaging.spec b/python-packaging.spec index 76317c9..8db1fbf 100644 --- a/python-packaging.spec +++ b/python-packaging.spec @@ -28,14 +28,12 @@ # in order to avoid rewriting for subpackage generator %define mypython python Name: python-packaging%{psuffix} -Version: 20.9 +Version: 21.2 Release: 0 Summary: Core utilities for Python packages License: Apache-2.0 URL: https://github.com/pypa/packaging 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: fdupes BuildRequires: python-rpm-macros @@ -64,7 +62,6 @@ Core utilities for Python packages %prep %setup -q -n packaging-%{version} -%patch1 -p1 # sdist must provide a packaging.egg-info, used below in install phase test -d packaging.egg-info @@ -73,8 +70,7 @@ test -d packaging.egg-info %if %{with test} %check -# no-legacyversion-warning.patch causes these to fail -%pytest -k "not (test_legacy_specifier_is_deprecated or test_legacy_version_is_deprecated)" +%pytest %endif # %%{with_test} From eabfbf7c81cba42f21e94296cc3466885d8494f04f4440cdaeaa83db5564d7bd Mon Sep 17 00:00:00 2001 From: Dirk Mueller Date: Sun, 7 Nov 2021 11:12:09 +0000 Subject: [PATCH 2/4] OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-packaging?expand=0&rev=51 --- no-legacyversion-warning.patch | 34 ++++++++++++++++++++++++++++++++++ python-packaging.changes | 1 - python-packaging.spec | 7 +++++-- 3 files changed, 39 insertions(+), 3 deletions(-) create mode 100644 no-legacyversion-warning.patch diff --git a/no-legacyversion-warning.patch b/no-legacyversion-warning.patch new file mode 100644 index 0000000..709c384 --- /dev/null +++ b/no-legacyversion-warning.patch @@ -0,0 +1,34 @@ +Index: packaging-21.2/packaging/specifiers.py +=================================================================== +--- packaging-21.2.orig/packaging/specifiers.py ++++ packaging-21.2/packaging/specifiers.py +@@ -270,12 +270,6 @@ class LegacySpecifier(_IndividualSpecifi + def __init__(self, spec: str = "", prereleases: Optional[bool] = None) -> None: + super().__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: UnparsedVersion) -> LegacyVersion: + if not isinstance(version, LegacyVersion): + version = LegacyVersion(str(version)) +Index: packaging-21.2/packaging/version.py +=================================================================== +--- packaging-21.2.orig/packaging/version.py ++++ packaging-21.2/packaging/version.py +@@ -108,12 +108,6 @@ class LegacyVersion(_BaseVersion): + 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) -> str: + return self._version + diff --git a/python-packaging.changes b/python-packaging.changes index 63d7edb..86e8451 100644 --- a/python-packaging.changes +++ b/python-packaging.changes @@ -16,7 +16,6 @@ Sat Nov 6 18:30:50 UTC 2021 - Dirk Müller * Use typing alias ``UnparsedVersion`` * Improve type inference for ``packaging.specifiers.filter()`` * Tighten the return type of ``canonicalize_version()`` -- drop no-legacyversion-warning.patch: setuptools has been updated ------------------------------------------------------------------- Thu Jun 17 17:28:43 UTC 2021 - Ben Greiner diff --git a/python-packaging.spec b/python-packaging.spec index 8db1fbf..f7ff856 100644 --- a/python-packaging.spec +++ b/python-packaging.spec @@ -34,6 +34,8 @@ Summary: Core utilities for Python packages License: Apache-2.0 URL: https://github.com/pypa/packaging 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: fdupes BuildRequires: python-rpm-macros @@ -61,7 +63,7 @@ Provides: %{mypython}3dist(packaging) = %{version}-%{release} Core utilities for Python packages %prep -%setup -q -n packaging-%{version} +%autosetup -p1 -n packaging-%{version} # sdist must provide a packaging.egg-info, used below in install phase test -d packaging.egg-info @@ -70,7 +72,8 @@ test -d packaging.egg-info %if %{with test} %check -%pytest +# no-legacyversion-warning.patch causes these to fail +%pytest -k "not (test_legacy_specifier_is_deprecated or test_legacy_version_is_deprecated)" %endif # %%{with_test} From c2a1d5f68af45805d481c8494a64704a6c170aa2e1d4a75c43fe35842b19a1ff Mon Sep 17 00:00:00 2001 From: Dirk Mueller Date: Sun, 7 Nov 2021 20:35:57 +0000 Subject: [PATCH 3/4] OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-packaging?expand=0&rev=52 --- python-packaging.spec | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/python-packaging.spec b/python-packaging.spec index f7ff856..ddcd4c7 100644 --- a/python-packaging.spec +++ b/python-packaging.spec @@ -27,6 +27,7 @@ %endif # in order to avoid rewriting for subpackage generator %define mypython python +%global skip_python2 1 Name: python-packaging%{psuffix} Version: 21.2 Release: 0 @@ -36,12 +37,10 @@ URL: https://github.com/pypa/packaging 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: fdupes BuildRequires: python-rpm-macros #!BuildIgnore: post-build-checks-malwarescan Requires: python-pyparsing >= 2.0.2 -Requires: python-six BuildArch: noarch # do not add setuptools dependency, this is now a dependency # of setuptools. Ensure that all dependencies also don't depend From 34844196182ab3d85714a308db41975e09465b13bbeb63635f9e460cc658e8ea Mon Sep 17 00:00:00 2001 From: Dirk Mueller Date: Sun, 7 Nov 2021 20:46:02 +0000 Subject: [PATCH 4/4] OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-packaging?expand=0&rev=53 --- python-packaging.spec | 1 + 1 file changed, 1 insertion(+) diff --git a/python-packaging.spec b/python-packaging.spec index ddcd4c7..07b0f72 100644 --- a/python-packaging.spec +++ b/python-packaging.spec @@ -37,6 +37,7 @@ URL: https://github.com/pypa/packaging 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 devel} BuildRequires: fdupes BuildRequires: python-rpm-macros #!BuildIgnore: post-build-checks-malwarescan