Skip to content

Drop Python <3.11 and add support for 3.13, 3.14 and 3.15 - #236

Merged
nicoddemus merged 4 commits into
pytest-dev:masterfrom
nicoddemus:drop-python-eol
Nov 4, 2026
Merged

nicoddemus merged 4 commits into
pytest-dev:masterfrom
nicoddemus:drop-python-eol

Conversation

@nicoddemus

Copy link
Copy Markdown
Member

Python 3.10 reached end of life in October 2026, so this raises the minimum supported version to 3.11.

Changes

  • Drop Python 3.8, 3.9 and 3.10: updates python_requires, classifiers, the CI matrix and tox. The CI compile job moves from 3.8 to 3.11.
  • Add Python 3.13, 3.14 and 3.15: updates classifiers, the CI matrix and tox.
  • Modernize syntax: applies pyupgrade --py311-plus, then the pre-commit hooks to remove the imports it left unused and reorder the rest.
  • Fix a type annotation: CppFile.__init__ now declares parent: pytest.Collector instead of pytest.Item, matching CppFile.from_parent. There is no runtime change, but the mypy pre-commit hook fails on plugin.py without it.

Testing

Tested locally on Windows, where the C++ test executables were not built, so this PR's CI is the first full run.

  • Python 3.15: 8 passed, 3 skipped, 81 failed. All 81 failures are FileNotFoundError from the missing executables.
  • Catch2 v2 samples on Python 3.15: compiled with g++ and run through the plugin. They gave 2 passed and 3 failed, and the failures are the intentional ones in catch2_failure.cpp.
  • Pre-commit: all hooks pass, including mypy.

Boost.Test and GoogleTest have not been run against these changes, and neither Python 3.11 nor 3.13 was run locally.

🤖 Generated with Claude Code

nicoddemus and others added 4 commits November 4, 2026 19:58
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Also fix the type annotation of the `parent` parameter in
`CppFile.__init__`, which is a `pytest.Collector`, as already declared
by `CppFile.from_parent`.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
GoogleTest 1.11.0 declares a `cmake_minimum_required` below 3.5, which
is rejected by the CMake version available in the runner.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@nicoddemus
nicoddemus merged commit 9ceb9ee into pytest-dev:master Nov 4, 2026
8 checks passed
@nicoddemus
nicoddemus deleted the drop-python-eol branch November 4, 2026 23:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant