chore: drop Python 3.9 support - #424
Conversation
- Bump requires-python from >=3.9 to >=3.10 - Remove Python 3.9 trove classifier - Remove Python 3.9 from CI install test matrix - Update contributing guide prerequisite to Python 3.10+ Closes #423
✅ Deploy Preview for commit-check ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
|
Warning Review limit reached
More reviews will be available in 7 minutes and 28 seconds. Learn how PR review limits work. Your organization has run out of usage credits. Purchase more credits in the billing tab to continue. ⌛ How to resolve this issue?After more reviews become available, a review can be triggered using the We recommend that you space out your commits to avoid hitting the rate limit. 🚦 How do rate limits work?CodeRabbit enforces hourly rate limits for each developer per organization. Our paid plans include higher PR review limits than trial, open-source, and free plans. In all cases, reviews become available again over time. During sustained high-volume PR review activity, CodeRabbit may temporarily slow when the next review becomes available. Please see our Fair Usage Limits Policy for further information. ℹ️ Review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Run ID: ⛔ Files ignored due to path filters (1)
📒 Files selected for processing (11)
📝 WalkthroughWalkthroughThe PR removes Python 3.9 support and standardizes on Python 3.10+ across CI, contributor documentation, and package metadata (pyproject.toml and MyPy configuration). ChangesDrop Python 3.9 Support
Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes Possibly related issues
Possibly related PRs
Suggested labels
Poem
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #424 +/- ##
==========================================
+ Coverage 95.93% 95.95% +0.02%
==========================================
Files 10 10
Lines 1155 1162 +7
==========================================
+ Hits 1108 1115 +7
Misses 47 47 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
Match mypy's type-checking target to the new minimum supported Python version after dropping 3.9 support.
There was a problem hiding this comment.
Actionable comments posted: 1
🧹 Nitpick comments (1)
pyproject.toml (1)
17-17: ⚡ Quick winConsider restoring the environment marker for
tomli.The dependency was changed from conditional (
tomli>=1.1.0; python_version < '3.11') to unconditional. Since Python 3.11+ includestomllibin the standard library, installingtomlion those versions is unnecessary. Restoring the conditional marker would avoid wasting disk space and install time.♻️ Suggested dependency declaration
dependencies = [ "pyyaml", - "tomli>=1.1.0", + "tomli>=1.1.0; python_version < '3.11'", ]Based on learnings: Use tomllib (Python 3.11+) or tomli fallback for TOML file parsing in config.py. The conditional marker aligns with this fallback pattern.
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@pyproject.toml` at line 17, Restore the environment marker on the tomli dependency in pyproject.toml so it only installs for Python versions that lack tomllib (e.g., change "tomli>=1.1.0" back to "tomli>=1.1.0; python_version < '3.11'"); update any related import/fallback logic in config.py (where tomllib/tomli are used) to continue preferring tomllib on Python 3.11+ and fallback to tomli otherwise.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@CONTRIBUTING.md`:
- Line 87: CONTRIBUTING.md and pyproject.toml declare Python >=3.10 but uv.lock
still lists requires-python = ">=3.9"; regenerate the lockfile so uv.lock's
metadata matches pyproject.toml by running your lock generation command (e.g.,
poetry/uvicorn lock regen or the project's standard lock update command) and
commit the updated uv.lock, ensuring the requires-python field in uv.lock
reflects ">=3.10" to align with pyproject.toml and CONTRIBUTING.md.
---
Nitpick comments:
In `@pyproject.toml`:
- Line 17: Restore the environment marker on the tomli dependency in
pyproject.toml so it only installs for Python versions that lack tomllib (e.g.,
change "tomli>=1.1.0" back to "tomli>=1.1.0; python_version < '3.11'"); update
any related import/fallback logic in config.py (where tomllib/tomli are used) to
continue preferring tomllib on Python 3.11+ and fallback to tomli otherwise.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: defaults
Review profile: CHILL
Plan: Pro
Run ID: 3307c149-b233-42ee-bde4-27a646fc8ce8
📒 Files selected for processing (3)
.github/workflows/main.ymlCONTRIBUTING.mdpyproject.toml
Merging this PR will not alter performance
Comparing Footnotes
|
- Replace Optional[X] with X | None (PEP 604, native in 3.10) - Replace List[X], Dict[K,V], Tuple[...], Type[X] with list[X], dict[K,V], tuple[...], type[X] (PEP 585, native in 3.9) - Add from __future__ import annotations for forward-reference safety - Use collections.abc.Callable instead of typing.Callable - Keep typing.Any (no native replacement) All 217 tests pass.
- Regenerate uv.lock (requires-python >=3.10, drop all <3.10 markers) - Restore tomli conditional marker (python_version < '3.11') - Add py.typed marker (PEP 561) for downstream type checkers - Tighten CheckOutcome.to_dict() return type to dict[str, str] - Tighten validate_config() return type to dict[str, Any]
|



Summary
Drop support for Python 3.9 as requested in #423.
Changes
requires-pythonfrom>=3.9to>=3.10, remove Python 3.9 trove classifier, simplifytomlidependency (no conditional needed since min is 3.10)Closes #423
Summary by CodeRabbit