Skip to content

Commit a9fc91f

Browse files
author
Han Wang
committed
chore: drop Python 3.8/3.9 support, bump minimum to 3.10
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.
1 parent 26171f2 commit a9fc91f

6 files changed

Lines changed: 9 additions & 16 deletions

File tree

.github/workflows/test.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ jobs:
99
runs-on: ubuntu-22.04
1010
strategy:
1111
matrix:
12-
python-version: ["3.8", "3.12"]
12+
python-version: ["3.10", "3.13"]
1313

1414
steps:
1515
- uses: actions/checkout@v6

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ If you use this software, please cite the following paper:
1515

1616
## Installation
1717

18-
dpdata only supports Python 3.8 and above. You can [setup a conda/pip environment](https://docs.deepmodeling.com/faq/conda.html), and then use one of the following methods to install dpdata:
18+
dpdata only supports Python 3.10 and above. You can [setup a conda/pip environment](https://docs.deepmodeling.com/faq/conda.html), and then use one of the following methods to install dpdata:
1919

2020
- Install via pip: `pip install dpdata`
2121
- Install via conda: `conda install -c conda-forge dpdata`

docs/installation.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Installation
22

3-
dpdata only supports Python 3.8 and above. You can [setup a conda/pip environment](https://docs.deepmodeling.com/faq/conda.html), and then use one of the following methods to install dpdata:
3+
dpdata only supports Python 3.10 and above. You can [setup a conda/pip environment](https://docs.deepmodeling.com/faq/conda.html), and then use one of the following methods to install dpdata:
44

55
- Install via pip: `pip install dpdata`
66
- Install via conda: `conda install -c conda-forge dpdata`

dpdata/plugins/__init__.py

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,9 @@
11
from __future__ import annotations
22

33
import importlib
4+
from importlib import metadata
45
from pathlib import Path
56

6-
try:
7-
from importlib import metadata
8-
except ImportError: # for Python<3.8
9-
import importlib_metadata as metadata
10-
117
PACKAGE_BASE = "dpdata.plugins"
128
NOT_LOADABLE = ("__init__.py",)
139

pyproject.toml

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -12,10 +12,10 @@ authors = [
1212
]
1313
license = {file = "LICENSE"}
1414
classifiers = [
15-
"Programming Language :: Python :: 3.8",
16-
"Programming Language :: Python :: 3.9",
1715
"Programming Language :: Python :: 3.10",
1816
"Programming Language :: Python :: 3.11",
17+
"Programming Language :: Python :: 3.12",
18+
"Programming Language :: Python :: 3.13",
1919
"License :: OSI Approved :: GNU Lesser General Public License v3 (LGPLv3)",
2020
]
2121
dependencies = [
@@ -26,10 +26,8 @@ dependencies = [
2626
'wcmatch',
2727
'lmdb',
2828
'msgpack-numpy',
29-
'importlib_metadata>=1.4; python_version < "3.8"',
30-
'typing_extensions; python_version < "3.8"',
3129
]
32-
requires-python = ">=3.8"
30+
requires-python = ">=3.10"
3331
readme = "README.md"
3432
keywords = ["lammps", "vasp", "deepmd-kit"]
3533

@@ -46,8 +44,7 @@ test = [
4644
]
4745
ase = ['ase']
4846
amber = [
49-
'parmed; python_version >= "3.8"',
50-
'parmed<4; python_version < "3.8"',
47+
'parmed',
5148
]
5249
pymatgen = ['pymatgen']
5350
docs = [

tests/plugin/pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ dependencies = [
1111
'dpdata',
1212
]
1313
readme = "README.md"
14-
requires-python = ">=3.8"
14+
requires-python = ">=3.10"
1515

1616
[project.entry-points.'dpdata.plugins']
1717
random = "dpdata_plugin_test:ep"

0 commit comments

Comments
 (0)