Skip to content

Conversation

@njzjz
Copy link
Member

@njzjz njzjz commented Dec 3, 2025

Python 3.9 has gone to EOL. NumPy, TensorFlow, PyTorch, and JAX have removed Python 3.9 support.

njzjz added 2 commits December 3, 2025 23:54
Python 3.9 has gone to EOL. NumPy, TensorFlow, PyTorch, and JAX have removed Python 3.9 support.
@github-actions github-actions bot added the Docs label Dec 3, 2025
@github-actions github-actions bot added the Python label Dec 3, 2025

@overload
def child_seed(seed: Union[int, list[int]], idx: int) -> list[int]: ...
def child_seed(seed: int | list[int], idx: int) -> list[int]: ...

Check notice

Code scanning / CodeQL

Statement has no effect Note

This statement has no effect.
@codecov
Copy link

codecov bot commented Dec 3, 2025

Codecov Report

❌ Patch coverage is 97.77778% with 4 lines in your changes missing coverage. Please review.
✅ Project coverage is 84.30%. Comparing base (2d5fa3c) to head (eb449d7).
⚠️ Report is 7 commits behind head on devel.

Files with missing lines Patch % Lines
deepmd/common.py 66.66% 1 Missing ⚠️
deepmd/infer/model_devi.py 66.66% 1 Missing ⚠️
deepmd/lmp.py 0.00% 1 Missing ⚠️
deepmd/pt/model/network/mlp.py 75.00% 1 Missing ⚠️
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.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@njzjz njzjz closed this Dec 4, 2025
@njzjz njzjz reopened this Dec 4, 2025
@njzjz njzjz marked this pull request as ready for review December 4, 2025 16:51
Copilot AI review requested due to automatic review settings December 4, 2025 16:51
Copy link
Contributor

Copilot AI left a 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-python from >=3.9 to >=3.10 in pyproject.toml
  • Replaced Optional[X] with X | None and Union[X, Y] with X | Y throughout the codebase
  • Moved Callable imports from typing to collections.abc for 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.

@njzjz njzjz requested a review from wanghan-iapcm December 5, 2025 02:14
@wanghan-iapcm wanghan-iapcm added this pull request to the merge queue Dec 5, 2025
@wanghan-iapcm wanghan-iapcm removed this pull request from the merge queue due to a manual request Dec 5, 2025
@njzjz njzjz added this pull request to the merge queue Dec 12, 2025
Merged via the queue into deepmodeling:devel with commit e816d01 Dec 12, 2025
111 of 117 checks passed
@njzjz njzjz deleted the drop-py39 branch December 12, 2025 13:39
ChiahsinChu pushed a commit to ChiahsinChu/deepmd-kit that referenced this pull request Dec 17, 2025
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>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants