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
This commit is contained in:
Miro Hrončok 2025-09-03 23:17:13 +02:00
commit a8537e2385
3 changed files with 40 additions and 33 deletions

View file

@ -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?= <thrnciar@redhat.com>
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 <lbalhar@redhat.com>
Co-Authored-By: Miro Hrončok <miro@hroncok.cz>
---
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 <sqlite3.Connection object at:ResourceWarning",
"ignore:unclosed file <_io.TextIOWrapper:ResourceWarning",
+ "ignore:subprocess \\d+ is still running:ResourceWarning",
]
@@ -223,9 +217,6 @@ report.omit = [
tmp_path_retention_policy = "failed"
@@ -224,9 +219,6 @@ report.omit = [
"tests/type_check/*",
]
run.parallel = true
@ -54,7 +58,7 @@ index 9b52c2f..335012b 100644
[tool.towncrier]
name = "tox"
diff --git a/src/tox/pytest.py b/src/tox/pytest.py
index bca2ad8..973e714 100644
index bfdc7e6..9a02df3 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,7 +69,7 @@ index bca2ad8..973e714 100644
from virtualenv.info import fs_supports_symlink
import tox.run
@@ -280,10 +279,10 @@ class ToxProject:
@@ -284,10 +283,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")
@ -79,7 +83,7 @@ index bca2ad8..973e714 100644
try:
tox_run(args)
except SystemExit as exception:
@@ -476,15 +475,6 @@ def enable_pypi_server(monkeypatch: pytest.MonkeyPatch, url: str | None) -> 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

View file

@ -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

View file

@ -1 +1 @@
SHA512 (tox-4.26.0.tar.gz) = ad2e311cd63c45a079b8c230a2feb364270b7a8bcf44b626385f8e442c6683ae841b3f34417b504f927608685a254fef3767d832fb5cfcc324c9cbf6ff7ea997
SHA512 (tox-4.30.1.tar.gz) = 55fd7a07d697faedde4fa3ed586b56cc6bba4c9ab73620ee9f6a33dddff674af0bb5d58897b3bd844aefa5b8cae0b1c159407245f9c4457c4fa77201b2cbbb0b