diff --git a/CHANGE_LOG b/CHANGE_LOG index 5be1ab334a9..0b2ec9d5b77 100644 --- a/CHANGE_LOG +++ b/CHANGE_LOG @@ -270,6 +270,7 @@ Pull-Requests: * PR `#8197 `_: Fix `isinstance` warning check test. (`stuartarchibald `_) * PR `#8203 `_: pin llvmlite 0.39 for public CI builds (`esc `_) * PR `#8192 `_: Update CHANGE_LOG for 0.56.0 (`stuartarchibald `_ `esc `_ `Siu Kwan Lam `_) +* PR `#8205 `_: Pin llvmlite and NumPy on release branch.(`esc `_ `Siu Kwan Lam `_) Authors: diff --git a/buildscripts/condarecipe.local/meta.yaml b/buildscripts/condarecipe.local/meta.yaml index ae485971906..e07ff5aa002 100644 --- a/buildscripts/condarecipe.local/meta.yaml +++ b/buildscripts/condarecipe.local/meta.yaml @@ -35,7 +35,7 @@ requirements: - setuptools - importlib_metadata # [py<39] # On channel https://anaconda.org/numba/ - - llvmlite >=0.39.0dev0,<0.39 + - llvmlite 0.39.* # TBB devel version is to match TBB libs. # 2020.3 is the last version with the "old" ABI # NOTE: 2021.1..2021.5 are API compatible for Numba's purposes. @@ -45,11 +45,11 @@ requirements: run: - python >=3.7 # NumPy 1.22.0, 1.22.1, 1.22.2 are all broken for ufuncs, see #7756 - - numpy >=1.18, !=1.22.0, !=1.22.1, !=1.22.2 + - numpy >=1.18, !=1.22.0, !=1.22.1, !=1.22.2, <1.23 - setuptools - importlib_metadata # [py<39] # On channel https://anaconda.org/numba/ - - llvmlite >=0.39.0dev0,<0.39 + - llvmlite 0.39.* run_constrained: # If TBB is present it must be at least version 2021 - tbb >=2021 # [not (armv6l or armv7l or aarch64 or linux32 or ppc64le)] diff --git a/docs/source/user/installing.rst b/docs/source/user/installing.rst index a7eecbdf8d3..5e4149e2cfe 100644 --- a/docs/source/user/installing.rst +++ b/docs/source/user/installing.rst @@ -5,7 +5,7 @@ Installation Compatibility ------------- -Numba is compatible with Python 3.7--3.10, and Numpy versions 1.18 or later. +Numba is compatible with Python 3.7--3.10, and Numpy versions 1.18 up to 1.22. Our supported platforms are: diff --git a/numba/__init__.py b/numba/__init__.py index 3c40e1b19e3..30f0ff45ca3 100644 --- a/numba/__init__.py +++ b/numba/__init__.py @@ -142,6 +142,8 @@ def _ensure_critical_deps(): if numpy_version < (1, 18): raise ImportError("Numba needs NumPy 1.18 or greater") + elif numpy_version > (1, 22): + raise ImportError("Numba needs NumPy 1.22 or less") try: import scipy diff --git a/setup.py b/setup.py index f6703f64fc2..19766b8a290 100644 --- a/setup.py +++ b/setup.py @@ -23,6 +23,7 @@ max_python_version = "3.11" # exclusive min_numpy_build_version = "1.11" min_numpy_run_version = "1.18" +max_numpy_run_version = "1.23" min_llvmlite_version = "0.39.0dev0" max_llvmlite_version = "0.40" @@ -356,10 +357,11 @@ def check_file_at_path(path2file): packages = find_packages(include=["numba", "numba.*"]) -build_requires = ['numpy >={}'.format(min_numpy_build_version)] +build_requires = ['numpy >={},<{}'.format(min_numpy_build_version, + max_numpy_run_version)] install_requires = [ 'llvmlite >={},<{}'.format(min_llvmlite_version, max_llvmlite_version), - 'numpy >={}'.format(min_numpy_run_version), + 'numpy >={},<{}'.format(min_numpy_run_version, max_numpy_run_version), 'setuptools', 'importlib_metadata; python_version < "3.9"', ]