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"))