Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Right now, there is no single source of truth for dependencies. Until this is done, let's fix the required versions of numpy found in multiple project files. There are basically 5 different places where numpy version requirements should be specified:
requirements.txt
requirements_dev.txt
requirements_wheel.txt
pyproject.toml -> build-system -> requires
pyproject.toml -> project -> dependencies
They can be merged into 3 categories:
pyproject.toml -> build-system -> requires
andrequirements_wheel.txt
are the requirements when building wheels (https://setuptools.pypa.io/en/latest/userguide/dependency_management.html#build-system-requirement). For python 3.8 wheels have to be built against numpy1.17
because we want support for>=1.17
. NumPy's ABI is forward but not backward compatible before1.25
. This means; binaries compiled against a given version of NumPy will still run correctly with newer NumPy versions, but not with older versions (https://numpy.org/devdocs/dev/depending_on_numpy.html). Foraarch64
andarm64
architectures the first version of numpy with available wheels is1.19
and1.21
, and thus we set this. For python 3.9+ wheels can be built against latest numpy (like other big projects are doing: https://github.com/pandas-dev/pandas/blob/58461fef2315d228d08f65f8a9430e9294d65b31/pyproject.toml#L11)pyproject.toml -> project dependencies
andrequirements.txt
are the requirements used to run the package (https://setuptools.pypa.io/en/latest/userguide/dependency_management.html#declaring-required-dependency). For python 3.8 whatever greater than numpy1.17
(build version) is fine (foraarch64
this is1.19
and forarm64
this is1.21
) and for python 3.9+ we want something greater than numpy1.25
since NumPy C-API is exposed in a backwards compatible way by default.requirements_dev.txt
. This shouldn't be much of concern since it's what we are installing to build and run locally. If we use the runtime dependencies it should be safe.Testing.
Python 3.8 (macos arm64)
Build: numpy-1.21.6
Installed with wheel: numpy-1.24.4
Python 3.8 (ubuntu)
Build: numpy-1.17.5
Installed with wheel: numpy-1.24.4
Python 3.9 (macos arm64)
Build: numpy-2.0.0rc2
Installed with wheel: numpy-1.26.4
*Wheels were installed in a fresh conda environment using
pip install --no-cache-dir
.[sc-48530]