Compare commits

...

7 Commits

Author SHA1 Message Date
Tomáš Hrnčiar eeb73bfe13 CI: Test with pypy3.11, make pypy3.9 optional, as it was retired on Fedora 42+ 2025-03-28 12:38:54 +01:00
Tomáš Hrnčiar 0464e297ad Update to 4.25.0
Fixes: rhbz#2350693
2025-03-28 10:10:38 +01:00
Miro Hrončok 07d47763fe Python 3.14.0a6+ test fix
- Fixes: rhbz#2353145
2025-03-18 13:02:59 +01:00
Miro Hrončok 0c1e618f44 Update to 4.24.1
- Fixes: rhbz#2339185
2025-01-29 16:21:46 +01:00
Miro Hrončok 374d223f0a Conditionalize the Recommended Python versions based on Fedora version
See https://fedoraproject.org/wiki/Changes/RetirePython3.8

Eventually, we will get rid of this section and only use Supplements.

Also update the CI config to make 3.8 optional.

[skip changelog]
2025-01-29 16:21:32 +01:00
Fedora Release Engineering f7758c7fda Rebuilt for https://fedoraproject.org/wiki/Fedora_42_Mass_Rebuild 2025-01-18 20:12:58 +00:00
Miro Hrončok f85007ad88 CI: Test tox provision with end-of-life Python versions
https://tox.wiki/en/4.23.0/faq.html#testing-end-of-life-python-versions

