Skip to content

Commit fcc2957

Browse files
committedOct 8, 2024
MNT: Update support matrix for Python and numpy
1 parent 5a32a60 commit fcc2957

File tree

4 files changed

+41
-42
lines changed

4 files changed

+41
-42
lines changed
 

‎.github/workflows/test.yml

+5-5
Original file line numberDiff line numberDiff line change
@@ -113,17 +113,17 @@ jobs:
113113
fail-fast: false
114114
matrix:
115115
os: ['ubuntu-latest', 'windows-latest', 'macos-13', 'macos-latest']
116-
python-version: ["3.8", "3.9", "3.10", "3.11", "3.12"]
116+
python-version: ["3.9", "3.10", "3.11", "3.12"]
117117
architecture: ['x64', 'x86', 'arm64']
118118
dependencies: ['full', 'pre']
119119
include:
120120
# Basic dependencies only
121121
- os: ubuntu-latest
122-
python-version: 3.8
122+
python-version: 3.9
123123
dependencies: 'none'
124124
# Absolute minimum dependencies
125125
- os: ubuntu-latest
126-
python-version: 3.8
126+
python-version: 3.9
127127
dependencies: 'min'
128128
# NoGIL
129129
- os: ubuntu-latest
@@ -153,10 +153,10 @@ jobs:
153153
- os: macos-13
154154
dependencies: pre
155155
# Drop pre tests for SPEC-0-unsupported Python versions
156-
- python-version: '3.8'
157-
dependencies: pre
158156
- python-version: '3.9'
159157
dependencies: pre
158+
- python-version: '3.10'
159+
dependencies: pre
160160

161161
env:
162162
DEPENDS: ${{ matrix.dependencies }}

‎doc/source/installation.rst

+10-10
Original file line numberDiff line numberDiff line change
@@ -81,16 +81,16 @@ is for you.
8181
Requirements
8282
------------
8383

84-
.. check these against pyproject.toml
85-
86-
* Python_ 3.8 or greater
87-
* NumPy_ 1.20 or greater
88-
* Packaging_ 17.0 or greater
89-
* importlib-resources_ 1.3 or greater (or Python 3.9+)
90-
* SciPy_ (optional, for full SPM-ANALYZE support)
91-
* h5py_ (optional, for MINC2 support)
92-
* PyDICOM_ 1.0.0 or greater (optional, for DICOM support)
93-
* `Python Imaging Library`_ (optional, for PNG conversion in DICOMFS)
84+
.. check these against pyproject.toml / tox.ini
85+
86+
* Python_ 3.9 or greater
87+
* NumPy_ 1.22 or greater
88+
* Packaging_ 20.0 or greater
89+
* importlib-resources_ 5.12 or greater (or Python 3.12+)
90+
* SciPy_ 1.8 or greater (optional, for full SPM-ANALYZE support)
91+
* h5py_ 3.5 or greater (optional, for MINC2 support)
92+
* PyDICOM_ 2.3.0 or greater (optional, for DICOM support)
93+
* `Python Imaging Library`_ 8.4 or greater (optional, for PNG conversion in DICOMFS)
9494
* pytest_ (optional, to run the tests)
9595
* sphinx_ (optional, to build the documentation)
9696

‎pyproject.toml

