-
Notifications
You must be signed in to change notification settings - Fork 582
breaking: drop Python 3.9 #5078
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Python 3.9 has gone to EOL. NumPy, TensorFlow, PyTorch, and JAX have removed Python 3.9 support.
for more information, see https://pre-commit.ci
for more information, see https://pre-commit.ci
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## devel #5078 +/- ##
==========================================
+ Coverage 84.28% 84.30% +0.01%
==========================================
Files 709 709
Lines 70561 70509 -52
Branches 3618 3618
==========================================
- Hits 59472 59442 -30
+ Misses 9923 9900 -23
- Partials 1166 1167 +1 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
This PR drops Python 3.9 support and modernizes the codebase to use Python 3.10+ syntax. The main changes include updating the minimum Python version requirement from 3.9 to 3.10, replacing old-style type hints (Optional, Union) with PEP 604 union syntax (|), moving Callable imports from typing to collections.abc, removing version-conditional code for Python 3.10, and removing outdated TensorFlow installation documentation.
Key changes:
- Updated
requires-pythonfrom>=3.9to>=3.10in pyproject.toml - Replaced
Optional[X]withX | NoneandUnion[X, Y]withX | Ythroughout the codebase - Moved
Callableimports fromtypingtocollections.abcfor better compatibility with Python 3.10+
Reviewed changes
Copilot reviewed 290 out of 290 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| pyproject.toml | Updated minimum Python version from 3.9 to 3.10, removed Python 3.9 classifier |
| doc/install/*.md | Updated documentation to reflect Python 3.10 requirement, removed old TensorFlow docs |
| doc/environment.yml | Changed Python version from 3.9 to 3.10 |
| doc/backend.md | Updated TensorFlow and JAX version information |
| deepmd/**/*.py | Modernized type hints (Optional → | None, Union → |) |
| source/tests/**/*.py | Updated type hints and removed Python 3.10 version checks |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
e816d01
Python 3.9 has gone to EOL. NumPy, TensorFlow, PyTorch, and JAX have removed Python 3.9 support. --------- Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Python 3.9 has gone to EOL. NumPy, TensorFlow, PyTorch, and JAX have removed Python 3.9 support.