diff --git a/.github/workflows/gh-ci.yaml b/.github/workflows/gh-ci.yaml index 578f4e4e84..79ac678c39 100644 --- a/.github/workflows/gh-ci.yaml +++ b/.github/workflows/gh-ci.yaml @@ -41,7 +41,7 @@ jobs: python-version: 3.9 full-deps: false codecov: true - numpy: numpy=1.22.3 + numpy: numpy=1.23.2 - name: asv_check os: ubuntu-latest python-version: 3.9 diff --git a/.github/workflows/linters.yaml b/.github/workflows/linters.yaml index b4b9b061cb..8a708169d1 100644 --- a/.github/workflows/linters.yaml +++ b/.github/workflows/linters.yaml @@ -145,7 +145,7 @@ jobs: with: micromamba: true full-deps: true - numpy: numpy=1.22.3 + numpy: numpy=1.23.2 - name: install run: | diff --git a/azure-pipelines.yml b/azure-pipelines.yml index 61d58be7e9..4affb137b5 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -41,7 +41,7 @@ jobs: PYTHON_VERSION: '3.9' PYTHON_ARCH: 'x64' BUILD_TYPE: 'wheel' - NUMPY_MIN: '1.22.3' + NUMPY_MIN: '1.23.2' imageName: 'windows-2019' Linux-Python312-64bit-full-wheel: PYTHON_VERSION: '3.12' @@ -53,7 +53,7 @@ jobs: PYTHON_VERSION: '3.9' PYTHON_ARCH: 'x64' BUILD_TYPE: 'wheel' - NUMPY_MIN: '1.22.3' + NUMPY_MIN: '1.23.2' imageName: 'ubuntu-latest' pool: vmImage: $(imageName) diff --git a/maintainer/conda/environment.yml b/maintainer/conda/environment.yml index a3dbb3400e..ea3e2b5002 100644 --- a/maintainer/conda/environment.yml +++ b/maintainer/conda/environment.yml @@ -18,7 +18,7 @@ dependencies: - mmtf-python - mock - networkx - - numpy>=1.22.3 + - numpy>=1.23.2 - pytest - python==3.9 - pytng>=0.2.3 diff --git a/package/CHANGELOG b/package/CHANGELOG index c65ce91703..3c5522cacd 100644 --- a/package/CHANGELOG +++ b/package/CHANGELOG @@ -24,6 +24,9 @@ Fixes Enhancements Changes + * As per NEP29, the minimum version of numpy has been raised to 1.23. + We have opted to pin to 1.23.2 to ensure the same minimum numpy version + is used from python 3.9 to 3.11 (Issue #4401, PR #4402) Deprecations diff --git a/package/pyproject.toml b/package/pyproject.toml index 4b1ed86317..0314506976 100644 --- a/package/pyproject.toml +++ b/package/pyproject.toml @@ -5,15 +5,9 @@ requires = [ "packaging", # lowest NumPy we can use for a given Python, # In part adapted from: https://github.com/scipy/oldest-supported-numpy/blob/main/setup.cfg - # except for more exotic platform (Mac Arm flavors) - # aarch64, AIX, s390x, and arm64 all support 1.21 so we can safely pin to this - # Note: MDA does not build with PyPy so we do not support it in the build system - # Scipy: On windows avoid 1.21.6, 1.22.0, and 1.22.1 because they were built on vc142 - # Let's set everything to this version to make things clean, also avoids other issues - # on other archs - "numpy==1.22.3; python_version=='3.9' and platform_python_implementation != 'PyPy'", - "numpy==1.22.3; python_version=='3.10' and platform_python_implementation != 'PyPy'", - "numpy==1.23.2; python_version=='3.11' and platform_python_implementation != 'PyPy'", + # As per NEP29, we set the minimum version to 1.23.2 for Python <=3.11 + # and 1.26.0 (first to support) for Python 3.12 + "numpy==1.23.2; python_version<='3.11' and platform_python_implementation != 'PyPy'", "numpy==1.26.0; python_version=='3.12' and platform_python_implementation != 'PyPy'", # For unreleased versions of Python there is currently no known supported # NumPy version. In that case we just let it be a bare NumPy install @@ -35,7 +29,7 @@ maintainers = [ ] requires-python = ">=3.9" dependencies = [ - 'numpy>=1.22.3', + 'numpy>=1.23.2', 'GridDataFormats>=0.4.0', 'mmtf-python>=1.0.0', 'joblib>=0.12', @@ -109,4 +103,3 @@ Discord = 'https://discord.com/channels/807348386012987462/' Blog = 'https://www.mdanalysis.org/blog/' Twitter = 'https://twitter.com/mdanalysis' Source = 'https://github.com/mdanalysis/mdanalysis' - diff --git a/package/requirements.txt b/package/requirements.txt index 0a95277bf2..accac1b49f 100644 --- a/package/requirements.txt +++ b/package/requirements.txt @@ -10,7 +10,7 @@ matplotlib mmtf-python netcdf4 networkx -numpy>=1.22.3 +numpy>=1.23.2 packaging parmed pytest diff --git a/package/setup.py b/package/setup.py index ccc846b38a..bef7ae75c4 100755 --- a/package/setup.py +++ b/package/setup.py @@ -591,7 +591,7 @@ def long_description(readme): exts, cythonfiles = extensions(config) install_requires = [ - 'numpy>=1.22.3', + 'numpy>=1.23.2', 'GridDataFormats>=0.4.0', 'mmtf-python>=1.0.0', 'joblib>=0.12', @@ -637,7 +637,7 @@ def long_description(readme): # all standard requirements are available through PyPi and # typically can be installed without difficulties through setuptools setup_requires=[ - 'numpy>=1.21.0', + 'numpy>=1.23.2', 'packaging', ], install_requires=install_requires,