Skip to content

Modernize for a Python 3.13 minimum#62

Merged
Korijn merged 1 commit into
masterfrom
claude/python-3.13-modernize-cdbt05
Jul 21, 2026
Merged

Modernize for a Python 3.13 minimum#62
Korijn merged 1 commit into
masterfrom
claude/python-3.13-modernize-cdbt05

Conversation

@Korijn

@Korijn Korijn commented Jul 21, 2026

Copy link
Copy Markdown
Collaborator

Raises the supported Python floor from 3.9 to 3.13 and modernizes the code and docs to match. No behavior changes — the public API, semantics, and 100% coverage are unchanged.

Version floor

  • pyproject.toml: requires-python = ">=3.13", and the ty environment python-version bumped to 3.13 (kept matched to requires-python, as its comment intends).
  • CI: dropped the 3.9–3.12 entries from the test matrix, keeping 3.13 and 3.14.
  • README and docs (index.md, installation.md) now state Python 3.13 as the minimum.

Syntax modernization (enabled by the 3.13 floor)

  • types.py: the Diffable and Operation aliases now use PEP 695 type statements, and unions use PEP 604 | instead of typing.Union. Both aliases are annotation-only, so this is purely a spelling change.
  • pointer.py / produce.py: Hashable, Iterable, and Callable now come from collections.abc instead of the deprecated typing aliases; removed the now-redundant string-quoted forward references (from __future__ import annotations is already in effect).

Linting

  • Enabled ruff's pyupgrade (UP) rule set so outdated syntax is caught against the supported Python floor going forward. The whole tree is already clean under it.

Verification

  • pytest with the --cov-fail-under=100 gate: 411 passed, 100% coverage, on Python 3.13.
  • ruff check, ruff format --check, and ty check all clean.
  • uv build + twine check pass.

🤖 Generated with Claude Code


Generated by Claude Code

Raise the supported Python floor from 3.9 to 3.13 and update the code and
docs to match.

- pyproject.toml: requires-python >=3.13 and ty environment python-version
  3.13; enable ruff's pyupgrade (UP) rules to keep syntax modern.
- CI: drop the 3.9-3.12 test matrix entries, keeping 3.13 and 3.14.
- types.py: use PEP 695 `type` aliases and PEP 604 `|` unions instead of
  typing.Union.
- pointer.py / produce.py: import Hashable, Iterable and Callable from
  collections.abc instead of the deprecated typing aliases; drop now-
  redundant string-quoted forward references.
- README and docs: state Python 3.13 as the minimum.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01SmQNvz1tx2xncasEyUoVdR
@Korijn
Korijn merged commit de762c7 into master Jul 21, 2026
7 checks passed
@Korijn
Korijn deleted the claude/python-3.13-modernize-cdbt05 branch July 21, 2026 19:19
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