[skip changelog]
2024-12-03 18:43:41 +01:00
4 changed files with 95 additions and 39 deletions
+73 -31
View File
@@ -1,19 +1,49 @@
From 1ade3df7eaefad792a2a519c0f3cc3a8f28a5829 Mon Sep 17 00:00:00 2001 From b8024813cb3e477a4ada44c5835e9f62ecda79bd Mon Sep 17 00:00:00 2001
From: Lumir Balhar <lbalhar@redhat.com> From: =?UTF-8?q?Tom=C3=A1=C5=A1=20Hrn=C4=8Diar?= <thrnciar@redhat.com>
Date: Tue, 10 Jan 2023 08:34:25 +0100 Date: Fri, 28 Mar 2025 09:44:24 +0100
Subject: [PATCH] fix tests Subject: [PATCH] Fix tests
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Co-Authored-By: Lumir Balhar <lbalhar@redhat.com>
Co-Authored-By: Miro Hrončok <miro@hroncok.cz>
--- ---
pyproject.toml | 8 -------- pyproject.toml | 11 +----------
src/tox/pytest.py | 16 +++------------- src/tox/pytest.py | 16 +++-------------
tests/test_provision.py | 18 ++---------------- tests/test_provision.py | 18 ++----------------
3 files changed, 5 insertions(+), 37 deletions(-) .../package/test_python_package_util.py | 10 ++++++++--
4 files changed, 14 insertions(+), 41 deletions(-)
diff --git a/pyproject.toml b/pyproject.toml diff --git a/pyproject.toml b/pyproject.toml
index 74219b1..6cd2da8 100644 index 9c1116c..e499874 100644
--- a/pyproject.toml --- a/pyproject.toml
+++ b/pyproject.toml +++ b/pyproject.toml
@@ -167,9 +167,6 @@ report.omit = [ @@ -82,22 +82,16 @@ dev = [
]
test = [
"build[virtualenv]>=1.2.2.post1",
- "covdefaults>=2.3",
- "detect-test-pollution>=1.2",
- "devpi-process>=1.0.2",
- "diff-cover>=9.2",
"distlib>=0.3.9",
"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",
"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",
]
@@ -223,9 +217,6 @@ report.omit = [
"tests/type_check/*", "tests/type_check/*",
] ]
run.parallel = true run.parallel = true
@@ -23,26 +53,8 @@ index 74219b1..6cd2da8 100644
[tool.towncrier] [tool.towncrier]
name = "tox" name = "tox"
@@ -229,17 +226,12 @@ release = [
]
test = [
"build[virtualenv]>=1.2.2",
- "covdefaults>=2.3",
- "detect-test-pollution>=1.2",
- "devpi-process>=1.0.2",
- "diff-cover>=9.2",
"distlib>=0.3.8",
"flaky>=3.8.1",
"hatch-vcs>=0.4",
"hatchling>=1.25",
"psutil>=6",
"pytest>=8.3.3",
- "pytest-cov>=5",
"pytest-mock>=3.14",
"pytest-xdist>=3.6.1",
"re-assert>=1.1",
diff --git a/src/tox/pytest.py b/src/tox/pytest.py diff --git a/src/tox/pytest.py b/src/tox/pytest.py
index ca42a5b..183e2f4 100644 index 72f410b..48cf9bc 100644
--- a/src/tox/pytest.py --- a/src/tox/pytest.py
+++ b/src/tox/pytest.py +++ b/src/tox/pytest.py
@@ -17,7 +17,6 @@ from typing import TYPE_CHECKING, Any, Callable, Iterator, Protocol, Sequence, c @@ -17,7 +17,6 @@ from typing import TYPE_CHECKING, Any, Callable, Iterator, Protocol, Sequence, c
@@ -83,7 +95,7 @@ index ca42a5b..183e2f4 100644
def _invalid_index_fake_port() -> int: def _invalid_index_fake_port() -> int:
with closing(socket.socket(socket.AF_INET, socket.SOCK_STREAM)) as socket_handler: 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 diff --git a/tests/test_provision.py b/tests/test_provision.py
index 5b2b652..7657c2e 100644 index 2030cb9..f706d6c 100644
--- a/tests/test_provision.py --- a/tests/test_provision.py
+++ b/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] @@ -98,22 +98,9 @@ def tox_wheels(tox_wheel: Path, tmp_path_factory: TempPathFactory) -> list[Path]
@@ -119,6 +131,36 @@ index 5b2b652..7657c2e 100644
def test_provision_platform_check(tox_project: ToxProjectCreator) -> None: def test_provision_platform_check(tox_project: ToxProjectCreator) -> None:
ini = "[tox]\nrequires=demo-pkg-inline\n[testenv]\npackage=skip\n[testenv:.tox]\nplatform=wrong_platform" ini = "[tox]\nrequires=demo-pkg-inline\n[testenv]\npackage=skip\n[testenv:.tox]\nplatform=wrong_platform"
proj = tox_project({"tox.ini": ini}) 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
--- 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:
from importlib.metadata import Distribution, PathDistribution
+from importlib.metadata import version
+from packaging.version import Version
+
+SETUPTOOLS_VERSION = Version(version("setuptools"))
+SETUPTOOLS_75_6 = SETUPTOOLS_VERSION >= Version("75.6")
+
@pytest.fixture(scope="session")
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"),
- *(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}"'),
Requirement(f'pytest>=5.4.1; python_version == "{py_ver}"'),
- *(sphinx if sys.version_info[0:2] > (3, 8) else []),
+ *(sphinx if SETUPTOOLS_75_6 else []),
]
for left, right in zip_longest(result, exp):
assert isinstance(right, Requirement)
-- --
2.47.0 2.48.1
+6 -1
View File
@@ -20,7 +20,7 @@
%undefine _py3_shebang_s %undefine _py3_shebang_s
Name: python-tox Name: python-tox
Version: 4.23.2 Version: 4.25.0
Release: %autorelease Release: %autorelease
Summary: Virtualenv-based automation of test activities Summary: Virtualenv-based automation of test activities
@@ -32,6 +32,7 @@ Source: %{pypi_source tox}
# Remove dependency on detect-test-pollution. # Remove dependency on detect-test-pollution.
# Remove coverage-related dependencies. # Remove coverage-related dependencies.
# Adjust virtualenv environment variables to make it work with our patched virtualenv. # 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.
Patch: fix-tests.patch Patch: fix-tests.patch
BuildArch: noarch BuildArch: noarch
@@ -81,10 +82,14 @@ Summary: %{summary}
# however it launches other Python versions as subprocesses. # however it launches other Python versions as subprocesses.
# It recommends all Python versions it supports. (This is an exception to # It recommends all Python versions it supports. (This is an exception to
# the rule that Fedora packages may not require the alternative interpreters.) # the rule that Fedora packages may not require the alternative interpreters.)
%if 0%{?fedora}
%if 0%{?fedora} < 42
Recommends: python3.8 Recommends: python3.8
%endif
Recommends: python3.9 Recommends: python3.9
Recommends: python3.10 Recommends: python3.10
Recommends: pypy3-devel Recommends: pypy3-devel
%endif
Recommends: python3-devel Recommends: python3-devel
# Instead of adding new Pythons here, add `Supplements: tox` to them, see: # Instead of adding new Pythons here, add `Supplements: tox` to them, see:
# https://lists.fedoraproject.org/archives/list/python-devel@lists.fedoraproject.org/thread/NVVUXSVSPFQOWIGBE2JNI67HEO7R63ZQ/ # https://lists.fedoraproject.org/archives/list/python-devel@lists.fedoraproject.org/thread/NVVUXSVSPFQOWIGBE2JNI67HEO7R63ZQ/
+1 -1
View File
@@ -1 +1 @@
SHA512 (tox-4.23.2.tar.gz) = 5008964ebed3c94a6ad5f0985150c7bf73fd3996b91171b16323d195bf0288102aac0dc38848bd4c63e5c5678ab1a82c170579139eda97132a4555eb11d381a0 SHA512 (tox-4.25.0.tar.gz) = 3560b667af03ca41c1bd8fa9eaa90f8c988b7f946498f3bc2d0a4dfa3a481d8ada27acb6201bde284a2bcfe14b86ee409a3ce8e875531423862d1af88e6248fb
+15 -6
View File
@@ -30,9 +30,15 @@
- all_supplementing_pythons: - all_supplementing_pythons:
dir: tests dir: tests
run: ./all_supplementing_pythons.py run: ./all_supplementing_pythons.py
- smoke38: - smoke27_optional:
dir: python/smoke dir: python/smoke
run: VERSION=3.8 ./venv.sh 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:
dir: python/smoke
run: VERSION=3.8 INSTALL_OR_SKIP=true ./venv.sh
- smoke39: - smoke39:
dir: python/smoke dir: python/smoke
run: VERSION=3.9 ./venv.sh run: VERSION=3.9 ./venv.sh
@@ -51,12 +57,15 @@
- smoke314: - smoke314:
dir: python/smoke dir: python/smoke
run: VERSION=3.14 ./venv.sh run: VERSION=3.14 ./venv.sh
- smoke_pypy39: - smoke_pypy39_optional:
dir: python/smoke dir: python/smoke
run: PYTHON=pypy3.9 VERSION=3.9 ./venv.sh run: PYTHON=pypy3.9 VERSION=3.9 INSTALL_OR_SKIP=true ./venv.sh
- smoke_pypy310: - smoke_pypy310:
dir: python/smoke dir: python/smoke
run: PYTHON=pypy3.10 VERSION=3.10 ./venv.sh run: PYTHON=pypy3.10 VERSION=3.10 ./venv.sh
- smoke_pypy311:
dir: python/smoke
run: PYTHON=pypy3.11 VERSION=3.11 ./venv.sh
- pyproject_pytest: - pyproject_pytest:
dir: pyproject-rpm-macros/tests dir: pyproject-rpm-macros/tests
run: ./mocktest.sh python-pytest run: ./mocktest.sh python-pytest
@@ -69,15 +78,15 @@
required_packages: required_packages:
- gcc - gcc
- virtualenv - virtualenv
- python3.8 - python3.6
- python3.9 - python3.9
- python3.10-devel - python3.10-devel
- python3.11-devel - python3.11-devel
- python3.12-devel - python3.12-devel
- python3.13-devel - python3.13-devel
- python3.14-devel - python3.14-devel
- pypy3.9-devel
- pypy3.10-devel - pypy3.10-devel
- pypy3.11-devel
- python3-tox - python3-tox
- python3-dnf - python3-dnf
- mock - mock