From 0464e297ad0f80dff54322474e5df175b61c376d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tom=C3=A1=C5=A1=20Hrn=C4=8Diar?= Date: Fri, 28 Mar 2025 10:10:35 +0100 Subject: [PATCH] Update to 4.25.0 Fixes: rhbz#2350693 --- 3500.patch | 37 ------------------------------------- fix-tests.patch | 23 ++++++++++++----------- python-tox.spec | 5 +---- sources | 2 +- 4 files changed, 14 insertions(+), 53 deletions(-) delete mode 100644 3500.patch diff --git a/3500.patch b/3500.patch deleted file mode 100644 index d22abc7..0000000 --- a/3500.patch +++ /dev/null @@ -1,37 +0,0 @@ -From e35abbef48a4cda2e376a7ff668961378f3c86cb Mon Sep 17 00:00:00 2001 -From: =?UTF-8?q?Miro=20Hron=C4=8Dok?= -Date: Tue, 18 Mar 2025 12:54:57 +0100 -Subject: [PATCH] Tests: Adjust expected exception message for Python 3.14.0a6 - - E AssertionError: Regex pattern did not match. - E Regex: '3 cannot cast to typing.Union\\[str, int\\]' - E Input: '3 cannot cast to str | int' - -Change caused likely by https://github.com/python/cpython/commit/dc6d66f44c0a25b69dfec7e4ffc4a6fa5e4feada ---- - docs/changelog/3500.bugfix.rst | 2 ++ - tests/config/loader/test_str_convert.py | 2 +- - 2 files changed, 3 insertions(+), 1 deletion(-) - create mode 100644 docs/changelog/3500.bugfix.rst - -diff --git a/docs/changelog/3500.bugfix.rst b/docs/changelog/3500.bugfix.rst -new file mode 100644 -index 000000000..9df1cf05d ---- /dev/null -+++ b/docs/changelog/3500.bugfix.rst -@@ -0,0 +1,2 @@ -+Make tox tests pass with Python 3.14.0a6 -+- by :user:`hroncok` -diff --git a/tests/config/loader/test_str_convert.py b/tests/config/loader/test_str_convert.py -index 8540e2105..b06929f48 100644 ---- a/tests/config/loader/test_str_convert.py -+++ b/tests/config/loader/test_str_convert.py -@@ -77,7 +77,7 @@ def test_str_convert_ok_py39(raw: str, value: Any, of_type: type[Any]) -> None: - [ - ("a", TypeVar, TypeError, r"a cannot cast to .*typing.TypeVar.*"), - ("3", Literal["1", "2"], ValueError, r"3 must be one of \('1', '2'\)"), -- ("3", Union[str, int], TypeError, r"3 cannot cast to typing.Union\[str, int\]"), -+ ("3", Union[str, int], TypeError, r"3 cannot cast to (typing.Union\[str, int\]|str \| int)"), - ("", Command, ValueError, r"attempting to parse '' into a command failed"), - ], - ) diff --git a/fix-tests.patch b/fix-tests.patch index 7dd7a1f..a6e5f9b 100644 --- a/fix-tests.patch +++ b/fix-tests.patch @@ -1,11 +1,12 @@ -From 156ff454c8df051b2cb3a6b5283810c51c1d5853 Mon Sep 17 00:00:00 2001 -From: Lumir Balhar -Date: Tue, 10 Jan 2023 08:34:25 +0100 +From b8024813cb3e477a4ada44c5835e9f62ecda79bd 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 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit +Co-Authored-By: Lumir Balhar Co-Authored-By: Miro Hrončok --- pyproject.toml | 11 +---------- @@ -15,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 16f2e44..156d1af 100644 +index 9c1116c..e499874 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -82,22 +82,16 @@ dev = [ @@ -29,18 +30,18 @@ index 16f2e44..156d1af 100644 "distlib>=0.3.9", "flaky>=3.8.1", "hatch-vcs>=0.4", - "hatchling>=1.26.3", - "psutil>=6.1", - "pytest>=8.3.3", + "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.1; python_version<='3.8'", -- "setuptools>=75.6; python_version>'3.8'", +- "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", + "wheel>=0.45.1", ] @@ -223,9 +217,6 @@ report.omit = [ "tests/type_check/*", @@ -161,5 +162,5 @@ index efb5b12..8a57426 100644 for left, right in zip_longest(result, exp): assert isinstance(right, Requirement) -- -2.47.1 +2.48.1 diff --git a/python-tox.spec b/python-tox.spec index 9954204..4dc498f 100644 --- a/python-tox.spec +++ b/python-tox.spec @@ -20,7 +20,7 @@ %undefine _py3_shebang_s Name: python-tox -Version: 4.24.1 +Version: 4.25.0 Release: %autorelease Summary: Virtualenv-based automation of test activities @@ -35,9 +35,6 @@ Source: %{pypi_source tox} # Adjust setuptools-version specific ifs to check for setuptools version rather than Python version. Patch: fix-tests.patch -# Python 3.14.0a6+ test fix -Patch: https://github.com/tox-dev/tox/pull/3500.patch - BuildArch: noarch BuildRequires: python3-devel diff --git a/sources b/sources index 0d42bbf..513ea2c 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (tox-4.24.1.tar.gz) = 8d7a3cd9c6140463dd2d2e1df7845c676f750ca23c0a9d528ee4fc7923bcadea94cfc0e7a1d70bd436d867be5f2edddd1576569777f2c15a0e11768cd932b6dd +SHA512 (tox-4.25.0.tar.gz) = 3560b667af03ca41c1bd8fa9eaa90f8c988b7f946498f3bc2d0a4dfa3a481d8ada27acb6201bde284a2bcfe14b86ee409a3ce8e875531423862d1af88e6248fb