Skip to content

py(chore[floor]): Require Python 3.11 - #849

Merged
tony merged 2 commits into
masterfrom
chore/require-python-3.11
Nov 8, 2026
Merged

tony merged 2 commits into
masterfrom
chore/require-python-3.11

Conversation

@tony

@tony tony commented Nov 8, 2026

Copy link
Copy Markdown
Member

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 and
    ruff target 3.11; drop the typing-extensions markers for Python
    before 3.11 and the scripts-only py311 ruff override.
  • uv.lock re-resolved with uv lock alone: the 3.10-only forks vanish
    and no package in the >=3.11 fork moves. soupsieve keeps its 2.10
    entry for Python before 3.11.5, which is a separate fork.
  • ruff check --fix with the existing rules: Self and LiteralString
    import from typing, the sys.version_info branches and their empty
    stubs go, and three now-unused # NOQA: PERF203 comments are removed.
    test_random_str_sequence_self_type runs on every supported Python.
  • README, CONTRIBUTING and the compatibility page state 3.11, and
    CHANGES gets a breaking-change entry.

Test plan

  • ruff check, ruff format --check, mypy ., mypy --python-version 3.11 .github/scripts
  • pytest .github/scripts/test_tmux_build.py --reruns=0
  • py.test -n auto: 1476 passed, 3 skipped
  • just build-docs, uv build
  • CI

tony added 2 commits November 7, 2026 18:58
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

codecov Bot commented Nov 8, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 33.33333% with 2 lines in your changes missing coverage. Please review.
✅ Project coverage is 52.17%. Comparing base (76a909c) to head (549ac09).

Files with missing lines Patch % Lines
src/libtmux/options.py 33.33% 2 Missing ⚠️
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.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@tony
tony merged commit e9e17cc into master Nov 8, 2026
16 checks passed
@tony
tony deleted the chore/require-python-3.11 branch November 8, 2026 01:05
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