Repository navigation
py(chore[floor]): Require Python 3.11 - #849
Merged
Merged
Conversation
why: Python 3.10 reached end of life in October 2026. requires-python, the 3.10 classifier, the mypy and ruff targets, the typing-extensions markers and the sys.version_info branches for Self all still described a floor nobody supports. `uv lock` collapses the 3.10-only forks, and `ruff check --fix` applies the 3.11 rewrites the repo's existing UP, F and RUF rules select. what: - pyproject.toml: requires-python >=3.11, drop the 3.10 classifier, mypy python_version and ruff target-version to 3.11, drop the three typing-extensions markers for python_version < '3.11' and the scripts-only py311 override. - uv.lock: re-resolved with `uv lock` alone. Only 3.10-only versions left (exceptiongroup, tomli, sphinx 8.1.3, watchdog 6.0.0 and similar); no package in the >=3.11 fork moved. - src/libtmux: import Self from typing in pane, session, window, server, hooks, options, _internal/control_mode and test/environment; drop the empty sys.version_info stubs in test/random, retry and temporary. - Three `# NOQA: PERF203` comments go: ruff stops flagging try/except in a loop once the target is 3.11, so RUF100 reports them unused. - tests: run test_random_str_sequence_self_type everywhere and import LiteralString from typing. - .tool-versions: drop Python 3.10. Test plan: - ruff check and format --check, mypy (. and .github/scripts), .github/scripts tests, py.test -n auto (1476 passed, 3 skipped), `just build-docs`, `uv build`.
why: The README, CONTRIBUTING and the compatibility page still named Python 3.10 after the floor moved. what: - README.md, .github/CONTRIBUTING.md, docs/project/compatibility.md: Python 3.11, and the tested list loses 3.10. - CONTRIBUTING: the CI scripts no longer differ from the library's floor. - CHANGES: add a breaking-change entry.
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #849 +/- ##
=======================================
Coverage 52.17% 52.17%
=======================================
Files 26 26
Lines 3751 3751
Branches 747 747
=======================================
Hits 1957 1957
Misses 1490 1490
Partials 304 304 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Raise the Python floor from 3.10 to 3.11. Python 3.10 reached end of life
in October 2026. No release is cut.
Changes
requires-python = ">=3.11,<4.0"; drop the 3.10 classifier; mypy andruff target 3.11; drop the
typing-extensionsmarkers for Pythonbefore 3.11 and the scripts-only py311 ruff override.
uv.lockre-resolved withuv lockalone: the 3.10-only forks vanishand no package in the
>=3.11fork moves.soupsievekeeps its 2.10entry for Python before 3.11.5, which is a separate fork.
ruff check --fixwith the existing rules:SelfandLiteralStringimport from
typing, thesys.version_infobranches and their emptystubs go, and three now-unused
# NOQA: PERF203comments are removed.test_random_str_sequence_self_typeruns on every supported Python.CHANGESgets a breaking-change entry.Test plan
ruff check,ruff format --check,mypy .,mypy --python-version 3.11 .github/scriptspytest .github/scripts/test_tmux_build.py --reruns=0py.test -n auto: 1476 passed, 3 skippedjust build-docs,uv build