Skip to content

feat: support Python 3.11 and 3.12#26

Merged
lesnik512 merged 6 commits into
mainfrom
feat/python-3.11-3.12-support
Jun 30, 2026
Merged

feat: support Python 3.11 and 3.12#26
lesnik512 merged 6 commits into
mainfrom
feat/python-3.11-3.12-support

Conversation

@lesnik512

Copy link
Copy Markdown
Member

Summary

Lowers the supported Python floor from 3.13 to 3.11, matching the faststream-redis-timers convention in the org. Runtime deps (tenacity, sqlalchemy, asyncpg) already support 3.11+; the only code change is retry.py, which used PEP 695 generic syntax (3.12+ only).

Changes

  • retry.py: rewrite the PEP 695 type aliases and def postgres_retry[**P, T] generics to pre-695 stdlib typing.ParamSpec/TypeVar/TypeAlias (no new dependency). Named aliases _Func/_Decorator retained; function body and public behavior unchanged.
  • pyproject.toml: requires-python = ">=3.11,<4", add 3.11/3.12 classifiers, ruff target-version = "py311".
  • README.md: support line → Python 3.11+.
  • CI (.github/workflows/_checks.yml): pytest matrix over 3.11/3.12/3.13/3.14 (fail-fast: false); lint job stays on 3.13. Both jobs uv python pin the interpreter so each matrix leg actually runs on its target version (without the pin, uv selects the newest available interpreter under the loosened floor).

Verification

  • ty check, ruff (at py311 target), full pytest suite (28 passed, 100% coverage) all green locally.
  • The 3.11 CI leg is the runtime proof of 3.11 syntax-compatibility.

Spec and plan: planning/changes/2026-06-30.01-python-3.11-3.12-support/.

🤖 Generated with Claude Code

lesnik512 and others added 6 commits June 30, 2026 13:36
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
uv python install only downloads the interpreter; uv python pin writes .python-version so uv sync/run actually selects it.
@lesnik512 lesnik512 merged commit 82e3661 into main Jun 30, 2026
5 checks passed
@lesnik512 lesnik512 deleted the feat/python-3.11-3.12-support branch June 30, 2026 12:32
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