Skip to content

feat!: drop Python 3.10 and use typing.assert_never - #58

Merged
lesnik512 merged 1 commit into
mainfrom
drop-py310
Oct 3, 2026
Merged

lesnik512 merged 1 commit into
mainfrom
drop-py310

Conversation

@lesnik512

Copy link
Copy Markdown
Member

Closes #33.

Python 3.10 reaches end of life on 2026-10-31. This drops it ahead of that date rather than waiting for the trigger recorded in ADR-0002.

Changes

  • requires-python is now >=3.11,<4, and the 3.10 classifier is gone. Ruff takes its target from requires-python, so no [tool.ruff] target-version is added.
  • CI: lint now runs on 3.11, and "3.10" is dropped from both the pytest and floors matrices. The issue only mentioned pytest.
  • fixer.py: the vendored _assert_never is replaced with typing.assert_never. The exhaustive match keeps its case _: arm.
  • ADR-0002 ("keep 3.10, vendor _assert_never") is deleted, not superseded. Its decision no longer holds, and using the stdlib helper on 3.11+ does not meet the FL4 bar for a record of its own. The ADR tree in docs/agents/domain.md is updated; it was also missing 0003.

The issue cites "ADR-0004", but the record is 0002.

Verification

  • On 3.11: just lint-ci, just test-ci (100% coverage) and just adr-check all pass.
  • With the Truncate arm temporarily removed, ty check reports type-assertion-failure at assert_never(action), so the exhaustiveness guard still works.

Release

This is a breaking change because it drops a supported interpreter. Release it as a minor or major version, not a patch.

@lesnik512
lesnik512 merged commit b918b78 into main Oct 3, 2026
12 checks passed
@lesnik512
lesnik512 deleted the drop-py310 branch October 3, 2026 20:28
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.

Drop the Python 3.10 floor and use typing.assert_never

1 participant