From 453dfdb9aa57ab4fd8f97b87ce594c3750c63e46 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miro=20Hron=C4=8Dok?= Date: Fri, 28 Mar 2025 14:21:15 +0100 Subject: [PATCH 01/25] CI: Make the tests pass on EPEL 10, install or skip missing Pythons [skip changelog] --- tests/tests.yml | 31 ++++++++++++------------------- 1 file changed, 12 insertions(+), 19 deletions(-) diff --git a/tests/tests.yml b/tests/tests.yml index 4ecedf5..0244e53 100644 --- a/tests/tests.yml +++ b/tests/tests.yml @@ -30,42 +30,42 @@ - all_supplementing_pythons: dir: tests run: ./all_supplementing_pythons.py - - smoke27_optional: + - smoke27: dir: python/smoke run: VERSION=2.7 INSTALL_OR_SKIP=true METHOD=virtualenv TOX_REQUIRES="virtualenv<20.22.0" ./venv.sh - smoke36: dir: python/smoke - run: VERSION=3.6 TOX_REQUIRES="virtualenv<20.22.0" ./venv.sh - - smoke38_optional: + run: VERSION=3.6 INSTALL_OR_SKIP=true TOX_REQUIRES="virtualenv<20.22.0" ./venv.sh + - smoke38: dir: python/smoke run: VERSION=3.8 INSTALL_OR_SKIP=true ./venv.sh - smoke39: dir: python/smoke - run: VERSION=3.9 ./venv.sh + run: VERSION=3.9 INSTALL_OR_SKIP=true ./venv.sh - smoke310: dir: python/smoke - run: VERSION=3.10 ./venv.sh + run: VERSION=3.10 INSTALL_OR_SKIP=true ./venv.sh - smoke311: dir: python/smoke - run: VERSION=3.11 ./venv.sh + run: VERSION=3.11 INSTALL_OR_SKIP=true ./venv.sh - smoke312: dir: python/smoke run: VERSION=3.12 ./venv.sh - smoke313: dir: python/smoke - run: VERSION=3.13 ./venv.sh + run: VERSION=3.13 INSTALL_OR_SKIP=true ./venv.sh - smoke314: dir: python/smoke - run: VERSION=3.14 ./venv.sh - - smoke_pypy39_optional: + run: VERSION=3.14 INSTALL_OR_SKIP=true ./venv.sh + - smoke_pypy39: dir: python/smoke run: PYTHON=pypy3.9 VERSION=3.9 INSTALL_OR_SKIP=true ./venv.sh - smoke_pypy310: dir: python/smoke - run: PYTHON=pypy3.10 VERSION=3.10 ./venv.sh + run: PYTHON=pypy3.10 VERSION=3.10 INSTALL_OR_SKIP=true ./venv.sh - smoke_pypy311: dir: python/smoke - run: PYTHON=pypy3.11 VERSION=3.11 ./venv.sh + run: PYTHON=pypy3.11 VERSION=3.11 INSTALL_OR_SKIP=true ./venv.sh - pyproject_pytest: dir: pyproject-rpm-macros/tests run: ./mocktest.sh python-pytest @@ -78,15 +78,8 @@ required_packages: - gcc - virtualenv - - python3.6 - - python3.9 - - python3.10-devel - - python3.11-devel + - python3-devel - python3.12-devel - - python3.13-devel - - python3.14-devel - - pypy3.10-devel - - pypy3.11-devel - python3-tox - python3-dnf - mock From 104f6b73e2b0c733b7c0eb808001ac9555079f82 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miro=20Hron=C4=8Dok?= Date: Fri, 28 Mar 2025 17:01:26 +0100 Subject: [PATCH 02/25] Setup rpmlint filters [skip changelog] --- rpmlint.toml | 3 +++ 1 file changed, 3 insertions(+) create mode 100644 rpmlint.toml diff --git a/rpmlint.toml b/rpmlint.toml new file mode 100644 index 0000000..7b84503 --- /dev/null +++ b/rpmlint.toml @@ -0,0 +1,3 @@ +Filters = [ + 'spelling-error .* en_US [Vv]irtualenv ', +] From 17cf20500b3cc37824c14906ac8616292e31de3f Mon Sep 17 00:00:00 2001 From: Karolina Surma Date: Mon, 12 May 2025 18:03:59 +0200 Subject: [PATCH 03/25] Support Python 3.14.0b1 --- 3524.patch | 40 ++++++++++++++++++++++++++++++++++++++++ python-tox.spec | 3 +++ 2 files changed, 43 insertions(+) create mode 100644 3524.patch diff --git a/3524.patch b/3524.patch new file mode 100644 index 0000000..48046a4 --- /dev/null +++ b/3524.patch @@ -0,0 +1,40 @@ +From 3c5d56bf8bb8405d0eceef912ba4cad7d077448c Mon Sep 17 00:00:00 2001 +From: Florian Bruhin +Date: Thu, 8 May 2025 10:47:22 +0200 +Subject: [PATCH] Fix custom HelpFormatter for Python 3.14 + +https://github.com/python/cpython/pull/132323 passes prefix_chars= +(and other arguments) to the formatter_class, but the custom HelpFormatter only +accepted prog=. + +Accept any keyword arguments and pass them on to the parent class. + +Fixes #3523 +--- + docs/changelog/3523.bugfix.rst | 1 + + src/tox/config/cli/parser.py | 4 ++-- + 2 files changed, 3 insertions(+), 2 deletions(-) + create mode 100644 docs/changelog/3523.bugfix.rst + +diff --git a/docs/changelog/3523.bugfix.rst b/docs/changelog/3523.bugfix.rst +new file mode 100644 +index 000000000..3052d877e +--- /dev/null ++++ b/docs/changelog/3523.bugfix.rst +@@ -0,0 +1 @@ ++Fix ``TypeError`` for ``HelpFormatter`` with Python 3.14 +diff --git a/src/tox/config/cli/parser.py b/src/tox/config/cli/parser.py +index 87629ae49..904ff7aad 100644 +--- a/src/tox/config/cli/parser.py ++++ b/src/tox/config/cli/parser.py +@@ -95,8 +95,8 @@ def parse_args( # type: ignore[override] # avoid defining all overloads + class HelpFormatter(ArgumentDefaultsHelpFormatter): + """A help formatter that provides the default value and the source it comes from.""" + +- def __init__(self, prog: str) -> None: +- super().__init__(prog, max_help_position=30, width=240) ++ def __init__(self, prog: str, **kwargs: Any) -> None: ++ super().__init__(prog, max_help_position=30, width=240, **kwargs) + + def _get_help_string(self, action: Action) -> str | None: + text: str = super()._get_help_string(action) or "" diff --git a/python-tox.spec b/python-tox.spec index 4dc498f..41c73e7 100644 --- a/python-tox.spec +++ b/python-tox.spec @@ -28,6 +28,9 @@ License: MIT URL: https://tox.readthedocs.io/ Source: %{pypi_source tox} +# Support Python 3.14.0b1 +Patch: https://github.com/tox-dev/tox/pull/3524.patch + # Remove dependency on devpi-process. # Remove dependency on detect-test-pollution. # Remove coverage-related dependencies. From 6b3221eebd45c4bf36e1c49b3b98a2be7832c114 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miro=20Hron=C4=8Dok?= Date: Mon, 12 May 2025 18:27:24 +0200 Subject: [PATCH 04/25] Fix tests with virtualenv 20.31+ --- 3528.patch | 66 +++++++++++++++++++++++++++++++++++++++++++++++++ fix-tests.patch | 19 +++++++------- python-tox.spec | 9 +++++++ 3 files changed, 85 insertions(+), 9 deletions(-) create mode 100644 3528.patch diff --git a/3528.patch b/3528.patch new file mode 100644 index 0000000..cbd5904 --- /dev/null +++ b/3528.patch @@ -0,0 +1,66 @@ +From 32a00aae6fe9d43d8fc5c6e85ce691e1ebfb5323 Mon Sep 17 00:00:00 2001 +From: Robsdedude +Date: Sun, 11 May 2025 22:13:38 +0200 +Subject: [PATCH 1/2] Fix using deprecated virtualenv option `--wheel` + +--- + pyproject.toml | 2 +- + src/tox/pytest.py | 3 ++- + 2 files changed, 3 insertions(+), 2 deletions(-) + +diff --git a/pyproject.toml b/pyproject.toml +index 9c1116c23..9b52c2f36 100644 +--- a/pyproject.toml ++++ b/pyproject.toml +@@ -60,7 +60,7 @@ dependencies = [ + "pyproject-api>=1.8", + "tomli>=2.2.1; python_version<'3.11'", + "typing-extensions>=4.12.2; python_version<'3.11'", +- "virtualenv>=20.29.1", ++ "virtualenv>=20.31", + ] + optional-dependencies.test = [ + "devpi-process>=1.0.2", +diff --git a/src/tox/pytest.py b/src/tox/pytest.py +index 72f410bf5..bca2ad848 100644 +--- a/src/tox/pytest.py ++++ b/src/tox/pytest.py +@@ -281,7 +281,8 @@ def our_setup_state(value: Sequence[str]) -> State: + m.setenv("VIRTUALENV_SYMLINK_APP_DATA", "1") + m.setenv("VIRTUALENV_SYMLINKS", "1") + m.setenv("VIRTUALENV_PIP", "embed") +- m.setenv("VIRTUALENV_WHEEL", "embed") ++ if sys.version_info[:2] < (3, 9): ++ m.setenv("VIRTUALENV_WHEEL", "embed") + m.setenv("VIRTUALENV_SETUPTOOLS", "embed") + try: + tox_run(args) + +From 4d68d2af93aae8208c79b55ff0dfacd4b78a1866 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Bern=C3=A1t=20G=C3=A1bor?= +Date: Mon, 12 May 2025 09:39:48 -0700 +Subject: [PATCH 2/2] Fix test +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +Signed-off-by: Bernát Gábor +--- + tests/session/cmd/test_sequential.py | 4 +++- + 1 file changed, 3 insertions(+), 1 deletion(-) + +diff --git a/tests/session/cmd/test_sequential.py b/tests/session/cmd/test_sequential.py +index 1f4a24624..87771be03 100644 +--- a/tests/session/cmd/test_sequential.py ++++ b/tests/session/cmd/test_sequential.py +@@ -114,7 +114,9 @@ def test_result_json_sequential( + py_test = get_cmd_exit_run_id(log_report, "py", "test") + assert py_test == [(1, "commands[0]"), (0, "commands[1]")] + packaging_installed = log_report["testenvs"]["py"].pop("installed_packages") +- expected_pkg = {"pip", "setuptools", "wheel", "a"} ++ expected_pkg = {"pip", "setuptools", "a"} ++ if sys.version_info[0:2] == (3, 8): ++ expected_pkg.add("wheel") + assert {i[: i.find("==")] if "@" not in i else "a" for i in packaging_installed} == expected_pkg + install_package = log_report["testenvs"]["py"].pop("installpkg") + assert re.match(r"^[a-fA-F0-9]{64}$", install_package.pop("sha256")) diff --git a/fix-tests.patch b/fix-tests.patch index a6e5f9b..d76215f 100644 --- a/fix-tests.patch +++ b/fix-tests.patch @@ -1,4 +1,4 @@ -From b8024813cb3e477a4ada44c5835e9f62ecda79bd Mon Sep 17 00:00:00 2001 +From 924b03e0446561bbfca9679a44642a1a96dd8f10 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tom=C3=A1=C5=A1=20Hrn=C4=8Diar?= Date: Fri, 28 Mar 2025 09:44:24 +0100 Subject: [PATCH] Fix tests @@ -16,7 +16,7 @@ Co-Authored-By: Miro Hrončok 4 files changed, 14 insertions(+), 41 deletions(-) diff --git a/pyproject.toml b/pyproject.toml -index 9c1116c..e499874 100644 +index 9b52c2f..335012b 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -82,22 +82,16 @@ dev = [ @@ -54,7 +54,7 @@ index 9c1116c..e499874 100644 [tool.towncrier] name = "tox" diff --git a/src/tox/pytest.py b/src/tox/pytest.py -index 72f410b..48cf9bc 100644 +index bca2ad8..973e714 100644 --- a/src/tox/pytest.py +++ b/src/tox/pytest.py @@ -17,7 +17,6 @@ from typing import TYPE_CHECKING, Any, Callable, Iterator, Protocol, Sequence, c @@ -65,20 +65,21 @@ index 72f410b..48cf9bc 100644 from virtualenv.info import fs_supports_symlink import tox.run -@@ -280,9 +279,9 @@ class ToxProject: +@@ -280,10 +279,10 @@ class ToxProject: m.setattr(sys, "argv", [sys.executable, "-m", "tox", *list(args)]) m.setenv("VIRTUALENV_SYMLINK_APP_DATA", "1") m.setenv("VIRTUALENV_SYMLINKS", "1") - m.setenv("VIRTUALENV_PIP", "embed") -- m.setenv("VIRTUALENV_WHEEL", "embed") -- m.setenv("VIRTUALENV_SETUPTOOLS", "embed") + m.setenv("VIRTUALENV_PIP", "bundle") -+ m.setenv("VIRTUALENV_WHEEL", "bundle") + if sys.version_info[:2] < (3, 9): +- m.setenv("VIRTUALENV_WHEEL", "embed") +- m.setenv("VIRTUALENV_SETUPTOOLS", "embed") ++ m.setenv("VIRTUALENV_WHEEL", "bundle") + m.setenv("VIRTUALENV_SETUPTOOLS", "bundle") try: tox_run(args) except SystemExit as exception: -@@ -475,15 +474,6 @@ def enable_pypi_server(monkeypatch: pytest.MonkeyPatch, url: str | None) -> None +@@ -476,15 +475,6 @@ def enable_pypi_server(monkeypatch: pytest.MonkeyPatch, url: str | None) -> None monkeypatch.setenv("PIP_TIMEOUT", str(2)) @@ -162,5 +163,5 @@ index efb5b12..8a57426 100644 for left, right in zip_longest(result, exp): assert isinstance(right, Requirement) -- -2.48.1 +2.49.0 diff --git a/python-tox.spec b/python-tox.spec index 41c73e7..fe30974 100644 --- a/python-tox.spec +++ b/python-tox.spec @@ -31,6 +31,9 @@ Source: %{pypi_source tox} # Support Python 3.14.0b1 Patch: https://github.com/tox-dev/tox/pull/3524.patch +# Fix using deprecated virtualenv option --wheel +Patch: https://github.com/tox-dev/tox/pull/3528.patch + # Remove dependency on devpi-process. # Remove dependency on detect-test-pollution. # Remove coverage-related dependencies. @@ -130,6 +133,12 @@ export SETUPTOOLS_SCM_PRETEND_VERSION="%{version}" %if %{with tests} %check +# Upstream requires virtualenv >= 20.31 for tests, and no longer sets VIRTUALENV_WHEEL. +# To support environments with older virtualenv, we set it manually: +%if v"%(%{python3} -c 'import importlib.metadata as im; print(im.version("virtualenv"))' 2>/dev/null || echo 0)" < v"20.31" +export VIRTUALENV_WHEEL=bundle +%endif + # Skipped tests use internal virtualenv functionality to # download wheels which does not work with "bundled" version of wheel in # the Fedora's virtualenv patch. From 2d52eab0d1a7155fa5e3a013067812bcd4a90f8a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miro=20Hron=C4=8Dok?= Date: Mon, 12 May 2025 23:41:12 +0200 Subject: [PATCH 05/25] Run more tests with setuptools 70.1+ But keep test_result_json_sequential skipped with bundled wheel. [skip changelog] --- python-tox.spec | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/python-tox.spec b/python-tox.spec index fe30974..ce6f68e 100644 --- a/python-tox.spec +++ b/python-tox.spec @@ -152,11 +152,16 @@ k="${k-}${k+ and }not test_str_convert_ok_py39" %endif # https://github.com/tox-dev/tox/commit/698f1dd663 -# Until we have setuptools 70.1+ we skip those +# The tests fail with setuptools < 70.1 +%if v"%(%{python3} -c 'import importlib.metadata as im; print(im.version("setuptools"))' 2>/dev/null || echo 0)" < v"70.1" k="${k-}${k+ and }not test_result_json_sequential" k="${k-}${k+ and }not test_setuptools_package" k="${k-}${k+ and }not test_skip_develop_mode" k="${k-}${k+ and }not test_tox_install_pkg_sdist" +%else +# this test fails with virtualenv < 20.31 with bundled wheel +test -z $VIRTUALENV_WHEEL || k="${k-}${k+ and }not test_result_json_sequential" +%endif # The following tests either need internet connection or installed tox # so we only run them on the CI. From afb013056bc6e48ff2fa79d81f31269c0e8e4a25 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miro=20Hron=C4=8Dok?= Date: Mon, 12 May 2025 23:41:58 +0200 Subject: [PATCH 06/25] Don't skip some tests twice We already skip those regardless of %bcond ci_tests. [skip changelog] --- python-tox.spec | 3 --- 1 file changed, 3 deletions(-) diff --git a/python-tox.spec b/python-tox.spec index ce6f68e..573a503 100644 --- a/python-tox.spec +++ b/python-tox.spec @@ -166,9 +166,6 @@ test -z $VIRTUALENV_WHEEL || k="${k-}${k+ and }not test_result_json_sequential" # The following tests either need internet connection or installed tox # so we only run them on the CI. %if %{without ci_tests} -k="${k-}${k+ and }not test_virtualenv_flipped_settings" -k="${k-}${k+ and }not test_virtualenv_env_ignored_if_set" -k="${k-}${k+ and }not test_virtualenv_env_used_if_not_set" k="${k-}${k+ and }not test_build_wheel_external" k="${k-}${k+ and }not keyboard_interrupt" k="${k-}${k+ and }not test_call_as_module" From fa857a331849276def97482f3b15085a0ae6dc4a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miro=20Hron=C4=8Dok?= Date: Tue, 13 May 2025 19:41:15 +0200 Subject: [PATCH 07/25] Without wheel, test_result_json_sequential fetches it from the internet [skip changelog] --- python-tox.spec | 1 + 1 file changed, 1 insertion(+) diff --git a/python-tox.spec b/python-tox.spec index 573a503..d6d9854 100644 --- a/python-tox.spec +++ b/python-tox.spec @@ -171,6 +171,7 @@ k="${k-}${k+ and }not keyboard_interrupt" k="${k-}${k+ and }not test_call_as_module" k="${k-}${k+ and }not test_call_as_exe" k="${k-}${k+ and }not test_run_installpkg_targz" +test -z $VIRTUALENV_WHEEL && k="${k-}${k+ and }not test_result_json_sequential" %endif %pytest -v -n auto -k "${k-}" --run-integration From 62ab817d289f766d18b5ad93de9b9856c3273aaa Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miro=20Hron=C4=8Dok?= Date: Tue, 13 May 2025 19:40:53 +0200 Subject: [PATCH 08/25] Update to 4.26.0 - Requires virtualenv 20.29+ - Supports freethreading Python - Fixes: rhbz#2365939 This drops support for Python 3.8. I don't know if that means running 3.8 venvs, or just running on 3.8, but I dropped all the 3.8 bits, as this update is targeted to Fedora 42+ only anyway. --- 3524.patch | 40 ------------------------------ 3528.patch | 66 ------------------------------------------------- python-tox.spec | 13 ++-------- sources | 2 +- tests/tests.yml | 9 ++++--- 5 files changed, 9 insertions(+), 121 deletions(-) delete mode 100644 3524.patch delete mode 100644 3528.patch diff --git a/3524.patch b/3524.patch deleted file mode 100644 index 48046a4..0000000 --- a/3524.patch +++ /dev/null @@ -1,40 +0,0 @@ -From 3c5d56bf8bb8405d0eceef912ba4cad7d077448c Mon Sep 17 00:00:00 2001 -From: Florian Bruhin -Date: Thu, 8 May 2025 10:47:22 +0200 -Subject: [PATCH] Fix custom HelpFormatter for Python 3.14 - -https://github.com/python/cpython/pull/132323 passes prefix_chars= -(and other arguments) to the formatter_class, but the custom HelpFormatter only -accepted prog=. - -Accept any keyword arguments and pass them on to the parent class. - -Fixes #3523 ---- - docs/changelog/3523.bugfix.rst | 1 + - src/tox/config/cli/parser.py | 4 ++-- - 2 files changed, 3 insertions(+), 2 deletions(-) - create mode 100644 docs/changelog/3523.bugfix.rst - -diff --git a/docs/changelog/3523.bugfix.rst b/docs/changelog/3523.bugfix.rst -new file mode 100644 -index 000000000..3052d877e ---- /dev/null -+++ b/docs/changelog/3523.bugfix.rst -@@ -0,0 +1 @@ -+Fix ``TypeError`` for ``HelpFormatter`` with Python 3.14 -diff --git a/src/tox/config/cli/parser.py b/src/tox/config/cli/parser.py -index 87629ae49..904ff7aad 100644 ---- a/src/tox/config/cli/parser.py -+++ b/src/tox/config/cli/parser.py -@@ -95,8 +95,8 @@ def parse_args( # type: ignore[override] # avoid defining all overloads - class HelpFormatter(ArgumentDefaultsHelpFormatter): - """A help formatter that provides the default value and the source it comes from.""" - -- def __init__(self, prog: str) -> None: -- super().__init__(prog, max_help_position=30, width=240) -+ def __init__(self, prog: str, **kwargs: Any) -> None: -+ super().__init__(prog, max_help_position=30, width=240, **kwargs) - - def _get_help_string(self, action: Action) -> str | None: - text: str = super()._get_help_string(action) or "" diff --git a/3528.patch b/3528.patch deleted file mode 100644 index cbd5904..0000000 --- a/3528.patch +++ /dev/null @@ -1,66 +0,0 @@ -From 32a00aae6fe9d43d8fc5c6e85ce691e1ebfb5323 Mon Sep 17 00:00:00 2001 -From: Robsdedude -Date: Sun, 11 May 2025 22:13:38 +0200 -Subject: [PATCH 1/2] Fix using deprecated virtualenv option `--wheel` - ---- - pyproject.toml | 2 +- - src/tox/pytest.py | 3 ++- - 2 files changed, 3 insertions(+), 2 deletions(-) - -diff --git a/pyproject.toml b/pyproject.toml -index 9c1116c23..9b52c2f36 100644 ---- a/pyproject.toml -+++ b/pyproject.toml -@@ -60,7 +60,7 @@ dependencies = [ - "pyproject-api>=1.8", - "tomli>=2.2.1; python_version<'3.11'", - "typing-extensions>=4.12.2; python_version<'3.11'", -- "virtualenv>=20.29.1", -+ "virtualenv>=20.31", - ] - optional-dependencies.test = [ - "devpi-process>=1.0.2", -diff --git a/src/tox/pytest.py b/src/tox/pytest.py -index 72f410bf5..bca2ad848 100644 ---- a/src/tox/pytest.py -+++ b/src/tox/pytest.py -@@ -281,7 +281,8 @@ def our_setup_state(value: Sequence[str]) -> State: - m.setenv("VIRTUALENV_SYMLINK_APP_DATA", "1") - m.setenv("VIRTUALENV_SYMLINKS", "1") - m.setenv("VIRTUALENV_PIP", "embed") -- m.setenv("VIRTUALENV_WHEEL", "embed") -+ if sys.version_info[:2] < (3, 9): -+ m.setenv("VIRTUALENV_WHEEL", "embed") - m.setenv("VIRTUALENV_SETUPTOOLS", "embed") - try: - tox_run(args) - -From 4d68d2af93aae8208c79b55ff0dfacd4b78a1866 Mon Sep 17 00:00:00 2001 -From: =?UTF-8?q?Bern=C3=A1t=20G=C3=A1bor?= -Date: Mon, 12 May 2025 09:39:48 -0700 -Subject: [PATCH 2/2] Fix test -MIME-Version: 1.0 -Content-Type: text/plain; charset=UTF-8 -Content-Transfer-Encoding: 8bit - -Signed-off-by: Bernát Gábor ---- - tests/session/cmd/test_sequential.py | 4 +++- - 1 file changed, 3 insertions(+), 1 deletion(-) - -diff --git a/tests/session/cmd/test_sequential.py b/tests/session/cmd/test_sequential.py -index 1f4a24624..87771be03 100644 ---- a/tests/session/cmd/test_sequential.py -+++ b/tests/session/cmd/test_sequential.py -@@ -114,7 +114,9 @@ def test_result_json_sequential( - py_test = get_cmd_exit_run_id(log_report, "py", "test") - assert py_test == [(1, "commands[0]"), (0, "commands[1]")] - packaging_installed = log_report["testenvs"]["py"].pop("installed_packages") -- expected_pkg = {"pip", "setuptools", "wheel", "a"} -+ expected_pkg = {"pip", "setuptools", "a"} -+ if sys.version_info[0:2] == (3, 8): -+ expected_pkg.add("wheel") - assert {i[: i.find("==")] if "@" not in i else "a" for i in packaging_installed} == expected_pkg - install_package = log_report["testenvs"]["py"].pop("installpkg") - assert re.match(r"^[a-fA-F0-9]{64}$", install_package.pop("sha256")) diff --git a/python-tox.spec b/python-tox.spec index d6d9854..022afbc 100644 --- a/python-tox.spec +++ b/python-tox.spec @@ -20,7 +20,7 @@ %undefine _py3_shebang_s Name: python-tox -Version: 4.25.0 +Version: 4.26.0 Release: %autorelease Summary: Virtualenv-based automation of test activities @@ -28,12 +28,6 @@ License: MIT URL: https://tox.readthedocs.io/ Source: %{pypi_source tox} -# Support Python 3.14.0b1 -Patch: https://github.com/tox-dev/tox/pull/3524.patch - -# Fix using deprecated virtualenv option --wheel -Patch: https://github.com/tox-dev/tox/pull/3528.patch - # Remove dependency on devpi-process. # Remove dependency on detect-test-pollution. # Remove coverage-related dependencies. @@ -89,9 +83,6 @@ Summary: %{summary} # It recommends all Python versions it supports. (This is an exception to # the rule that Fedora packages may not require the alternative interpreters.) %if 0%{?fedora} -%if 0%{?fedora} < 42 -Recommends: python3.8 -%endif Recommends: python3.9 Recommends: python3.10 Recommends: pypy3-devel @@ -112,7 +103,7 @@ Recommends: python3-devel # see https://github.com/tox-dev/tox/pull/2843#discussion_r1065028356 sed -ri -e 's/"(packaging|filelock|platformdirs|psutil|pyproject-api|pytest|pytest-mock|pytest-xdist|wheel|pluggy|distlib|cachetools|build\[virtualenv\]|setuptools|flaky)>=.*/"\1",/g' \ -e 's/"(time-machine)>=[^;"]+/"\1/' \ - -e 's/"(virtualenv)>=.*/"\1>=20",/g' \ + -e 's/"(virtualenv)>=.*/"\1>=20.29",/g' \ -e 's/"(hatchling)>=.*/"\1>=1.13",/g' \ pyproject.toml diff --git a/sources b/sources index 513ea2c..9428218 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (tox-4.25.0.tar.gz) = 3560b667af03ca41c1bd8fa9eaa90f8c988b7f946498f3bc2d0a4dfa3a481d8ada27acb6201bde284a2bcfe14b86ee409a3ce8e875531423862d1af88e6248fb +SHA512 (tox-4.26.0.tar.gz) = ad2e311cd63c45a079b8c230a2feb364270b7a8bcf44b626385f8e442c6683ae841b3f34417b504f927608685a254fef3767d832fb5cfcc324c9cbf6ff7ea997 diff --git a/tests/tests.yml b/tests/tests.yml index 0244e53..d9f74a1 100644 --- a/tests/tests.yml +++ b/tests/tests.yml @@ -36,9 +36,6 @@ - smoke36: dir: python/smoke run: VERSION=3.6 INSTALL_OR_SKIP=true TOX_REQUIRES="virtualenv<20.22.0" ./venv.sh - - smoke38: - dir: python/smoke - run: VERSION=3.8 INSTALL_OR_SKIP=true ./venv.sh - smoke39: dir: python/smoke run: VERSION=3.9 INSTALL_OR_SKIP=true ./venv.sh @@ -54,9 +51,15 @@ - smoke313: dir: python/smoke run: VERSION=3.13 INSTALL_OR_SKIP=true ./venv.sh + - smoke313t: + dir: python/smoke + run: VERSION=3.13t INSTALL_OR_SKIP=true ./venv.sh - smoke314: dir: python/smoke run: VERSION=3.14 INSTALL_OR_SKIP=true ./venv.sh + - smoke314t: + dir: python/smoke + run: VERSION=3.14t INSTALL_OR_SKIP=true ./venv.sh - smoke_pypy39: dir: python/smoke run: PYTHON=pypy3.9 VERSION=3.9 INSTALL_OR_SKIP=true ./venv.sh From 873d91a17303014a11e3af2b74b728711fffab44 Mon Sep 17 00:00:00 2001 From: Python Maint Date: Tue, 3 Jun 2025 00:40:09 +0200 Subject: [PATCH 09/25] Bootstrap for Python 3.14 --- python-tox.spec | 1 + 1 file changed, 1 insertion(+) diff --git a/python-tox.spec b/python-tox.spec index 022afbc..c7c3db9 100644 --- a/python-tox.spec +++ b/python-tox.spec @@ -1,3 +1,4 @@ +%global _with_bootstrap 1 %bcond bootstrap 0 # Many tests are enabled by default, unless bootstrapping %bcond tests %{without bootstrap} From 728b50e0590de0d1cefbd85e123b6af361a45349 Mon Sep 17 00:00:00 2001 From: Python Maint Date: Tue, 3 Jun 2025 18:22:04 +0200 Subject: [PATCH 10/25] Rebuilt for Python 3.14 --- python-tox.spec | 1 - 1 file changed, 1 deletion(-) diff --git a/python-tox.spec b/python-tox.spec index c7c3db9..022afbc 100644 --- a/python-tox.spec +++ b/python-tox.spec @@ -1,4 +1,3 @@ -%global _with_bootstrap 1 %bcond bootstrap 0 # Many tests are enabled by default, unless bootstrapping %bcond tests %{without bootstrap} From 36ce30e49c54e6c6dd791bdcd4b6a4cd97b7378b Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Fri, 25 Jul 2025 10:49:59 +0000 Subject: [PATCH 11/25] Rebuilt for https://fedoraproject.org/wiki/Fedora_43_Mass_Rebuild From 49e309bd9199feb9bc18f73572f22c91ea5b829e Mon Sep 17 00:00:00 2001 From: Python Maint Date: Fri, 15 Aug 2025 15:02:28 +0200 Subject: [PATCH 12/25] Rebuilt for Python 3.14.0rc2 bytecode From 1a0b1cd795cf291c7c2b393318cc93226581b3db Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Luk=C3=A1=C5=A1=20Zachar?= Date: Mon, 28 Jul 2025 16:57:07 +0200 Subject: [PATCH 13/25] Drop STI and use tmt instead Resolve: rhbz#2383050 --- .fmf/version | 1 + plan.fmf | 97 +++++++++++++++++++++++++++++++++++++++++++++++++ tests/tests.yml | 91 ---------------------------------------------- 3 files changed, 98 insertions(+), 91 deletions(-) create mode 100644 .fmf/version create mode 100644 plan.fmf delete mode 100644 tests/tests.yml diff --git a/.fmf/version b/.fmf/version new file mode 100644 index 0000000..d00491f --- /dev/null +++ b/.fmf/version @@ -0,0 +1 @@ +1 diff --git a/plan.fmf b/plan.fmf new file mode 100644 index 0000000..827567e --- /dev/null +++ b/plan.fmf @@ -0,0 +1,97 @@ +execute: + how: tmt + +discover: + - name: rpms_pyproject-rpm-macros + how: shell + url: https://src.fedoraproject.org/rpms/pyproject-rpm-macros.git + tests: + - name: pyproject_pytest + path: /tests + test: ./mocktest.sh python-pytest + - name: pyproject_pluggy + path: /tests + test: ./mocktest.sh python-pluggy + - name: pyproject_openqa_client + path: /tests + test: ./mocktest.sh python-openqa_client + - name: same_repo + how: shell + dist-git-source: true + dist-git-download-only: true + tests: + - name: all_supplementing_pythons + path: /tests + test: ./all_supplementing_pythons.py + - name: mock_with_tests + # Needs cwd to contain downloaded sources, path to mocktes.sh depends on tmt tree structure + test: | + cd $TMT_SOURCE_DIR && + $TMT_TREE/../discover/rpms_pyproject-rpm-macros/tests/tests/mocktest.sh python-tox --enable-network --with ci_tests + - name: tests_python + how: shell + url: https://src.fedoraproject.org/tests/python.git + tests: + - name: smoke27 + path: /smoke + test: VERSION=2.7 INSTALL_OR_SKIP=true METHOD=virtualenv TOX_REQUIRES="virtualenv<20.22.0" ./venv.sh + - name: smoke36 + path: /smoke + test: VERSION=3.6 INSTALL_OR_SKIP=true TOX_REQUIRES="virtualenv<20.22.0" ./venv.sh + - name: smoke39 + path: /smoke + test: VERSION=3.9 INSTALL_OR_SKIP=true ./venv.sh + - name: smoke310 + path: /smoke + test: VERSION=3.10 INSTALL_OR_SKIP=true ./venv.sh + - name: smoke311 + path: /smoke + test: VERSION=3.11 INSTALL_OR_SKIP=true ./venv.sh + - name: smoke312 + path: /smoke + test: VERSION=3.12 ./venv.sh + - name: smoke313 + path: /smoke + test: VERSION=3.13 INSTALL_OR_SKIP=true ./venv.sh + - name: smoke313t + path: /smoke + test: VERSION=3.13t INSTALL_OR_SKIP=true ./venv.sh + - name: smoke314 + path: /smoke + test: VERSION=3.14 INSTALL_OR_SKIP=true ./venv.sh + - name: smoke314t + path: /smoke + test: VERSION=3.14t INSTALL_OR_SKIP=true ./venv.sh + - name: smoke_pypy39 + path: /smoke + test: PYTHON=pypy3.9 VERSION=3.9 INSTALL_OR_SKIP=true ./venv.sh + - name: smoke_pypy310 + path: /smoke + test: PYTHON=pypy3.10 VERSION=3.10 INSTALL_OR_SKIP=true ./venv.sh + - name: smoke_pypy311 + path: /smoke + test: PYTHON=pypy3.11 VERSION=3.11 INSTALL_OR_SKIP=true ./venv.sh + +prepare: + - name: Install dependencies + how: install + package: + - gcc + - virtualenv + - python3-devel + - python3.12-devel + - python3-tox + - python3-dnf + - mock + - rpmdevtools + - rpm-build + - python3-pyyaml + - rpm + - dnf + - name: Update packages + how: shell + script: dnf upgrade -y + - name: rpm_qa + order: 100 + how: shell + script: rpm -qa | sort | tee $TMT_PLAN_DATA/rpmqa.txt diff --git a/tests/tests.yml b/tests/tests.yml deleted file mode 100644 index d9f74a1..0000000 --- a/tests/tests.yml +++ /dev/null @@ -1,91 +0,0 @@ ---- -- hosts: localhost - tags: - - classic - tasks: - - dnf: - name: "*" - state: latest - -- hosts: localhost - tags: - - classic - pre_tasks: - - import_role: - name: standard-test-source - vars: - fetch_only: True - - roles: - - role: standard-test-basic - repositories: - - repo: "https://src.fedoraproject.org/tests/python.git" - dest: "python" - - repo: "https://src.fedoraproject.org/rpms/pyproject-rpm-macros.git" - dest: "pyproject-rpm-macros" - tests: - - mock_with_tests: - dir: . - run: pyproject-rpm-macros/tests/mocktest.sh python-tox --enable-network --with ci_tests - - all_supplementing_pythons: - dir: tests - run: ./all_supplementing_pythons.py - - smoke27: - dir: python/smoke - run: VERSION=2.7 INSTALL_OR_SKIP=true METHOD=virtualenv TOX_REQUIRES="virtualenv<20.22.0" ./venv.sh - - smoke36: - dir: python/smoke - run: VERSION=3.6 INSTALL_OR_SKIP=true TOX_REQUIRES="virtualenv<20.22.0" ./venv.sh - - smoke39: - dir: python/smoke - run: VERSION=3.9 INSTALL_OR_SKIP=true ./venv.sh - - smoke310: - dir: python/smoke - run: VERSION=3.10 INSTALL_OR_SKIP=true ./venv.sh - - smoke311: - dir: python/smoke - run: VERSION=3.11 INSTALL_OR_SKIP=true ./venv.sh - - smoke312: - dir: python/smoke - run: VERSION=3.12 ./venv.sh - - smoke313: - dir: python/smoke - run: VERSION=3.13 INSTALL_OR_SKIP=true ./venv.sh - - smoke313t: - dir: python/smoke - run: VERSION=3.13t INSTALL_OR_SKIP=true ./venv.sh - - smoke314: - dir: python/smoke - run: VERSION=3.14 INSTALL_OR_SKIP=true ./venv.sh - - smoke314t: - dir: python/smoke - run: VERSION=3.14t INSTALL_OR_SKIP=true ./venv.sh - - smoke_pypy39: - dir: python/smoke - run: PYTHON=pypy3.9 VERSION=3.9 INSTALL_OR_SKIP=true ./venv.sh - - smoke_pypy310: - dir: python/smoke - run: PYTHON=pypy3.10 VERSION=3.10 INSTALL_OR_SKIP=true ./venv.sh - - smoke_pypy311: - dir: python/smoke - run: PYTHON=pypy3.11 VERSION=3.11 INSTALL_OR_SKIP=true ./venv.sh - - pyproject_pytest: - dir: pyproject-rpm-macros/tests - run: ./mocktest.sh python-pytest - - pyproject_pluggy: - dir: pyproject-rpm-macros/tests - run: ./mocktest.sh python-pluggy - - pyproject_openqa_client: - dir: pyproject-rpm-macros/tests - run: ./mocktest.sh python-openqa_client - required_packages: - - gcc - - virtualenv - - python3-devel - - python3.12-devel - - python3-tox - - python3-dnf - - mock - - rpmdevtools - - rpm-build - - python3-pyyaml From a0c7d6d2fbe89c77775185444cd2549f0763cedf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Luk=C3=A1=C5=A1=20Zachar?= Date: Thu, 14 Aug 2025 16:45:13 +0200 Subject: [PATCH 14/25] Change all_supplementing_pythons to work with tmt If there are no special fmf features used, fmf is a plain yaml. Which is case here so there is no need to use 'fmf' to parse plan.fmf --- plan.fmf | 3 +-- tests/all_supplementing_pythons.py | 20 +++++++++++--------- 2 files changed, 12 insertions(+), 11 deletions(-) diff --git a/plan.fmf b/plan.fmf index 827567e..c1a605f 100644 --- a/plan.fmf +++ b/plan.fmf @@ -21,8 +21,7 @@ discover: dist-git-download-only: true tests: - name: all_supplementing_pythons - path: /tests - test: ./all_supplementing_pythons.py + test: ./tests/all_supplementing_pythons.py - name: mock_with_tests # Needs cwd to contain downloaded sources, path to mocktes.sh depends on tmt tree structure test: | diff --git a/tests/all_supplementing_pythons.py b/tests/all_supplementing_pythons.py index 223bdf1..a473ae2 100755 --- a/tests/all_supplementing_pythons.py +++ b/tests/all_supplementing_pythons.py @@ -8,7 +8,7 @@ See https://lists.fedoraproject.org/archives/list/python-devel@lists.fedoraproje This script: 1) figures out all packages in the enabled repositories supplementing tox - 2) ensures there is a venv.sh test for each of them in tests.yml + 2) ensures there is a venv.sh test for each of them in plan.fmf That way, when we change tox (update, patch, etc.), we will always test it with all Pythons that supplement it. @@ -34,16 +34,18 @@ def parse_python_test_arg(command): # First, construct a set of various Pythons we test, e.g. {python3.10, python3.7, pypy3.6, ...} tested_pythons = set() -with open('tests.yml') as f: - tests_yml = yaml.safe_load(f) +with open('plan.fmf') as f: + plan_fmf = yaml.safe_load(f) # this nested structure access is quite fragile, # but at least it should fail the test if we reach to a wrong place -for test in tests_yml[-1]['roles'][0]['tests']: - for value in test.values(): - run = value['run'] - if run.endswith('./venv.sh'): - tested_pythons.add(parse_python_test_arg(run)) -print('Tested Pythons found in tests.yml:', file=sys.stderr) +for discover_section in plan_fmf['discover']: + if discover_section['name'] != 'tests_python': + continue + for test in discover_section['tests']: + test_cmd = test['test'] + if test_cmd.endswith('./venv.sh'): + tested_pythons.add(parse_python_test_arg(test_cmd)) +print('Tested Pythons found in plan.fmf:', file=sys.stderr) for python in sorted(tested_pythons): print(' ', python, file=sys.stderr) From ddf7ecd3d86343d04a0d4cda3691817d1cd93f3f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miro=20Hron=C4=8Dok?= Date: Thu, 4 Sep 2025 12:36:53 +0200 Subject: [PATCH 15/25] Fix build in ELN [skip changelog] --- python-tox.spec | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/python-tox.spec b/python-tox.spec index 022afbc..c3df30c 100644 --- a/python-tox.spec +++ b/python-tox.spec @@ -107,6 +107,14 @@ sed -ri -e 's/"(packaging|filelock|platformdirs|psutil|pyproject-api|pytest|pyte -e 's/"(hatchling)>=.*/"\1>=1.13",/g' \ pyproject.toml +%if 0%{?rhel} +# There is no build[virtualenv] packaged in ELN +# https://github.com/fedora-eln/eln/issues/309 +# We flatten the test depndency to build and virtualenv (already listed in runtime deps) +sed -i 's/"build\[virtualenv\]"/"build"/' pyproject.toml +%endif + + %generate_buildrequires export SETUPTOOLS_SCM_PRETEND_VERSION="%{version}" %pyproject_buildrequires -r %{?with_tests:-g test} From a8537e2385547229093a2328aa5b0295eca6cbac Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miro=20Hron=C4=8Dok?= Date: Wed, 3 Sep 2025 23:17:13 +0200 Subject: [PATCH 16/25] Update to 4.30.1 - Fixes: rhbz#2382185 pluggy 1.5 seems to be actually needed for https://github.com/tox-dev/tox/pull/3560 --- fix-tests.patch | 64 ++++++++++++++++++++++++++----------------------- python-tox.spec | 7 ++++-- sources | 2 +- 3 files changed, 40 insertions(+), 33 deletions(-) diff --git a/fix-tests.patch b/fix-tests.patch index d76215f..fd56022 100644 --- a/fix-tests.patch +++ b/fix-tests.patch @@ -1,4 +1,4 @@ -From 924b03e0446561bbfca9679a44642a1a96dd8f10 Mon Sep 17 00:00:00 2001 +From 1e9b70829b06f6e972b23ee909db56366a48f025 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tom=C3=A1=C5=A1=20Hrn=C4=8Diar?= Date: Fri, 28 Mar 2025 09:44:24 +0100 Subject: [PATCH] Fix tests @@ -9,41 +9,45 @@ Content-Transfer-Encoding: 8bit Co-Authored-By: Lumir Balhar Co-Authored-By: Miro Hrončok --- - pyproject.toml | 11 +---------- + pyproject.toml | 10 +--------- src/tox/pytest.py | 16 +++------------- tests/test_provision.py | 18 ++---------------- .../package/test_python_package_util.py | 10 ++++++++-- - 4 files changed, 14 insertions(+), 41 deletions(-) + 4 files changed, 14 insertions(+), 40 deletions(-) diff --git a/pyproject.toml b/pyproject.toml -index 9b52c2f..335012b 100644 +index a7323bf..ed9b315 100644 --- a/pyproject.toml +++ b/pyproject.toml -@@ -82,22 +82,16 @@ dev = [ +@@ -77,11 +77,6 @@ dev = [ ] test = [ "build[virtualenv]>=1.2.2.post1", - "covdefaults>=2.3", +- "coverage>=7.9.2", - "detect-test-pollution>=1.2", - "devpi-process>=1.0.2", -- "diff-cover>=9.2", - "distlib>=0.3.9", +- "diff-cover>=9.6", + "distlib>=0.4", "flaky>=3.8.1", - "hatch-vcs>=0.4", - "hatchling>=1.27", - "psutil>=6.1.1", - "pytest>=8.3.4", -- "pytest-cov>=5", - "pytest-mock>=3.14", - "pytest-xdist>=3.6.1", + "hatch-vcs>=0.5", +@@ -89,7 +84,6 @@ test = [ + "pdm-backend", + "psutil>=7", + "pytest>=8.4.1", +- "pytest-cov>=6.2.1", + "pytest-mock>=3.14.1", + "pytest-xdist>=3.8", "re-assert>=1.1", -- "setuptools>=75.3; python_version<='3.8'", -- "setuptools>=75.8; python_version>'3.8'", -+ "setuptools>=75.1", - "time-machine>=2.15; implementation_name!='pypy'", - "wheel>=0.45.1", +@@ -203,6 +197,7 @@ filterwarnings = [ + "error", + "ignore:unclosed database in None +@@ -480,15 +479,6 @@ def enable_pypi_server(monkeypatch: pytest.MonkeyPatch, url: str | None) -> None monkeypatch.setenv("PIP_TIMEOUT", str(2)) @@ -96,10 +100,10 @@ index bca2ad8..973e714 100644 def _invalid_index_fake_port() -> int: with closing(socket.socket(socket.AF_INET, socket.SOCK_STREAM)) as socket_handler: diff --git a/tests/test_provision.py b/tests/test_provision.py -index 2030cb9..f706d6c 100644 +index 0cf4de5..9505bf1 100644 --- a/tests/test_provision.py +++ b/tests/test_provision.py -@@ -98,22 +98,9 @@ def tox_wheels(tox_wheel: Path, tmp_path_factory: TempPathFactory) -> list[Path] +@@ -101,22 +101,9 @@ def tox_wheels(tox_wheel: Path, tmp_path_factory: TempPathFactory) -> list[Path] return result @@ -124,7 +128,7 @@ index 2030cb9..f706d6c 100644 def test_provision_requires_nok(tox_project: ToxProjectCreator) -> None: ini = "[tox]\nrequires = pkg-does-not-exist\n setuptools==1\nskipsdist=true\n" -@@ -161,7 +148,6 @@ def test_provision_requires_ok(tox_project: ToxProjectCreator, tmp_path: Path) - +@@ -164,7 +151,6 @@ def test_provision_requires_ok(tox_project: ToxProjectCreator, tmp_path: Path) - @pytest.mark.integration @@ -133,7 +137,7 @@ index 2030cb9..f706d6c 100644 ini = "[tox]\nrequires=demo-pkg-inline\n[testenv]\npackage=skip\n[testenv:.tox]\nplatform=wrong_platform" proj = tox_project({"tox.ini": ini}) diff --git a/tests/tox_env/python/virtual_env/package/test_python_package_util.py b/tests/tox_env/python/virtual_env/package/test_python_package_util.py -index efb5b12..8a57426 100644 +index 3802147..7f64d90 100644 --- a/tests/tox_env/python/virtual_env/package/test_python_package_util.py +++ b/tests/tox_env/python/virtual_env/package/test_python_package_util.py @@ -15,6 +15,12 @@ if TYPE_CHECKING: @@ -151,8 +155,8 @@ index efb5b12..8a57426 100644 def pkg_with_extras(pkg_with_extras_project: Path) -> PathDistribution: @@ -43,10 +49,10 @@ def test_load_dependency_many_extra(pkg_with_extras: PathDistribution) -> None: exp = [ - Requirement("platformdirs>=2.1"), - Requirement("colorama>=0.4.3"), + Requirement("platformdirs>=4.3.8"), + Requirement("colorama>=0.4.6"), - *(sphinx if sys.version_info[0:2] <= (3, 8) else []), + *(sphinx if not SETUPTOOLS_75_6 else []), Requirement(f'covdefaults>=1.2; python_version == "2.7" or python_version == "{py_ver}"'), @@ -163,5 +167,5 @@ index efb5b12..8a57426 100644 for left, right in zip_longest(result, exp): assert isinstance(right, Requirement) -- -2.49.0 +2.51.0 diff --git a/python-tox.spec b/python-tox.spec index c3df30c..6ba4870 100644 --- a/python-tox.spec +++ b/python-tox.spec @@ -20,7 +20,7 @@ %undefine _py3_shebang_s Name: python-tox -Version: 4.26.0 +Version: 4.30.1 Release: %autorelease Summary: Virtualenv-based automation of test activities @@ -33,6 +33,7 @@ Source: %{pypi_source tox} # Remove coverage-related dependencies. # Adjust virtualenv environment variables to make it work with our patched virtualenv. # Adjust setuptools-version specific ifs to check for setuptools version rather than Python version. +# Ignore ResourceWarning: subprocess ... is still running (happens arbitrarily, possibly due to pytest-xdist usage) Patch: fix-tests.patch BuildArch: noarch @@ -101,10 +102,11 @@ Recommends: python3-devel # Upstream updates dependencies too aggressively # see https://github.com/tox-dev/tox/pull/2843#discussion_r1065028356 -sed -ri -e 's/"(packaging|filelock|platformdirs|psutil|pyproject-api|pytest|pytest-mock|pytest-xdist|wheel|pluggy|distlib|cachetools|build\[virtualenv\]|setuptools|flaky)>=.*/"\1",/g' \ +sed -ri -e 's/"(packaging|filelock|platformdirs|psutil|pyproject-api|pytest|pytest-mock|pytest-xdist|wheel|distlib|cachetools|build\[virtualenv\]|setuptools|flaky|hatch-vcs)>=.*/"\1",/g' \ -e 's/"(time-machine)>=[^;"]+/"\1/' \ -e 's/"(virtualenv)>=.*/"\1>=20.29",/g' \ -e 's/"(hatchling)>=.*/"\1>=1.13",/g' \ + -e 's/"(pluggy)>=.*/"\1>=1.5",/g' \ pyproject.toml %if 0%{?rhel} @@ -170,6 +172,7 @@ k="${k-}${k+ and }not keyboard_interrupt" k="${k-}${k+ and }not test_call_as_module" k="${k-}${k+ and }not test_call_as_exe" k="${k-}${k+ and }not test_run_installpkg_targz" +k="${k-}${k+ and }not test_pyproject_installpkg_pep517_envs" test -z $VIRTUALENV_WHEEL && k="${k-}${k+ and }not test_result_json_sequential" %endif diff --git a/sources b/sources index 9428218..326f159 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (tox-4.26.0.tar.gz) = ad2e311cd63c45a079b8c230a2feb364270b7a8bcf44b626385f8e442c6683ae841b3f34417b504f927608685a254fef3767d832fb5cfcc324c9cbf6ff7ea997 +SHA512 (tox-4.30.1.tar.gz) = 55fd7a07d697faedde4fa3ed586b56cc6bba4c9ab73620ee9f6a33dddff674af0bb5d58897b3bd844aefa5b8cae0b1c159407245f9c4457c4fa77201b2cbbb0b From 661fadce9e77a895a5beaab1866cb379feebc966 Mon Sep 17 00:00:00 2001 From: Python Maint Date: Fri, 19 Sep 2025 14:38:08 +0200 Subject: [PATCH 17/25] Rebuilt for Python 3.14.0rc3 bytecode From 6e8b540f1ff7c58545111cf834099469b238b836 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miro=20Hron=C4=8Dok?= Date: Mon, 8 Sep 2025 09:49:24 +0200 Subject: [PATCH 18/25] Revert "Fix build in ELN" This reverts commit ddf7ecd3d86343d04a0d4cda3691817d1cd93f3f. No longer needed due to https://src.fedoraproject.org/rpms/python-build/c/4a39a0b151 [skip changelog] --- python-tox.spec | 8 -------- 1 file changed, 8 deletions(-) diff --git a/python-tox.spec b/python-tox.spec index 6ba4870..c23d447 100644 --- a/python-tox.spec +++ b/python-tox.spec @@ -109,14 +109,6 @@ sed -ri -e 's/"(packaging|filelock|platformdirs|psutil|pyproject-api|pytest|pyte -e 's/"(pluggy)>=.*/"\1>=1.5",/g' \ pyproject.toml -%if 0%{?rhel} -# There is no build[virtualenv] packaged in ELN -# https://github.com/fedora-eln/eln/issues/309 -# We flatten the test depndency to build and virtualenv (already listed in runtime deps) -sed -i 's/"build\[virtualenv\]"/"build"/' pyproject.toml -%endif - - %generate_buildrequires export SETUPTOOLS_SCM_PRETEND_VERSION="%{version}" %pyproject_buildrequires -r %{?with_tests:-g test} From 4685d09abfeea9f84c9fcdc7d7a588dce7289263 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miro=20Hron=C4=8Dok?= Date: Mon, 6 Oct 2025 23:25:05 +0200 Subject: [PATCH 19/25] Update to 4.30.3 - Fixes: rhbz#2393223 --- fix-tests.patch | 49 ++++++++++++++++++++++--------------------------- python-tox.spec | 2 +- sources | 2 +- 3 files changed, 24 insertions(+), 29 deletions(-) diff --git a/fix-tests.patch b/fix-tests.patch index fd56022..c24144f 100644 --- a/fix-tests.patch +++ b/fix-tests.patch @@ -1,4 +1,4 @@ -From 1e9b70829b06f6e972b23ee909db56366a48f025 Mon Sep 17 00:00:00 2001 +From 276688b3d884787663a1832990025c3402770961 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tom=C3=A1=C5=A1=20Hrn=C4=8Diar?= Date: Fri, 28 Mar 2025 09:44:24 +0100 Subject: [PATCH] Fix tests @@ -9,11 +9,11 @@ Content-Transfer-Encoding: 8bit Co-Authored-By: Lumir Balhar Co-Authored-By: Miro Hrončok --- - pyproject.toml | 10 +--------- - src/tox/pytest.py | 16 +++------------- - tests/test_provision.py | 18 ++---------------- - .../package/test_python_package_util.py | 10 ++++++++-- - 4 files changed, 14 insertions(+), 40 deletions(-) + pyproject.toml | 10 +--------- + src/tox/pytest.py | 16 +++------------- + tests/test_provision.py | 11 ++++------- + .../package/test_python_package_util.py | 10 ++++++++-- + 4 files changed, 16 insertions(+), 31 deletions(-) diff --git a/pyproject.toml b/pyproject.toml index a7323bf..ed9b315 100644 @@ -100,35 +100,30 @@ index bfdc7e6..9a02df3 100644 def _invalid_index_fake_port() -> int: with closing(socket.socket(socket.AF_INET, socket.SOCK_STREAM)) as socket_handler: diff --git a/tests/test_provision.py b/tests/test_provision.py -index 0cf4de5..9505bf1 100644 +index 2cde4f6..0baba46 100644 --- a/tests/test_provision.py +++ b/tests/test_provision.py -@@ -101,22 +101,9 @@ def tox_wheels(tox_wheel: Path, tmp_path_factory: TempPathFactory) -> list[Path] - return result +@@ -124,15 +124,13 @@ def _use_pypi_index(pypi_index: Index, monkeypatch: MonkeyPatch) -> None: --@pytest.fixture(scope="session") --def pypi_index_self(pypi_server: IndexServer, tox_wheels: list[Path], demo_pkg_inline_wheel: Path) -> Index: -- with elapsed("start devpi and create index"): # takes around 1s -- self_index = pypi_server.create_index("self", "volatile=False") -- with elapsed("upload tox and its wheels to devpi"): # takes around 3.2s on build -- self_index.upload(*tox_wheels, demo_pkg_inline_wheel) -- return self_index -- -- @pytest.fixture --def _pypi_index_self(pypi_index_self: Index, monkeypatch: MonkeyPatch) -> None: -- pypi_index_self.use() -- monkeypatch.setenv("PIP_INDEX_URL", pypi_index_self.url) -- monkeypatch.setenv("PIP_RETRIES", str(2)) -- monkeypatch.setenv("PIP_TIMEOUT", str(5)) -- -+def _pypi_index_self(): +-def _pypi_index_mirrored(local_pypi_indexes: tuple[Index, Index], monkeypatch: MonkeyPatch) -> None: +- pypi_index_mirrored, _ = local_pypi_indexes +- _use_pypi_index(pypi_index_mirrored, monkeypatch) ++def _pypi_index_mirrored() -> None: + pytest.skip("needs devpi-process") + + @pytest.fixture +-def _pypi_index_self(local_pypi_indexes: tuple[Index, Index], monkeypatch: MonkeyPatch) -> None: +- _, pypi_index_self = local_pypi_indexes +- _use_pypi_index(pypi_index_self, monkeypatch) ++def _pypi_index_self() -> None: ++ pytest.skip("needs devpi-process") + + def test_provision_requires_nok(tox_project: ToxProjectCreator) -> None: - ini = "[tox]\nrequires = pkg-does-not-exist\n setuptools==1\nskipsdist=true\n" -@@ -164,7 +151,6 @@ def test_provision_requires_ok(tox_project: ToxProjectCreator, tmp_path: Path) - +@@ -181,7 +179,6 @@ def test_provision_requires_ok(tox_project: ToxProjectCreator, tmp_path: Path) - @pytest.mark.integration diff --git a/python-tox.spec b/python-tox.spec index c23d447..71a7dd7 100644 --- a/python-tox.spec +++ b/python-tox.spec @@ -20,7 +20,7 @@ %undefine _py3_shebang_s Name: python-tox -Version: 4.30.1 +Version: 4.30.3 Release: %autorelease Summary: Virtualenv-based automation of test activities diff --git a/sources b/sources index 326f159..a5ffa2f 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (tox-4.30.1.tar.gz) = 55fd7a07d697faedde4fa3ed586b56cc6bba4c9ab73620ee9f6a33dddff674af0bb5d58897b3bd844aefa5b8cae0b1c159407245f9c4457c4fa77201b2cbbb0b +SHA512 (tox-4.30.3.tar.gz) = c4ef909b7e369844042f26ae4c492ec4c78cd0efe11af80f36159304166cd6e77b75b8191de0e78870f414c921230402bccdfda5ceeb56e4194abc66f076f720 From f8840a782cedc92289952fe09f9c5c66b0642812 Mon Sep 17 00:00:00 2001 From: Karolina Surma Date: Thu, 23 Oct 2025 15:57:50 +0200 Subject: [PATCH 20/25] CI: Run tests with Python 3.15 [skip changelog] --- plan.fmf | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/plan.fmf b/plan.fmf index c1a605f..c10b63e 100644 --- a/plan.fmf +++ b/plan.fmf @@ -61,6 +61,12 @@ discover: - name: smoke314t path: /smoke test: VERSION=3.14t INSTALL_OR_SKIP=true ./venv.sh + - name: smoke315 + path: /smoke + test: VERSION=3.15 INSTALL_OR_SKIP=true ./venv.sh + - name: smoke315t + path: /smoke + test: VERSION=3.15t INSTALL_OR_SKIP=true ./venv.sh - name: smoke_pypy39 path: /smoke test: PYTHON=pypy3.9 VERSION=3.9 INSTALL_OR_SKIP=true ./venv.sh From b9bd279702d7e978d60bd1e766c769bdb95fa0ad Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miro=20Hron=C4=8Dok?= Date: Thu, 6 Nov 2025 11:58:23 +0100 Subject: [PATCH 21/25] Adjust the sed in %prep to unpin all test deps [skip changelog] --- python-tox.spec | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/python-tox.spec b/python-tox.spec index 71a7dd7..afc7ab4 100644 --- a/python-tox.spec +++ b/python-tox.spec @@ -102,11 +102,13 @@ Recommends: python3-devel # Upstream updates dependencies too aggressively # see https://github.com/tox-dev/tox/pull/2843#discussion_r1065028356 -sed -ri -e 's/"(packaging|filelock|platformdirs|psutil|pyproject-api|pytest|pytest-mock|pytest-xdist|wheel|distlib|cachetools|build\[virtualenv\]|setuptools|flaky|hatch-vcs)>=.*/"\1",/g' \ - -e 's/"(time-machine)>=[^;"]+/"\1/' \ +# First, carefully adjust the pins of build and runtime dependencies, +# then remove all the >= specifiers from tests deps, whatever they are. +sed -ri -e 's/"(packaging|filelock|platformdirs|pyproject-api|cachetools|hatch-vcs)>=.*/"\1",/g' \ -e 's/"(virtualenv)>=.*/"\1>=20.29",/g' \ -e 's/"(hatchling)>=.*/"\1>=1.13",/g' \ -e 's/"(pluggy)>=.*/"\1>=1.5",/g' \ + -e '/^test = \[/,/^\]/ { s/>=[^;"]+// }' \ pyproject.toml %generate_buildrequires From 91ed59fa8e8cc40487b88e761d6f21a052ba2583 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miro=20Hron=C4=8Dok?= Date: Thu, 6 Nov 2025 11:29:52 +0100 Subject: [PATCH 22/25] Update to 4.32.0 - Fixes: rhbz#2406240 --- fix-tests.patch | 59 +++++++++++++++++++++++-------------------------- python-tox.spec | 2 +- sources | 2 +- 3 files changed, 30 insertions(+), 33 deletions(-) diff --git a/fix-tests.patch b/fix-tests.patch index c24144f..7caaa2d 100644 --- a/fix-tests.patch +++ b/fix-tests.patch @@ -1,4 +1,4 @@ -From 276688b3d884787663a1832990025c3402770961 Mon Sep 17 00:00:00 2001 +From 42a461b71597e85e7902571348786aa4ab848cf8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tom=C3=A1=C5=A1=20Hrn=C4=8Diar?= Date: Fri, 28 Mar 2025 09:44:24 +0100 Subject: [PATCH] Fix tests @@ -9,37 +9,37 @@ Content-Transfer-Encoding: 8bit Co-Authored-By: Lumir Balhar Co-Authored-By: Miro Hrončok --- - pyproject.toml | 10 +--------- - src/tox/pytest.py | 16 +++------------- - tests/test_provision.py | 11 ++++------- - .../package/test_python_package_util.py | 10 ++++++++-- - 4 files changed, 16 insertions(+), 31 deletions(-) + pyproject.toml | 10 +--------- + src/tox/pytest.py | 14 ++------------ + tests/test_provision.py | 11 ++++------- + .../package/test_python_package_util.py | 10 ++++++++-- + 4 files changed, 15 insertions(+), 30 deletions(-) diff --git a/pyproject.toml b/pyproject.toml -index a7323bf..ed9b315 100644 +index 6920d19..53326bc 100644 --- a/pyproject.toml +++ b/pyproject.toml -@@ -77,11 +77,6 @@ dev = [ +@@ -76,11 +76,6 @@ dev = [ ] test = [ - "build[virtualenv]>=1.2.2.post1", + "build[virtualenv]>=1.3", - "covdefaults>=2.3", -- "coverage>=7.9.2", +- "coverage>=7.10.7", - "detect-test-pollution>=1.2", - "devpi-process>=1.0.2", -- "diff-cover>=9.6", +- "diff-cover>=9.7.1", "distlib>=0.4", "flaky>=3.8.1", "hatch-vcs>=0.5", -@@ -89,7 +84,6 @@ test = [ - "pdm-backend", - "psutil>=7", - "pytest>=8.4.1", -- "pytest-cov>=6.2.1", - "pytest-mock>=3.14.1", +@@ -88,7 +83,6 @@ test = [ + "pdm-backend>=2.4.5", + "psutil>=7.1", + "pytest>=8.4.2", +- "pytest-cov>=7", + "pytest-mock>=3.15.1", "pytest-xdist>=3.8", "re-assert>=1.1", -@@ -203,6 +197,7 @@ filterwarnings = [ +@@ -201,6 +195,7 @@ filterwarnings = [ "error", "ignore:unclosed database in None +@@ -479,15 +478,6 @@ def enable_pypi_server(monkeypatch: pytest.MonkeyPatch, url: str | None) -> None monkeypatch.setenv("PIP_TIMEOUT", str(2)) @@ -100,10 +97,10 @@ index bfdc7e6..9a02df3 100644 def _invalid_index_fake_port() -> int: with closing(socket.socket(socket.AF_INET, socket.SOCK_STREAM)) as socket_handler: diff --git a/tests/test_provision.py b/tests/test_provision.py -index 2cde4f6..0baba46 100644 +index d1b6b2d..022e340 100644 --- a/tests/test_provision.py +++ b/tests/test_provision.py -@@ -124,15 +124,13 @@ def _use_pypi_index(pypi_index: Index, monkeypatch: MonkeyPatch) -> None: +@@ -126,15 +126,13 @@ def _use_pypi_index(pypi_index: Index, monkeypatch: MonkeyPatch) -> None: @pytest.fixture @@ -123,7 +120,7 @@ index 2cde4f6..0baba46 100644 def test_provision_requires_nok(tox_project: ToxProjectCreator) -> None: -@@ -181,7 +179,6 @@ def test_provision_requires_ok(tox_project: ToxProjectCreator, tmp_path: Path) - +@@ -183,7 +181,6 @@ def test_provision_requires_ok(tox_project: ToxProjectCreator, tmp_path: Path) - @pytest.mark.integration @@ -162,5 +159,5 @@ index 3802147..7f64d90 100644 for left, right in zip_longest(result, exp): assert isinstance(right, Requirement) -- -2.51.0 +2.51.1 diff --git a/python-tox.spec b/python-tox.spec index afc7ab4..ead1f71 100644 --- a/python-tox.spec +++ b/python-tox.spec @@ -20,7 +20,7 @@ %undefine _py3_shebang_s Name: python-tox -Version: 4.30.3 +Version: 4.32.0 Release: %autorelease Summary: Virtualenv-based automation of test activities diff --git a/sources b/sources index a5ffa2f..29364be 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (tox-4.30.3.tar.gz) = c4ef909b7e369844042f26ae4c492ec4c78cd0efe11af80f36159304166cd6e77b75b8191de0e78870f414c921230402bccdfda5ceeb56e4194abc66f076f720 +SHA512 (tox-4.32.0.tar.gz) = eabe1ef037f3b44947dd13e11528cd702762d6b38cf87ae7675643d7f09b2b3ddd9761a395713e95f286ffc44d77495998f68ed2f0491910f64308fb15f726ff From bfcb4db415572ca4100bfd84aae98a09d4ba09d3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miro=20Hron=C4=8Dok?= Date: Mon, 10 Nov 2025 11:19:50 +0100 Subject: [PATCH 23/25] Move test dependencies removal from fix-tests.patch to a sed That way, the patch is easier applied for future rebases. pyproject.toml after %prep is identical to what it was before this commit. [skip changelog] --- fix-tests.patch | 22 +--------------------- python-tox.spec | 9 +++++---- 2 files changed, 6 insertions(+), 25 deletions(-) diff --git a/fix-tests.patch b/fix-tests.patch index 7caaa2d..83da6ad 100644 --- a/fix-tests.patch +++ b/fix-tests.patch @@ -9,7 +9,7 @@ Content-Transfer-Encoding: 8bit Co-Authored-By: Lumir Balhar Co-Authored-By: Miro Hrončok --- - pyproject.toml | 10 +--------- + pyproject.toml | 4 +--- src/tox/pytest.py | 14 ++------------ tests/test_provision.py | 11 ++++------- .../package/test_python_package_util.py | 10 ++++++++-- @@ -19,26 +19,6 @@ diff --git a/pyproject.toml b/pyproject.toml index 6920d19..53326bc 100644 --- a/pyproject.toml +++ b/pyproject.toml -@@ -76,11 +76,6 @@ dev = [ - ] - test = [ - "build[virtualenv]>=1.3", -- "covdefaults>=2.3", -- "coverage>=7.10.7", -- "detect-test-pollution>=1.2", -- "devpi-process>=1.0.2", -- "diff-cover>=9.7.1", - "distlib>=0.4", - "flaky>=3.8.1", - "hatch-vcs>=0.5", -@@ -88,7 +83,6 @@ test = [ - "pdm-backend>=2.4.5", - "psutil>=7.1", - "pytest>=8.4.2", -- "pytest-cov>=7", - "pytest-mock>=3.15.1", - "pytest-xdist>=3.8", - "re-assert>=1.1", @@ -201,6 +195,7 @@ filterwarnings = [ "error", "ignore:unclosed database in = specifiers from tests deps, whatever they are. +# then remove all the >= specifiers from tests deps, whatever they are, +# finally, remove undesired test dependencies. sed -ri -e 's/"(packaging|filelock|platformdirs|pyproject-api|cachetools|hatch-vcs)>=.*/"\1",/g' \ -e 's/"(virtualenv)>=.*/"\1>=20.29",/g' \ -e 's/"(hatchling)>=.*/"\1>=1.13",/g' \ -e 's/"(pluggy)>=.*/"\1>=1.5",/g' \ -e '/^test = \[/,/^\]/ { s/>=[^;"]+// }' \ + -e '/^test = \[/,/^\]/ { /"(covdefaults|coverage|detect-test-pollution|devpi-process|diff-cover|pytest-cov)[;"]/d }' \ pyproject.toml %generate_buildrequires From de396d650bf66f5941e8e70b16250ac5cde03049 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miro=20Hron=C4=8Dok?= Date: Mon, 5 Jan 2026 16:18:46 +0100 Subject: [PATCH 24/25] CI: Fix all_supplementing_pythons wrt. freethreading Pythons [skip changelog] --- tests/all_supplementing_pythons.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/tests/all_supplementing_pythons.py b/tests/all_supplementing_pythons.py index a473ae2..6c2dadd 100755 --- a/tests/all_supplementing_pythons.py +++ b/tests/all_supplementing_pythons.py @@ -66,10 +66,13 @@ for nvra in supplementing_pkgs: # We use this hack to treat -devel and -libs packages as if they were not such +# We also convert the freethreading packages to the exectuable name def normalize_name(pkgname): for suffix in '-devel', '-libs': if pkgname.endswith(suffix): - return pkgname.removesuffix(suffix) + pkgname = pkgname.removesuffix(suffix) + if pkgname.endswith('-freethreading'): + pkgname = pkgname.removesuffix('-freethreading') + 't' return pkgname From eb2fd83e5a29ac61636bf810ff09f7517fb32b76 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miro=20Hron=C4=8Dok?= Date: Mon, 5 Jan 2026 15:30:31 +0100 Subject: [PATCH 25/25] Update to 4.33.0 - Fixes: rhbz#2426906 --- python-tox.spec | 2 +- sources | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/python-tox.spec b/python-tox.spec index 2416cbb..a5f044f 100644 --- a/python-tox.spec +++ b/python-tox.spec @@ -20,7 +20,7 @@ %undefine _py3_shebang_s Name: python-tox -Version: 4.32.0 +Version: 4.33.0 Release: %autorelease Summary: Virtualenv-based automation of test activities diff --git a/sources b/sources index 29364be..88f12ab 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (tox-4.32.0.tar.gz) = eabe1ef037f3b44947dd13e11528cd702762d6b38cf87ae7675643d7f09b2b3ddd9761a395713e95f286ffc44d77495998f68ed2f0491910f64308fb15f726ff +SHA512 (tox-4.33.0.tar.gz) = e46a19ea92a556dc45a592a8d9567b863e072bd2ca8bc7866a3e4992f737fb29ff263a88cfd3cfaa9edaf4d097dd232d710ff9ac072bb16a98adcffea8fe3b70