chore: drop Python 3.8/3.9 support, bump minimum to 3.10#958
chore: drop Python 3.8/3.9 support, bump minimum to 3.10#958njzjz merged 6 commits intodeepmodeling:masterfrom
Conversation
Python 3.8 reached EOL in October 2024 and 3.9 in October 2025. The lmdb package is also broken on Python 3.8 CI runners. Update classifiers, requires-python, CI matrix, docs, and remove legacy Python <3.8 fallbacks.
for more information, see https://pre-commit.ci
Merging this PR will not alter performance
|
|
Caution Review failedThe pull request is closed. ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (4)
📝 WalkthroughWalkthroughRaises the minimum supported Python to 3.10 across packaging, docs, and CI; updates CI matrices and workflow Python versions; removes legacy importlib_metadata/typing_extensions conditionals; and moves several typing imports to Changes
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes Possibly related PRs
Suggested reviewers
🚥 Pre-merge checks | ✅ 3✅ Passed checks (3 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 @@
## master #958 +/- ##
==========================================
+ Coverage 86.37% 86.63% +0.26%
==========================================
Files 86 86
Lines 8086 8006 -80
==========================================
- Hits 6984 6936 -48
+ Misses 1102 1070 -32 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
There was a problem hiding this comment.
🧹 Nitpick comments (1)
dpdata/plugins/__init__.py (1)
16-19: Consider removing the now-unnecessary try/except block.The
groupparameter formetadata.entry_points()was added in Python 3.10. Since this PR raises the minimum Python version to 3.10, theTypeErrorfallback path will never be executed.♻️ Suggested simplification
-try: - eps = metadata.entry_points(group="dpdata.plugins") -except TypeError: - eps = metadata.entry_points().get("dpdata.plugins", []) +eps = metadata.entry_points(group="dpdata.plugins")🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@dpdata/plugins/__init__.py` around lines 16 - 19, Remove the now-unnecessary try/except around metadata.entry_points: directly call metadata.entry_points(group="dpdata.plugins") and assign its result to eps (remove the TypeError fallback that calls metadata.entry_points().get("dpdata.plugins", [])). Update references to eps as before; the unique symbol to change is the metadata.entry_points call that currently lives in the try block and the eps assignment that follows.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Nitpick comments:
In `@dpdata/plugins/__init__.py`:
- Around line 16-19: Remove the now-unnecessary try/except around
metadata.entry_points: directly call
metadata.entry_points(group="dpdata.plugins") and assign its result to eps
(remove the TypeError fallback that calls
metadata.entry_points().get("dpdata.plugins", [])). Update references to eps as
before; the unique symbol to change is the metadata.entry_points call that
currently lives in the try block and the eps assignment that follows.
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro
Run ID: 4c38ed86-2283-4621-96f7-a5c12d0ddcd1
📒 Files selected for processing (10)
.github/workflows/test.ymlREADME.mddocs/installation.mddpdata/driver.pydpdata/plugins/__init__.pydpdata/plugins/ase.pydpdata/system.pydpdata/utils.pypyproject.tomltests/plugin/pyproject.toml
Python 3.8 reached EOL in October 2024 and 3.9 in October 2025. The lmdb package is also broken on Python 3.8 CI runners. Update classifiers, requires-python, CI matrix, docs, and remove legacy Python <3.8 fallbacks.
Summary by CodeRabbit
Chores
Documentation