From 1f604557d3b3ec5e38ba210099eccb740c262933 Mon Sep 17 00:00:00 2001 From: David Tucker Date: Thu, 15 Oct 2026 19:24:48 -0700 Subject: [PATCH 1/4] Tweak test_mypy_encoding_warnings for Mypy 2.4+ --- tests/test_pytest_mypy.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/tests/test_pytest_mypy.py b/tests/test_pytest_mypy.py index bd86899..c18e5c4 100644 --- a/tests/test_pytest_mypy.py +++ b/tests/test_pytest_mypy.py @@ -83,6 +83,9 @@ def test_mypy_encoding_warnings(testdir, monkeypatch): # Use typing.TypedDict or typing_extensions.TypedDict instead. # https://github.com/python/mypy/pull/15494 expected_warnings += 1 + elif MYPY_VERSION >= Version("2.4"): + # https://github.com/python/mypy/pull/21823 + expected_warnings -= 1 result.assert_outcomes(passed=mypy_checks, warnings=expected_warnings) From 231eaefe3c99c83dc6e9f10ecc19e86215720239 Mon Sep 17 00:00:00 2001 From: David Tucker Date: Thu, 15 Oct 2026 20:11:38 -0700 Subject: [PATCH 2/4] Fix an implicit xdist2 dependency in the tests --- tox.ini | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/tox.ini b/tox.ini index e264d78..f8624df 100644 --- a/tox.ini +++ b/tox.ini @@ -37,6 +37,11 @@ deps = xdist3.0: pytest-xdist ~= 3.0.0 xdist3.x: pytest-xdist ~= 3.0 + ; xdist implicitly relied on pytest-forked for the py package until 3.0.2 (https://github.com/pytest-dev/pytest-xdist/pull/821). + ; pytest-forked removed the dependency on py in 1.7.0, though, leading to a ModuleNotFoundError. + xdist2.0: py ~= 1.11 + xdist2.x: py ~= 1.11 + packaging ~= 26.2 pytest-cov ~= 5.0.0 pytest-randomly ~= 3.15 From c1d5196c2aeb6e6eb0282e7c249f03f649c86184 Mon Sep 17 00:00:00 2001 From: David Tucker Date: Thu, 15 Oct 2026 20:57:41 -0700 Subject: [PATCH 3/4] Correct py314 in the tox envlist --- tox.ini | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tox.ini b/tox.ini index f8624df..0d64f5d 100644 --- a/tox.ini +++ b/tox.ini @@ -7,7 +7,7 @@ envlist = py311-pytest{7.0, 7.x, 8.0, 8.x, 9.0, 9.x}-mypy{1.0, 1.x, 2.0, 2.x}-xdist{2.0, 2.x, 3.0, 3.x} py312-pytest{7.0, 7.x, 8.0, 8.x, 9.0, 9.x}-mypy{1.0, 1.x, 2.0, 2.x}-xdist{2.0, 2.x, 3.0, 3.x} py313-pytest{7.0, 7.x, 8.0, 8.x, 9.0, 9.x}-mypy{1.0, 1.x, 2.0, 2.x}-xdist{2.0, 2.x, 3.0, 3.x} - py314-pytest{9.0, 9.x}-mypy{2.0, 2.x}-xdist{2.0, 2.x, 3.0, 3.x} + py314-pytest{ 7.x, 8.0, 8.x, 9.0, 9.x}-mypy{ 1.x, 2.0, 2.x}-xdist{2.0, 2.x, 3.0, 3.x} static publish @@ -17,7 +17,7 @@ python = 3.11: py311-pytest{7.0, 7.x, 8.0, 8.x, 9.0, 9.x}-mypy{1.0, 1.x, 2.0, 2.x}-xdist{2.0, 2.x, 3.0, 3.x} 3.12: py312-pytest{7.0, 7.x, 8.0, 8.x, 9.0, 9.x}-mypy{1.0, 1.x, 2.0, 2.x}-xdist{2.0, 2.x, 3.0, 3.x}, static, publish 3.13: py313-pytest{7.0, 7.x, 8.0, 8.x, 9.0, 9.x}-mypy{1.0, 1.x, 2.0, 2.x}-xdist{2.0, 2.x, 3.0, 3.x} - 3.14: py314-pytest{7.0, 7.x, 8.0, 8.x, 9.0, 9.x}-mypy{1.0, 1.x, 2.0, 2.x}-xdist{2.0, 2.x, 3.0, 3.x} + 3.14: py314-pytest{ 7.x, 8.0, 8.x, 9.0, 9.x}-mypy{ 1.x, 2.0, 2.x}-xdist{2.0, 2.x, 3.0, 3.x} [testenv] constrain_package_deps = true From 3b035110f83b4971b7f80427e397cb6e8f0400c6 Mon Sep 17 00:00:00 2001 From: David Tucker Date: Thu, 15 Oct 2026 11:27:15 -0700 Subject: [PATCH 4/4] Run the static env with Python 3.10 Remove a defunct `basepython` and Use the oldest supported for static checks. --- tox.ini | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/tox.ini b/tox.ini index 0d64f5d..1756f61 100644 --- a/tox.ini +++ b/tox.ini @@ -13,9 +13,9 @@ envlist = [gh-actions] python = - 3.10: py310-pytest{7.0, 7.x, 8.0, 8.x, 9.0, 9.x}-mypy{1.0, 1.x, 2.0, 2.x}-xdist{2.0, 2.x, 3.0, 3.x} + 3.10: py310-pytest{7.0, 7.x, 8.0, 8.x, 9.0, 9.x}-mypy{1.0, 1.x, 2.0, 2.x}-xdist{2.0, 2.x, 3.0, 3.x}, static, publish 3.11: py311-pytest{7.0, 7.x, 8.0, 8.x, 9.0, 9.x}-mypy{1.0, 1.x, 2.0, 2.x}-xdist{2.0, 2.x, 3.0, 3.x} - 3.12: py312-pytest{7.0, 7.x, 8.0, 8.x, 9.0, 9.x}-mypy{1.0, 1.x, 2.0, 2.x}-xdist{2.0, 2.x, 3.0, 3.x}, static, publish + 3.12: py312-pytest{7.0, 7.x, 8.0, 8.x, 9.0, 9.x}-mypy{1.0, 1.x, 2.0, 2.x}-xdist{2.0, 2.x, 3.0, 3.x} 3.13: py313-pytest{7.0, 7.x, 8.0, 8.x, 9.0, 9.x}-mypy{1.0, 1.x, 2.0, 2.x}-xdist{2.0, 2.x, 3.0, 3.x} 3.14: py314-pytest{ 7.x, 8.0, 8.x, 9.0, 9.x}-mypy{ 1.x, 2.0, 2.x}-xdist{2.0, 2.x, 3.0, 3.x} @@ -63,7 +63,6 @@ commands = twine {posargs:check} {envtmpdir}/* [testenv:static] -basepython = py312 # pytest.Node.from_parent uses typing.Self deps = bandit ~= 1.9.0 black ~= 26.5.0