From 87b1f95664b006ca3385ed667c639cf627733376 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miro=20Hron=C4=8Dok?= Date: Wed, 30 Aug 2023 19:07:42 +0200 Subject: [PATCH] Fix tests with pluggy 1.2.0+ --- Fix-tests-with-pluggy-1.2.0.patch | 26 ++++++++++++++++++++++++++ python-virtualenv.spec | 8 +++++++- 2 files changed, 33 insertions(+), 1 deletion(-) create mode 100644 Fix-tests-with-pluggy-1.2.0.patch diff --git a/Fix-tests-with-pluggy-1.2.0.patch b/Fix-tests-with-pluggy-1.2.0.patch new file mode 100644 index 0000000..5b399b8 --- /dev/null +++ b/Fix-tests-with-pluggy-1.2.0.patch @@ -0,0 +1,26 @@ +From 1f7c3185124052740814fe5734e8c98f9c54f47c Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Bern=C3=A1t=20G=C3=A1bor?= +Date: Wed, 30 Aug 2023 19:01:20 +0200 +Subject: [PATCH] Fix tests with pluggy 1.2.0+ + +Manually cherry-picked from 9f9dc6250fc88e92b1ca6206429966788846d696 +--- + tests/conftest.py | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/tests/conftest.py b/tests/conftest.py +index 68924dc..d23b22e 100644 +--- a/tests/conftest.py ++++ b/tests/conftest.py +@@ -23,7 +23,7 @@ def pytest_configure(config): + """Ensure randomly is called before we re-order""" + manager = config.pluginmanager + # noinspection PyProtectedMember +- order = manager.hook.pytest_collection_modifyitems._nonwrappers ++ order = manager.hook.pytest_collection_modifyitems._hookimpls + dest = next((i for i, p in enumerate(order) if p.plugin is manager.getplugin("randomly")), None) + if dest is not None: + from_pos = next(i for i, p in enumerate(order) if p.plugin is manager.getplugin(__file__)) +-- +2.40.1 + diff --git a/python-virtualenv.spec b/python-virtualenv.spec index c91d0e2..116232a 100644 --- a/python-virtualenv.spec +++ b/python-virtualenv.spec @@ -1,6 +1,6 @@ Name: python-virtualenv Version: 20.21.1 -Release: 4%{?dist} +Release: 5%{?dist} Summary: Tool to create isolated Python environments License: MIT @@ -21,6 +21,9 @@ Patch2: prevent-PermissionError-when-using-venv-creator-on-s.patch # files missing in sdist removed from the path file # https://github.com/pypa/virtualenv/pull/2558 Patch3: 3.12-support-and-no-setuptools-wheel-on-3.12-2558.patch +# (20.24.0) Fix tests with pluggy 1.2.0+ +# Manually cherry-picked from https://github.com/pypa/virtualenv/pull/2593 +Patch4: Fix-tests-with-pluggy-1.2.0.patch BuildArch: noarch @@ -151,6 +154,9 @@ PIP_CERT=/etc/pki/tls/certs/ca-bundle.crt \ %{_bindir}/virtualenv %changelog +* Wed Aug 30 2023 Miro HronĨok - 20.21.1-5 +- Fix tests with pluggy 1.2.0+ + * Fri Jul 21 2023 Fedora Release Engineering - 20.21.1-4 - Rebuilt for https://fedoraproject.org/wiki/Fedora_39_Mass_Rebuild