Update to 68.2.2 (rhbz#2208644)

This commit is contained in:
Lumir Balhar 2023-09-21 09:09:17 +02:00
parent adb9b68bd6
commit 7a6121ad59
6 changed files with 72 additions and 176 deletions

View File

@ -1,6 +1,6 @@
From 797316bb195387962758faaf85d6c453832ae61d Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Miro=20Hron=C4=8Dok?= <miro@hroncok.cz>
Date: Fri, 5 May 2023 17:53:11 +0200
From 58f33f0aef5b137287e6f425b922a03123735a77 Mon Sep 17 00:00:00 2001
From: Lumir Balhar <lbalhar@redhat.com>
Date: Wed, 20 Sep 2023 17:18:47 +0200
Subject: [PATCH] Adjust the setup.py install deprecation message and URL
But only when building RPM packages.
@ -9,7 +9,7 @@ But only when building RPM packages.
1 file changed, 8 insertions(+), 2 deletions(-)
diff --git a/setuptools/command/install.py b/setuptools/command/install.py
index dec4e32..704a317 100644
index 606cce9..0af1631 100644
--- a/setuptools/command/install.py
+++ b/setuptools/command/install.py
@@ -1,6 +1,7 @@
@ -20,10 +20,10 @@ index dec4e32..704a317 100644
import platform
import distutils.command.install as orig
@@ -36,8 +37,13 @@ class install(orig.install):
@@ -40,8 +41,13 @@ class install(orig.install):
Please avoid running ``setup.py`` directly.
Instead, use pypa/build, pypa/installer, pypa/build or
other standards-based tools.
Instead, use pypa/build, pypa/installer or other
standards-based tools.
- """,
- see_url="https://blog.ganssle.io/articles/2021/10/setup-py-deprecated.html",
+ """
@ -37,5 +37,5 @@ index dec4e32..704a317 100644
# (e.g. by unziping the wheel file)
# and then add a due_date to this warning.
--
2.40.0
2.41.0

View File

@ -1,46 +1,48 @@
From a03fa24ad65286ad9f2dc8bf1934bc84525ed06f Mon Sep 17 00:00:00 2001
From: Charalampos Stratakis <cstratak@redhat.com>
Date: Wed, 8 Mar 2023 02:48:31 +0100
From 850efbc4dfe5b8c64dd21617bc856ba0d4e3a082 Mon Sep 17 00:00:00 2001
From: Lumir Balhar <lbalhar@redhat.com>
Date: Wed, 20 Sep 2023 19:47:05 +0200
Subject: [PATCH] Remove optional or unpackaged test deps
---
setup.cfg | 16 ----------------
1 file changed, 16 deletions(-)
setup.cfg | 14 --------------
1 file changed, 14 deletions(-)
diff --git a/setup.cfg b/setup.cfg
index 4791ed6..2776b31 100644
index c7aaf14..33b9cd7 100644
--- a/setup.cfg
+++ b/setup.cfg
@@ -39,20 +39,6 @@ exclude =
@@ -42,17 +42,7 @@ exclude =
[options.extras_require]
testing =
pytest >= 6
- pytest-checkdocs >= 2.4
- pytest-flake8; \
- python_version < "3.12"
- flake8 < 5
- pytest-black >= 0.3.7; \
- python_implementation != "PyPy"
- pytest-cov; \
- python_implementation != "PyPy"
- pytest-mypy >= 0.9.1; \
- python_implementation != "PyPy"
- pytest-enabler >= 1.3
- pytest-perf
-
- pytest-enabler >= 2.2
- pytest-ruff; sys_platform != "cygwin"
- flake8-2020
virtualenv>=13.0.0
wheel
pip>=19.1 # For proper file:// URLs support.
@@ -60,8 +46,6 @@ testing =
@@ -60,13 +50,9 @@ testing =
pytest-xdist
jaraco.path>=3.2.0
build[virtualenv]
- filelock>=3.4.0
- pip_run>=8.8
ini2toml[lite]>=0.9
tomli-w>=1.0.0
pytest-timeout
- pytest-perf; \
- sys_platform != "cygwin"
- jaraco.develop >= 7.21; python_version >= "3.9" and sys_platform != "cygwin"
testing-integration =
pytest
pytest-xdist
--
2.39.2
2.41.0

View File

@ -0,0 +1,30 @@
From 95546a2302152676192d5a4880b1e5d09d2f854f Mon Sep 17 00:00:00 2001
From: Lumir Balhar <lbalhar@redhat.com>
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<safe>(?:[0-9]+!)?[0-9]+(?:\.[0-9]+)*)", re.I)
--
2.41.0

View File

