Skip to content

Support Python 3.10 and align typing/CI tooling#16

Merged
Code0x58 merged 3 commits into
masterfrom
codex/update-minimum-version-in-alternative.py
May 9, 2026
Merged

Support Python 3.10 and align typing/CI tooling#16
Code0x58 merged 3 commits into
masterfrom
codex/update-minimum-version-in-alternative.py

Conversation

@Code0x58
Copy link
Copy Markdown
Owner

@Code0x58 Code0x58 commented May 9, 2026

Motivation

  • Broaden runtime and packaging support to Python 3.10 while keeping the public decorator API type-checkable.
  • Make local development and CI use the same project-managed uv environment instead of relying on separately installed tools.
  • Tighten contributor and CI checks so formatting, linting, typing, tests, and 100% line coverage stay explicit.

Description

  • Update package metadata for Python >=3.10, add Python 3.10/3.11 classifiers, and expand the CI matrix to run on Python 3.10 through 3.14.
  • Refactor alternative.py annotations to Python 3.10-compatible Generic, ParamSpec, and TypeVar forms, replacing newer type-parameter syntax and removing the previous pyrefly overload ignore.
  • Rework the reference, Alternatives.add, Implementation.add, and pytest helper decorator overloads around a typed _Undefined sentinel so bare-decorator and configured-decorator usage are represented directly.
  • Add ruff, pyrefly, and mypy as project dev dependencies and simplify CI to rely on uv sync --dev plus uv run --dev ... commands.
  • Enforce 100% line coverage in CI with --cov-fail-under=100, document the full verification command set in AGENTS.md, and require branch-coverage review for material alternative.py branching changes.
  • Ignore generated test-results.xml alongside the other coverage/test artifacts.

Testing

  • uv run --dev ruff format --check .
  • uv run --dev ruff check .
  • uv run --dev pyrefly check .
  • uv run --dev mypy .
  • uv run --dev pytest
  • uv run --dev pytest --cov-report=term-missing:skip-covered
  • uv run --dev pytest --cov-branch --cov-report=term-missing:skip-covered
  • uv run --dev pytest -vv --cov=alternative --cov-report=xml --cov-fail-under=100 --junitxml=test-results.xml

Codex Task

@Code0x58 Code0x58 changed the title Use ParamSpec/TypeVar generics and add Python >=3.10 support; update packaging and lockfile Use older type annotation form to reduce MSV to python>=3.10 + Add trove tags May 9, 2026
@codecov
Copy link
Copy Markdown

codecov Bot commented May 9, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 100.00%. Comparing base (25629aa) to head (4af57a9).
✅ All tests successful. No failed tests found.

Additional details and impacted files
@@            Coverage Diff            @@
##            master       #16   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files            1         1           
  Lines          196       198    +2     
=========================================
+ Hits           196       198    +2     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@Code0x58 Code0x58 changed the title Use older type annotation form to reduce MSV to python>=3.10 + Add trove tags Support Python 3.10 and align typing/CI tooling May 9, 2026
@Code0x58 Code0x58 merged commit 0accc92 into master May 9, 2026
7 checks passed
@Code0x58 Code0x58 deleted the codex/update-minimum-version-in-alternative.py branch May 9, 2026 19:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant