chore: drop support for Python 3.9#641
Conversation
- Update requires-python to >=3.10 - Remove Python 3.9 classifier - Update CI to test Python 3.10+ only - Update ruff target-version to py310 - Remove version checks for 3.9 in tests - Update imports to use collections.abc.Callable - Ignore UP045/UP007 for now with TODO to revisit separately
There was a problem hiding this comment.
Pull request overview
This PR drops support for Python 3.9 and sets the minimum required Python version to 3.10, aligning with Python 3.9's end-of-life status (October 25, 2024).
Key Changes:
- Updated minimum Python version requirement from 3.9 to 3.10
- Migrated
Callableimports fromtypingtocollections.abc(Python 3.10+ best practice) - Removed Python 3.9-specific test skips and version checks
Reviewed changes
Copilot reviewed 7 out of 7 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| pyproject.toml | Updated requires-python to >=3.10, removed Python 3.8/3.9 classifiers, updated ruff target version to py310, and added temporary ignores for PEP 604 annotation rules |
| .github/workflows/ci-testing.yml | Removed Python 3.9 from test matrix, updated oldest supported version test to use Python 3.10 |
| tests/unit/test_mcp.py | Removed Python < 3.10 version check that previously skipped the entire module |
| tests/unit/test_cli.py | Updated test skip decorators to only skip on Python 3.10 (removed 3.9 from conditions) |
| src/litserve/specs/base.py | Migrated Callable import from typing to collections.abc |
| src/litserve/server.py | Migrated Callable import from typing to collections.abc |
| src/litserve/api.py | Migrated Callable import from typing to collections.abc |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #641 +/- ##
===================================
- Coverage 85% 85% -0%
===================================
Files 39 39
Lines 3189 3189
===================================
- Hits 2700 2696 -4
- Misses 489 493 +4 🚀 New features to boost your workflow:
|
There was a problem hiding this comment.
I would suggest to drop the tests but allow the package installation for 3.9.
I know some companies have constraints on upgrading Python versions etc. so essentially we will be stooping them from using the latest version of LitServe. And this way we can say that, you can try it but not tested so better upgrade.
For example, FastAPI is still to drop Python 3.8 support even after 1 year of EOL.
I'd invite maintainers to chime in and put their opinion.
I don't think we want to suggest compatibility with something we don't test and explicitly don't support |
What does this PR do?
Drops support for Python 3.9 and updates the minimum required Python version to 3.10.
Follow-ups
PR review
Anyone in the community is free to review the PR once the tests have passed.
Did you have fun?
Make sure you had fun coding 🙃