From 1c49074f1d10d4affe9d14ae73283258af7c6875 Mon Sep 17 00:00:00 2001 From: Chris Markiewicz Date: Tue, 8 Oct 2024 10:47:51 -0400 Subject: [PATCH] MNT: Update support matrix for Python and numpy --- .github/workflows/test.yml | 10 +++++----- doc/source/installation.rst | 16 ++++++++-------- pyproject.toml | 8 ++++---- tox.ini | 38 ++++++++++++++++++------------------- 4 files changed, 35 insertions(+), 37 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 9e5ddd516..a741a4071 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -113,17 +113,17 @@ jobs: fail-fast: false matrix: os: ['ubuntu-latest', 'windows-latest', 'macos-13', 'macos-latest'] - python-version: ["3.8", "3.9", "3.10", "3.11", "3.12"] + python-version: ["3.9", "3.10", "3.11", "3.12"] architecture: ['x64', 'x86', 'arm64'] dependencies: ['full', 'pre'] include: # Basic dependencies only - os: ubuntu-latest - python-version: 3.8 + python-version: 3.9 dependencies: 'none' # Absolute minimum dependencies - os: ubuntu-latest - python-version: 3.8 + python-version: 3.9 dependencies: 'min' # NoGIL - os: ubuntu-latest @@ -153,10 +153,10 @@ jobs: - os: macos-13 dependencies: pre # Drop pre tests for SPEC-0-unsupported Python versions - - python-version: '3.8' - dependencies: pre - python-version: '3.9' dependencies: pre + - python-version: '3.10' + dependencies: pre env: DEPENDS: ${{ matrix.dependencies }} diff --git a/doc/source/installation.rst b/doc/source/installation.rst index 4f747e7fe..dd8d6d008 100644 --- a/doc/source/installation.rst +++ b/doc/source/installation.rst @@ -81,16 +81,16 @@ is for you. Requirements ------------ -.. check these against pyproject.toml +.. check these against pyproject.toml / tox.ini -* Python_ 3.8 or greater -* NumPy_ 1.20 or greater +* Python_ 3.9 or greater +* NumPy_ 1.22 or greater * Packaging_ 17.0 or greater -* importlib-resources_ 1.3 or greater (or Python 3.9+) -* SciPy_ (optional, for full SPM-ANALYZE support) -* h5py_ (optional, for MINC2 support) -* PyDICOM_ 1.0.0 or greater (optional, for DICOM support) -* `Python Imaging Library`_ (optional, for PNG conversion in DICOMFS) +* importlib-resources_ 5.12 or greater (or Python 3.12+) +* SciPy_ 1.8 or greater (optional, for full SPM-ANALYZE support) +* h5py_ 3.5 or greater (optional, for MINC2 support) +* PyDICOM_ 2.3.0 or greater (optional, for DICOM support) +* `Python Imaging Library`_ 8.4 or greater (optional, for PNG conversion in DICOMFS) * pytest_ (optional, to run the tests) * sphinx_ (optional, to build the documentation) diff --git a/pyproject.toml b/pyproject.toml index 18883b90e..e4c96d013 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -9,9 +9,9 @@ authors = [{ name = "NiBabel developers", email = "neuroimaging@python.org" }] maintainers = [{ name = "Christopher Markiewicz" }] readme = "README.rst" license = { text = "MIT License" } -requires-python = ">=3.8" +requires-python = ">=3.9" dependencies = [ - "numpy >=1.20", + "numpy >=1.22", "packaging >=17", "importlib_resources >=5.12; python_version < '3.12'", "typing_extensions >=4.6; python_version < '3.13'", @@ -23,11 +23,11 @@ classifiers = [ "License :: OSI Approved :: MIT License", "Operating System :: OS Independent", "Programming Language :: Python", - "Programming Language :: Python :: 3.8", "Programming Language :: Python :: 3.9", "Programming Language :: Python :: 3.10", "Programming Language :: Python :: 3.11", "Programming Language :: Python :: 3.12", + "Programming Language :: Python :: 3.13", "Topic :: Scientific/Engineering", ] # Version from setuptools_scm @@ -53,7 +53,7 @@ parrec2nii = "nibabel.cmdline.parrec2nii:main" [project.optional-dependencies] all = ["nibabel[dicomfs,minc2,spm,zstd]"] # Features -dicom = ["pydicom >=1.0.0"] +dicom = ["pydicom >=2.3"] dicomfs = ["nibabel[dicom]", "pillow"] minc2 = ["h5py"] spm = ["scipy"] diff --git a/tox.ini b/tox.ini index 0e0f81a7a..e1acbe91f 100644 --- a/tox.ini +++ b/tox.ini @@ -7,14 +7,14 @@ requires = tox>=4 envlist = # No preinstallations - py3{8,9,10,11,12}-none + py3{9,10,11,12,13}-none # Minimum Python - py38-{min,full} + py39-{min,full} # x86 support range py3{9,10,11}-{full,pre}-{x86,x64} py3{9,10,11}-pre-{x86,x64} # x64-only range - py312-{full,pre}-x64 + py3{12,13}-{full,pre}-x64 # Special environment for numpy 2.0-dev testing py313-dev-x64 install @@ -26,7 +26,6 @@ skip_missing_interpreters = true # Configuration that allows us to split tests across GitHub runners effectively [gh-actions] python = - 3.8: py38 3.9: py39 3.10: py310 3.11: py311 @@ -83,28 +82,27 @@ deps = # We're extending this to all optional dependencies # This only affects the range that we test on; numpy is the only non-optional # dependency, and will be the only one to affect pip environment resolution. - min: numpy ==1.20 - min: h5py ==2.10 - min: indexed_gzip ==1.4 - min: matplotlib ==3.4 - min: pillow ==8.1 - min: pydicom ==2.1 - min: pyzstd ==0.14.3 - min: scipy ==1.6 + min: numpy ==1.22 + min: h5py ==3.5 + min: indexed_gzip ==1.6 + min: matplotlib ==3.5 + min: pillow ==8.4 + min: pydicom ==2.3 + min: pyzstd ==0.15.2 + min: scipy ==1.8 # Numpy 2.0 is a major breaking release; we cannot put much effort into # supporting until it's at least RC stable - pre: numpy <2.0.dev0 dev: numpy >=2.1.dev0 # Scipy stopped producing win32 wheels at py310 - py3{8,9}-full-x86,x64,arm64: scipy >=1.6 + py39-full-x86,x64,arm64: scipy >=1.8 # Matplotlib depends on scipy, so cannot be built for py310 on x86 - py3{8,9}-full-x86,x64,arm64: matplotlib >=3.4 + py39-full-x86,x64,arm64: matplotlib >=3.5 # h5py stopped producing win32 wheels at py39 - py38-full-x86,{full,pre}-{x64,arm64}: h5py >=2.10 - full,pre,dev: pillow >=8.1 - full,pre: indexed_gzip >=1.4 - full,pre,dev: pyzstd >=0.14.3 - full,pre: pydicom >=2.1 + {full,pre}-{x64,arm64}: h5py >=3.5 + full,pre,dev: pillow >=8.4 + full,pre: indexed_gzip >=1.6 + full,pre,dev: pyzstd >=0.15.2 + full,pre: pydicom >=2.3 dev: pydicom @ git+https://github.com/pydicom/pydicom.git@main commands =