@ -1,133 +0,0 @@
# This patch combines two upstream fixes (mainly for tests), adapting to
# changes in Python 3.12:
# - Python 3.12 raises a warning if tarfile filter is not set for extractall.
# Tests do this, and fail on this warning.
# Set a "fully trusted" filter. (The tests create the archive, so it is
# trusted.)
# - https://github.com/pypa/setuptools/pull/3917
# - Python 3.12 venv no longer installs setuptools and wheel into new virtual
# environments. Adjust tests that assumed the old behaviour.
# Also, setting setuptools.__version__ assumed setuptools is installed.
# Set a valid dummy value if that's not the case.
# - https://github.com/pypa/setuptools/pull/3915
From 13887c8defa8f2042a5824da4fa049461e3718ac Mon Sep 17 00:00:00 2001
From: Steve Kowalik <steven@wedontsleep.org>
Date: Wed, 3 May 2023 12:02:19 +1000
Subject: [PATCH] tests: Add extraction_filter for tarfile
Python 3.12, and earlier via security backports now issue an
DeprecationWarning when calling tarfile.extractall without an extraction
filter set. Since the only place we've called extractall is literally
right after we've created the archive, use a fully trusted filter. This
can be replaced with a filter argument to extractall in future.
---
setuptools/tests/test_easy_install.py | 1 +
1 file changed, 1 insertion(+)
diff --git a/setuptools/tests/test_easy_install.py b/setuptools/tests/test_easy_install.py
index 0ee9bea909..709964b3ac 100644
--- a/setuptools/tests/test_easy_install.py
+++ b/setuptools/tests/test_easy_install.py
@@ -697,6 +697,7 @@ def test_setup_requires_override_nspkg(self, use_setup_cfg):
foobar_1_dir = os.path.join(temp_dir, 'foo.bar-0.1')
os.mkdir(foobar_1_dir)
with tarfile.open(foobar_1_archive) as tf:
+ tf.extraction_filter = (lambda member, path: member)
tf.extractall(foobar_1_dir)
sys.path.insert(1, foobar_1_dir)
From 1bef1e2e793ca59828d7911f702ce05c098c0a74 Mon Sep 17 00:00:00 2001
From: Anderson Bravalheri <andersonbravalheri@gmail.com>
Date: Fri, 28 Apr 2023 12:20:33 +0100
Subject: [PATCH 1/3] Adequate venv fixtures to the latest change in virtualenv
Since version v20.23.0, `virtualenv` will no longer include `wheel` and
`setuptools` in the created folders.
Some tests in the setuptools test suite assume that these packages are
always present. So we need to adequate these tests.
---
setuptools/tests/fixtures.py | 4 +++-
setuptools/tests/test_virtualenv.py | 4 ++--
2 files changed, 5 insertions(+), 3 deletions(-)
diff --git a/setuptools/tests/fixtures.py b/setuptools/tests/fixtures.py
index 25ab49fd22..f1cfc66c81 100644
--- a/setuptools/tests/fixtures.py
+++ b/setuptools/tests/fixtures.py
@@ -105,6 +105,8 @@ def venv(tmp_path, setuptools_wheel):
"""Virtual env with the version of setuptools under test installed"""
env = environment.VirtualEnv()
env.root = path.Path(tmp_path / 'venv')
+ env.create_opts = ['--no-setuptools', '--wheel=bundle']
+ # TODO: Use `--no-wheel` when setuptools implements its own bdist_wheel
env.req = str(setuptools_wheel)
# In some environments (eg. downstream distro packaging),
# where tox isn't used to run tests and PYTHONPATH is set to point to
@@ -125,7 +127,7 @@ def venv_without_setuptools(tmp_path):
"""Virtual env without any version of setuptools installed"""
env = environment.VirtualEnv()
env.root = path.Path(tmp_path / 'venv_without_setuptools')
- env.create_opts = ['--no-setuptools']
+ env.create_opts = ['--no-setuptools', '--no-wheel']
env.ensure_env()
return env
diff --git a/setuptools/tests/test_virtualenv.py b/setuptools/tests/test_virtualenv.py
index acfe04e9dd..b17be9ef2b 100644
--- a/setuptools/tests/test_virtualenv.py
+++ b/setuptools/tests/test_virtualenv.py
@@ -174,8 +174,8 @@ def sdist(distname, version):
def test_test_command_install_requirements(venv, tmpdir, tmpdir_cwd):
- # Ensure pip/wheel packages are installed.
- venv.run(["python", "-c", "__import__('pkg_resources').require(['pip', 'wheel'])"])
+ # Ensure pip is installed.
+ venv.run(["python", "-c", "import pip"])
# disable index URL so bits and bobs aren't requested from PyPI
with contexts.environment(PYTHONPATH=None, PIP_NO_INDEX="1"):
_check_test_command_install_requirements(venv, tmpdir)
From 70ed7894801a308d93b1d155b30ac58d8ef0accd Mon Sep 17 00:00:00 2001
From: Anderson Bravalheri <andersonbravalheri@gmail.com>
Date: Tue, 2 May 2023 17:16:33 +0100
Subject: [PATCH 2/3] Add news fragment
---
changelog.d/3915.misc.rst | 1 +
1 file changed, 1 insertion(+)
create mode 100644 changelog.d/3915.misc.rst
diff --git a/changelog.d/3915.misc.rst b/changelog.d/3915.misc.rst
new file mode 100644
index 0000000000..cd962b2c6e
--- /dev/null
+++ b/changelog.d/3915.misc.rst
@@ -0,0 +1 @@
+Adequate tests to the latest changes in ``virtualenv`` for Python 3.12.
From 3f172826492e99470db75a74cdaa5494ec3e932c Mon Sep 17 00:00:00 2001
From: Anderson Bravalheri <andersonbravalheri@gmail.com>
Date: Thu, 27 Apr 2023 16:30:41 +0100
Subject: [PATCH 3/3] Attempt to use a valid PEP 440 version fallback
---
setuptools/version.py | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/setuptools/version.py b/setuptools/version.py
index 75b2a14959..ec253c4144 100644
--- a/setuptools/version.py
+++ b/setuptools/version.py
@@ -1,6 +1,6 @@
from ._importlib import metadata
try:
- __version__ = metadata.version('setuptools')
+ __version__ = metadata.version('setuptools') or '0.dev0+unknown'
except Exception:
- __version__ = 'unknown'
+ __version__ = '0.dev0+unknown'

