From 7e66c23b74edad23a689c785ac8a454d12e46f22 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miro=20Hron=C4=8Dok?= Date: Tue, 6 Feb 2024 15:23:43 +0100 Subject: [PATCH] Undo the removal of pkg_resources DeprecationWarning This was removed downstream-only to give impacted packages more time. However, we actually want the warning, so packagers learn pkg_resources is deprecated. No remaining Fedora 40 package fails to build because of this warning. --- Remove-warning-from-pkg_resources.patch | 30 ------------------------- python-setuptools.spec | 7 ------ 2 files changed, 37 deletions(-) delete mode 100644 Remove-warning-from-pkg_resources.patch diff --git a/Remove-warning-from-pkg_resources.patch b/Remove-warning-from-pkg_resources.patch deleted file mode 100644 index dfa08c0..0000000 --- a/Remove-warning-from-pkg_resources.patch +++ /dev/null @@ -1,30 +0,0 @@ -From 95546a2302152676192d5a4880b1e5d09d2f854f Mon Sep 17 00:00:00 2001 -From: Lumir Balhar -Date: Fri, 22 Sep 2023 00:11:50 +0200 -Subject: [PATCH] Remove warning from pkg_resources - ---- - pkg_resources/__init__.py | 7 +------ - 1 file changed, 1 insertion(+), 6 deletions(-) - -diff --git a/pkg_resources/__init__.py b/pkg_resources/__init__.py -index 3baa1f3..31f81a4 100644 ---- a/pkg_resources/__init__.py -+++ b/pkg_resources/__init__.py -@@ -115,12 +115,7 @@ _namespace_handlers = None - _namespace_packages = None - - --warnings.warn( -- "pkg_resources is deprecated as an API. " -- "See https://setuptools.pypa.io/en/latest/pkg_resources.html", -- DeprecationWarning, -- stacklevel=2, --) -+ - - - _PEP440_FALLBACK = re.compile(r"^v?(?P(?:[0-9]+!)?[0-9]+(?:\.[0-9]+)*)", re.I) --- -2.41.0 - diff --git a/python-setuptools.spec b/python-setuptools.spec index edfd9dc..68ae2b8 100644 --- a/python-setuptools.spec +++ b/python-setuptools.spec @@ -45,13 +45,6 @@ Patch: Remove-optional-or-unpackaged-test-deps.patch # adjust it, but only when $RPM_BUILD_ROOT is set Patch: Adjust-the-setup.py-install-deprecation-message.patch -# Remove DeprecationWarning from pkg_resources. -# The warning causes tests of dependant packages to fail -# but their maintainers or developers are aware of that -# so we are removing the warning here until they all switch -# away from pkg_resources. -Patch: Remove-warning-from-pkg_resources.patch - BuildArch: noarch BuildRequires: python%{python3_pkgversion}-devel