+6-6
Original file line numberDiff line numberDiff line change
@@ -9,10 +9,10 @@ authors = [{ name = "NiBabel developers", email = "neuroimaging@python.org" }]
99
maintainers = [{ name = "Christopher Markiewicz" }]
1010
readme = "README.rst"
1111
license = { text = "MIT License" }
12-
requires-python = ">=3.8"
12+
requires-python = ">=3.9"
1313
dependencies = [
14-
"numpy >=1.20",
15-
"packaging >=17",
14+
"numpy >=1.22",
15+
"packaging >=20",
1616
"importlib_resources >=5.12; python_version < '3.12'",
1717
"typing_extensions >=4.6; python_version < '3.13'",
1818
]
@@ -23,11 +23,11 @@ classifiers = [
2323
"License :: OSI Approved :: MIT License",
2424
"Operating System :: OS Independent",
2525
"Programming Language :: Python",
26-
"Programming Language :: Python :: 3.8",
2726
"Programming Language :: Python :: 3.9",
2827
"Programming Language :: Python :: 3.10",
2928
"Programming Language :: Python :: 3.11",
3029
"Programming Language :: Python :: 3.12",
30+
"Programming Language :: Python :: 3.13",
3131
"Topic :: Scientific/Engineering",
3232
]
3333
# Version from setuptools_scm
@@ -53,7 +53,7 @@ parrec2nii = "nibabel.cmdline.parrec2nii:main"
5353
[project.optional-dependencies]
5454
all = ["nibabel[dicomfs,minc2,spm,zstd]"]
5555
# Features
56-
dicom = ["pydicom >=1.0.0"]
56+
dicom = ["pydicom >=2.3"]
5757
dicomfs = ["nibabel[dicom]", "pillow"]
5858
minc2 = ["h5py"]
5959
spm = ["scipy"]
@@ -62,7 +62,7 @@ zstd = ["pyzstd >= 0.14.3"]
6262
# tox should use these with extras instead of duplicating
6363
doc = [
6464
"sphinx",
65-
"matplotlib>=1.5.3",
65+
"matplotlib>=3.5",
6666
"numpydoc",
6767
"texext",
6868
"tomli; python_version < '3.11'",

‎tox.ini

+20-21
Original file line numberDiff line numberDiff line change
@@ -7,14 +7,14 @@ requires =
77
tox>=4
88
envlist =
99
# No preinstallations
10-
py3{8,9,10,11,12}-none
10+
py3{9,10,11,12,13}-none
1111
# Minimum Python
12-
py38-{min,full}
12+
py39-{min,full}
1313
# x86 support range
1414
py3{9,10,11}-{full,pre}-{x86,x64}
1515
py3{9,10,11}-pre-{x86,x64}
1616
# x64-only range
17-
py312-{full,pre}-x64
17+
py3{12,13}-{full,pre}-x64
1818
# Special environment for numpy 2.0-dev testing
1919
py313-dev-x64
2020
install
@@ -26,7 +26,6 @@ skip_missing_interpreters = true
2626
# Configuration that allows us to split tests across GitHub runners effectively
2727
[gh-actions]
2828
python =
29-
3.8: py38
3029
3.9: py39
3130
3.10: py310
3231
3.11: py311
@@ -76,35 +75,35 @@ set_env =
7675
extras = test
7776
deps =
7877
# General minimum dependencies: pin based on API usage
79-
min: packaging ==17
78+
# matplotlib 3.5 requires packaging 20
79+
min: packaging ==20
8080
min: importlib_resources ==5.12; python_version < '3.12'
8181
min: typing_extensions ==4.6; python_version < '3.13'
8282
# NEP29/SPEC0 + 1yr: Test on minor release series within the last 3 years
8383
# We're extending this to all optional dependencies
8484
# This only affects the range that we test on; numpy is the only non-optional
8585
# dependency, and will be the only one to affect pip environment resolution.
86-
min: numpy ==1.20
87-
min: h5py ==2.10
88-
min: indexed_gzip ==1.4
89-
min: matplotlib ==3.4
90-
min: pillow ==8.1
91-
min: pydicom ==2.1
92-
min: pyzstd ==0.14.3
93-
min: scipy ==1.6
86+
min: numpy ==1.22
87+
min: h5py ==3.5
88+
min: indexed_gzip ==1.6
89+
min: matplotlib ==3.5
90+
min: pillow ==8.4
91+
min: pydicom ==2.3
92+
min: pyzstd ==0.15.2
93+
min: scipy ==1.8
9494
# Numpy 2.0 is a major breaking release; we cannot put much effort into
9595
# supporting until it's at least RC stable
96-
pre: numpy <2.0.dev0
9796
dev: numpy >=2.1.dev0
9897
# Scipy stopped producing win32 wheels at py310
99-
py3{8,9}-full-x86,x64,arm64: scipy >=1.6
98+
py39-full-x86,x64,arm64: scipy >=1.8
10099
# Matplotlib depends on scipy, so cannot be built for py310 on x86
101-
py3{8,9}-full-x86,x64,arm64: matplotlib >=3.4
100+
py39-full-x86,x64,arm64: matplotlib >=3.5
102101
# h5py stopped producing win32 wheels at py39
103-
py38-full-x86,{full,pre}-{x64,arm64}: h5py >=2.10
104-
full,pre,dev: pillow >=8.1
105-
full,pre: indexed_gzip >=1.4
106-
full,pre,dev: pyzstd >=0.14.3
107-
full,pre: pydicom >=2.1
102+
{full,pre}-{x64,arm64}: h5py >=3.5
103+
full,pre,dev: pillow >=8.4
104+
full,pre: indexed_gzip >=1.6
105+
full,pre,dev: pyzstd >=0.15.2
106+
full,pre: pydicom >=2.3
108107
dev: pydicom @ git+https://github.com/pydicom/pydicom.git@main
109108

110109
commands =

0 commit comments

Comments
 (0)
Please sign in to comment.