View File

@ -18,8 +18,8 @@
Name: python-setuptools
# When updating, update the bundled libraries versions bellow!
Version: 67.7.2
Release: 7%{?dist}
Version: 68.2.2
Release: 1%{?dist}
Summary: Easily build and distribute Python packages
# setuptools is MIT
# platformdirs is MIT
@ -45,19 +45,12 @@ 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
# This patch combines two upstream fixes (mainly for tests), adapting to
# changes in Python 3.12:
# - Python 3.12 raises a warning if tarfile filter is not set for extractall.
# Tests do this, and fail on this warning.
# Set a "fully trusted" filter. (The tests create the archive, so it is
# trusted.)
# - https://github.com/pypa/setuptools/pull/3917
# - Python 3.12 venv no longer installs setuptools and wheel into new virtual
# environments. Adjust tests that assumed the old behaviour.
# Also, setting setuptools.__version__ assumed setuptools is installed.
# Set a valid dummy value if that's not the case.
# - https://github.com/pypa/setuptools/pull/3915
Patch: adjust-for-py3.12.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
@ -96,7 +89,7 @@ Provides: bundled(python%{python3_pkgversion}dist(importlib-resources)) = 5.10.2
Provides: bundled(python%{python3_pkgversion}dist(jaraco-text)) = 3.7
Provides: bundled(python%{python3_pkgversion}dist(more-itertools)) = 8.8
Provides: bundled(python%{python3_pkgversion}dist(ordered-set)) = 3.1.1
Provides: bundled(python%{python3_pkgversion}dist(packaging)) = 23
Provides: bundled(python%{python3_pkgversion}dist(packaging)) = 23.1
Provides: bundled(python%{python3_pkgversion}dist(typing-extensions)) = 4.4
Provides: bundled(python%{python3_pkgversion}dist(typing-extensions)) = 4.0.1
Provides: bundled(python%{python3_pkgversion}dist(zipp)) = 3.7
@ -219,13 +212,14 @@ PYTHONPATH=$(pwd) %pytest \
--ignore=setuptools/tests/integration/ \
--ignore=setuptools/tests/test_editable_install.py \
--ignore=setuptools/tests/config/test_apply_pyprojecttoml.py \
-k "not test_pip_upgrade_from_source"
--ignore=tools/finalize.py \
-k "not test_pip_upgrade_from_source and not test_setup_requires_honors_fetch_params"
%endif # with tests
%files -n python%{python3_pkgversion}-setuptools %{?!with_bootstrap:-f %{pyproject_files}}
%license LICENSE
%doc docs/* CHANGES.rst README.rst
%doc docs/* NEWS.rst README.rst
%{python3_sitelib}/distutils-precedence.pth
%if %{with bootstrap}
%{python3_sitelib}/setuptools-%{version}-py%{python3_version}.egg-info/
@ -244,6 +238,9 @@ PYTHONPATH=$(pwd) %pytest \
%changelog
* Wed Sep 20 2023 Lumír Balhar <lbalhar@redhat.com> - 68.2.2-1
- Update to 68.2.2 (rhbz#2208644)
* Fri Jul 21 2023 Fedora Release Engineering <releng@fedoraproject.org> - 67.7.2-7
- Rebuilt for https://fedoraproject.org/wiki/Fedora_39_Mass_Rebuild

View File

@ -1 +1 @@
SHA512 (setuptools-67.7.2.tar.gz) = 06db096193ef52111f064c327daefb12ea2bb2ebc6712436bae01f986165455fe89a1d2220cbaaa6391a182e2aee19b9cf7a709c158af8c5ab6232dfbc258bd9
SHA512 (setuptools-68.2.2.tar.gz) = ed3138a39e8ae47d695e71835024d66d63b8de51aa336bd8524de81a5036aa26cf587caca5d6b46c833f77a6e9c8c1ae6b64e8310f712bd9c4e760196778b2ca