Skip to content

Commit

Permalink
Update numpy build constraints for numpy 1.25 (#53)
Browse files Browse the repository at this point in the history
Starting in numpy 1.25 (see
https://github.com/numpy/numpy/releases/tag/v1.25.0), the numpy C API is
backwards-compatible by default.

For python 3.9+, we should be able to drop the specific numpy build
requirements and use `numpy>=1.25`, which is currently
backwards-compatible to `numpy>=1.19`.

In the future, the python <3.9 requirements could be dropped and the
lower numpy pin could correspond to the oldest supported version for the
current lower python pin.
  • Loading branch information
adrianeboyd committed Jul 20, 2023
1 parent 9e96d0a commit 796d3cf
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 6 deletions.
5 changes: 1 addition & 4 deletions build-constraints.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,4 @@ numpy==1.15.0; python_version<='3.7' and platform_machine!='aarch64'
numpy==1.19.2; python_version<='3.7' and platform_machine=='aarch64'
numpy==1.17.3; python_version=='3.8' and platform_machine!='aarch64'
numpy==1.19.2; python_version=='3.8' and platform_machine=='aarch64'
numpy==1.19.3; python_version=='3.9'
numpy==1.21.3; python_version=='3.10'
numpy==1.23.2; python_version=='3.11'
numpy; python_version>='3.12'
numpy>=1.25.0; python_version>='3.9'
5 changes: 3 additions & 2 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ requires = [
"setuptools",
"wheel",
"Cython<3.0",
"spacy>=3.3.0,<3.6.0",
"numpy",
"spacy>=3.3.0,<3.7.0",
"numpy>=1.15.0; python_version < '3.9'",
"numpy>=1.25.0; python_version >= '3.9'",
]
2 changes: 2 additions & 0 deletions requirements.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
spacy>=3.3.0,<3.7.0
numpy>=1.15.0; python_version < "3.9"
numpy>=1.19.0; python_version >= "3.9"

# Development dependencies
cython>=0.25,<3.0
Expand Down
2 changes: 2 additions & 0 deletions setup.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@ zip_safe = false
python_requires = >=3.6
install_requires =
spacy>=3.3.0,<3.7.0
numpy>=1.15.0; python_version < "3.9"
numpy>=1.19.0; python_version >= "3.9"

[options.entry_points]
spacy_architectures =
Expand Down

0 comments on commit 796d3cf

Please sign in to comment.