Skip to content

Commit 58b872b

Browse files
authored
Add initial python 3.14 support and bump up in line with SPEC0 (#5121)
* Add support for python 3.14 * Bump up numpy and python versions in line with SPEC0, the minimum supported numpy is now 1.26.0 and the minimum python is 3.11.
1 parent 2250195 commit 58b872b

File tree

10 files changed

+78
-68
lines changed

10 files changed

+78
-68
lines changed

.github/workflows/deploy.yaml

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ jobs:
4141
- [macos-13, macosx_*, x86_64]
4242
- [windows-2022, win_amd64, AMD64]
4343
- [macos-14, macosx_*, arm64]
44-
python: ["cp310", "cp311", "cp312", "cp313"]
44+
python: ["cp311", "cp312", "cp313", "cp314"]
4545
defaults:
4646
run:
4747
working-directory: ./package
@@ -51,7 +51,7 @@ jobs:
5151
fetch-depth: 0
5252

5353
- name: Build wheels
54-
uses: pypa/cibuildwheel@v2.23.0
54+
uses: pypa/cibuildwheel@v3.2.0
5555
with:
5656
package-dir: package
5757
env:
@@ -246,14 +246,13 @@ jobs:
246246
fail-fast: false
247247
matrix:
248248
os: [ubuntu-latest, macos-latest, windows-latest]
249-
python-version: ["3.10", "3.11", "3.12", "3.13"]
249+
python-version: ["3.11", "3.12", "3.13", "3.14"]
250250
type: ["FULL", "MIN"]
251251
exclude:
252252
# Multiple deps don't like windows
253253
- os: windows-latest
254254
type: "FULL"
255-
# Chemfiles won't install over py3.13
256-
- python-version: "3.13"
255+
- python-version: "3.14"
257256
type: "FULL"
258257
env:
259258
MPLBACKEND: agg

.github/workflows/gh-ci-cron.yaml

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,8 @@ on:
66
workflow_dispatch:
77
# Uncomment when you need to test on a PR
88
# pull_request:
9-
# branches:
10-
# - develop
9+
# branches:
10+
# - develop
1111

1212

1313
concurrency:
@@ -107,7 +107,6 @@ jobs:
107107
pip
108108
condarc: |
109109
channels:
110-
- jaimergp/label/unsupported-cudatoolkit-shim
111110
- conda-forge
112111
- bioconda
113112
@@ -141,7 +140,7 @@ jobs:
141140
strategy:
142141
fail-fast: false
143142
matrix:
144-
os: [ubuntu-20.04, macos-13]
143+
os: [ubuntu-22.04, macos-13]
145144

146145
steps:
147146
- uses: actions/checkout@v4
@@ -156,11 +155,10 @@ jobs:
156155
with:
157156
environment-name: mda
158157
create-args: >-
159-
python=3.10
158+
python=3.11
160159
pip
161160
condarc: |
162161
channels:
163-
- jaimergp/label/unsupported-cudatoolkit-shim
164162
- conda-forge
165163
- bioconda
166164
@@ -190,7 +188,7 @@ jobs:
190188
strategy:
191189
fail-fast: false
192190
matrix:
193-
python-version: ["3.10", "3.11", "3.12", "3.13"]
191+
python-version: ["3.11", "3.12", "3.13", "3.14"]
194192
steps:
195193
- uses: actions/checkout@v4
196194

@@ -233,10 +231,8 @@ jobs:
233231
matrix:
234232
# Stick to macos-13 because some of our
235233
# optional deps don't support arm64 (i.e. macos-14)
236-
#
237-
# add "3.13" once conda-forge packages are available (see #4805)
238234
os: [ubuntu-latest, macos-13]
239-
python-version: ["3.10", "3.11", "3.12"]
235+
python-version: ["3.10", "3.11", "3.12", "3.13"]
240236
steps:
241237
- uses: actions/checkout@v4
242238

@@ -252,10 +248,8 @@ jobs:
252248
create-args: >-
253249
python=${{ matrix.python-version }}
254250
pip
255-
# using jaime's shim to avoid pulling down the cudatoolkit
256251
condarc: |
257252
channels:
258-
- jaimergp/label/unsupported-cudatoolkit-shim
259253
- conda-forge
260254
- bioconda
261255
@@ -298,15 +292,21 @@ jobs:
298292
with:
299293
python-version: ${{ matrix.python-version }}
300294

295+
- name: install_deps
296+
shell: bash
297+
run: |
298+
pip install pytest-xdist pytest-timeout "numpy<2.3" "cython<3.1" wheel "setuptools>=40.9.0" packaging
299+
301300
- name: install_mdanalysis
302301
shell: bash
303302
run: |
304303
# If wheels is False we build directly from source so we use the --no-binary flag
305304
# to avoid pulling down wheels for MDAnalysis (which are already precompiled)
305+
# Also need to add `--no-build-isolation` until next release, see Issue #5125
306306
if [ "${{ matrix.wheels }}" == "false" ]; then
307-
INSTALL_FLAGS="-vvv --no-binary"
307+
INSTALL_FLAGS="--no-build-isolation --no-binary"
308308
fi
309-
pip install ${INSTALL_FLAGS} mdanalysis mdanalysistests pytest-xdist pytest-timeout
309+
pip install ${INSTALL_FLAGS} mdanalysis mdanalysistests
310310
311311
- name: run_tests
312312
shell: bash

.github/workflows/gh-ci.yaml

Lines changed: 25 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -28,29 +28,43 @@ jobs:
2828
fail-fast: false
2929
matrix:
3030
os: [ubuntu-latest, ]
31-
python-version: ["3.10", "3.11", "3.12"]
31+
python-version: ["3.11", "3.12", "3.13"]
3232
full-deps: [true, ]
3333
codecov: [true, ]
34+
cython: ["cython<3.1", ]
3435
include:
35-
- name: python_313
36+
# Including 3.14 and 3.11 without coverage
37+
# and cython >=3.1 to deal temporarily with
38+
# keeping on testing Cython whilst issue #5057
39+
# is not fixed
40+
- name: python_314_nocov
3641
os: ubuntu-latest
37-
python-version: "3.13"
42+
python-version: "3.14"
3843
full-deps: false
39-
codecov: true
40-
- name: macOS_14_arm64_py312
44+
codecov: false
45+
cython: "cython>=3.1"
46+
- name: python_311_nocov
47+
os: ubuntu-latest
48+
python-version: "3.11"
49+
full-deps: false
50+
codecov: false
51+
cython: "cython>=3.1"
52+
- name: macOS_14_arm64_py313
4153
os: macOS-14
42-
python-version: "3.12"
54+
python-version: "3.13"
4355
full-deps: false
4456
codecov: true
57+
cython: "cython<3.1"
4558
- name: numpy_min
4659
os: ubuntu-latest
47-
python-version: "3.10"
60+
python-version: "3.11"
4861
full-deps: false
4962
codecov: true
50-
numpy: numpy=1.23.2
63+
numpy: numpy=1.26.0
64+
cython: "cython<3.1"
5165
- name: asv_check
5266
os: ubuntu-latest
53-
python-version: "3.10"
67+
python-version: "3.11"
5468
full-deps: true
5569
codecov: false
5670
extra-pip-deps: asv
@@ -88,7 +102,7 @@ jobs:
88102
# disable GSD because it occasionally introduce hanging in testing #4209
89103
gsd: ''
90104
# pin cython
91-
cython: 'cython<3.1'
105+
cython: ${{ matrix.cython }}
92106
# in most cases will just default to empty, i.e. pick up max version from other deps
93107
numpy: ${{ matrix.numpy }}
94108
extra-pip-deps: ${{ matrix.extra-pip-deps }}
@@ -151,12 +165,11 @@ jobs:
151165
with:
152166
environment-name: mda
153167
create-args: >-
154-
python=3.10
168+
python=3.11
155169
pip
156170
# using jaime's shim to avoid pulling down the cudatoolkit
157171
condarc: |
158172
channels:
159-
- jaimergp/label/unsupported-cudatoolkit-shim
160173
- conda-forge
161174
- bioconda
162175

.github/workflows/linters.yaml

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ jobs:
3131

3232
- uses: actions/setup-python@v5
3333
with:
34-
python-version: "3.10"
34+
python-version: "3.11"
3535

3636
- uses: psf/black@stable
3737
with:
@@ -55,7 +55,7 @@ jobs:
5555

5656
- uses: actions/setup-python@v5
5757
with:
58-
python-version: "3.10"
58+
python-version: "3.11"
5959

6060
- name: install
6161
run: |
@@ -80,12 +80,10 @@ jobs:
8080
with:
8181
environment-name: mda
8282
create-args: >-
83-
python=3.10
83+
python=3.11
8484
pip
85-
# using jaime's shim to avoid pulling down the cudatoolkit
8685
condarc: |
8786
channels:
88-
- jaimergp/label/unsupported-cudatoolkit-shim
8987
- conda-forge
9088
- bioconda
9189
@@ -94,7 +92,7 @@ jobs:
9492
with:
9593
micromamba: true
9694
full-deps: true
97-
numpy: numpy=1.23.2
95+
numpy: numpy=1.26.0
9896
rdkit: rdkit=2023.09.3
9997

10098
- name: install

azure-pipelines.yml

Lines changed: 17 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -21,39 +21,39 @@ jobs:
2121
MPLBACKEND: agg
2222
strategy:
2323
matrix:
24-
Win-Python310-64bit-full:
25-
PYTHON_VERSION: '3.10'
24+
Win-Python311-64bit-full:
25+
PYTHON_VERSION: '3.11'
2626
PYTHON_ARCH: 'x64'
2727
BUILD_TYPE: 'normal'
2828
imageName: 'windows-2019'
29-
Win-Python312-64bit-full:
30-
PYTHON_VERSION: '3.12'
29+
Win-Python313-64bit-full:
30+
PYTHON_VERSION: '3.13'
3131
PYTHON_ARCH: 'x64'
3232
BUILD_TYPE: 'normal'
3333
imageName: 'windows-2019'
34-
Win-Python312-64bit-full-wheel:
35-
PYTHON_VERSION: '3.12'
34+
Win-Python313-64bit-full-wheel:
35+
PYTHON_VERSION: '3.13'
3636
PYTHON_ARCH: 'x64'
3737
BUILD_TYPE: 'wheel'
38-
NUMPY_MIN: '1.26.0'
38+
NUMPY_MIN: '2.1.0'
3939
imageName: 'windows-2019'
40-
Win-Python310-64bit-full-wheel:
41-
PYTHON_VERSION: '3.10'
40+
Win-Python311-64bit-full-wheel:
41+
PYTHON_VERSION: '3.11'
4242
PYTHON_ARCH: 'x64'
4343
BUILD_TYPE: 'wheel'
44-
NUMPY_MIN: '1.23.2'
44+
NUMPY_MIN: '1.26.0'
4545
imageName: 'windows-2019'
46-
Linux-Python312-64bit-full-wheel:
47-
PYTHON_VERSION: '3.12'
46+
Linux-Python313-64bit-full-wheel:
47+
PYTHON_VERSION: '3.13'
4848
PYTHON_ARCH: 'x64'
4949
BUILD_TYPE: 'wheel'
5050
NUMPY_MIN: '2.1.0'
5151
imageName: 'ubuntu-latest'
52-
Linux-Python310-64bit-full-wheel:
53-
PYTHON_VERSION: '3.10'
52+
Linux-Python311-64bit-full-wheel:
53+
PYTHON_VERSION: '3.11'
5454
PYTHON_ARCH: 'x64'
5555
BUILD_TYPE: 'wheel'
56-
NUMPY_MIN: '1.23.2'
56+
NUMPY_MIN: '1.26.0'
5757
imageName: 'ubuntu-latest'
5858
pool:
5959
vmImage: $(imageName)
@@ -100,6 +100,8 @@ jobs:
100100
python -m pip install numpy==$(NUMPY_MIN)
101101
displayName: 'pin to older NumPy (wheel test)'
102102
condition: and(succeeded(), ne(variables['NUMPY_MIN'], ''))
103+
# Disabled PyTNG checking, see issue #5123
104+
# TODO: add pytng>=0.2.3 back once resolved
103105
- script: >-
104106
python -m pip install -vvv
105107
biopython
@@ -110,7 +112,6 @@ jobs:
110112
mmtf-python
111113
networkx
112114
parmed
113-
pytng>=0.2.3
114115
rdkit>=2024.03.4
115116
tidynamics>=1.0.0
116117
imdclient>=0.2.2

maintainer/conda/environment.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,9 +17,9 @@ dependencies:
1717
- mmtf-python
1818
- mock
1919
- networkx
20-
- numpy>=1.23.2
20+
- numpy>=1.26.0
2121
- pytest
22-
- python==3.10
22+
- python==3.11
2323
- pytng>=0.2.3
2424
- scikit-learn
2525
- scipy

package/CHANGELOG

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,7 @@ Fixes
4747
and does not result in an infinite loop (Issue #5112, PR #5113)
4848

4949
Enhancements
50+
* Support for Python 3.14 was added (PR #5121).
5051
* Added support for reading and processing streamed data in `coordinates.base`
5152
with new `StreamFrameIteratorSliced` and `StreamReaderBase` (Issue #4827, PR #4923)
5253
* New coordinate reader: Added `IMDReader` for reading real-time streamed
@@ -85,6 +86,7 @@ Enhancements
8586

8687

8788
Changes
89+
* Support for Python 3.10 was removed, in line with SPEC0 (PR #5121).
8890
* Refactored the RDKit converter code to move the inferring code in a separate
8991
`RDKitInferring` module. The bond order and charges inferrer has been move to
9092
an `MDAnalysisInferrer` dataclass in there. (PR #4305)

package/pyproject.toml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
[build-system]
22
# Minimum requirements for the build system to execute
33
requires = [
4-
"Cython>=0.28,<3.1",
4+
"Cython>=0.28",
55
"packaging",
66
# numpy requirement for wheel builds for distribution on PyPI - building
77
# against 2.x yields wheels that are also compatible with numpy 1.x at
@@ -27,9 +27,9 @@ authors = [
2727
maintainers = [
2828
{name = 'MDAnalysis Core Developers', email = '[email protected]'}
2929
]
30-
requires-python = ">=3.10"
30+
requires-python = ">=3.11"
3131
dependencies = [
32-
'numpy>=1.23.2',
32+
'numpy>=1.26.0',
3333
'GridDataFormats>=0.4.0',
3434
'mmtf-python>=1.0.0',
3535
'joblib>=0.12',
@@ -55,10 +55,10 @@ classifiers = [
5555
'Operating System :: MacOS :: MacOS X',
5656
'Operating System :: Microsoft :: Windows',
5757
'Programming Language :: Python',
58-
'Programming Language :: Python :: 3.10',
5958
'Programming Language :: Python :: 3.11',
6059
'Programming Language :: Python :: 3.12',
6160
'Programming Language :: Python :: 3.13',
61+
'Programming Language :: Python :: 3.14',
6262
'Programming Language :: C',
6363
'Topic :: Scientific/Engineering',
6464
'Topic :: Scientific/Engineering :: Bio-Informatics',
@@ -126,7 +126,7 @@ MDAnalysis = [
126126

127127
[tool.black]
128128
line-length = 79
129-
target-version = ['py310', 'py311', 'py312', 'py313']
129+
target-version = ['py311', 'py312', 'py313']
130130
extend-exclude = '''
131131
(
132132
__pycache__

0 commit comments

Comments
 (0)