Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Clamp numpy #7209

Merged
merged 9 commits into from Jul 16, 2021
Merged

Clamp numpy #7209

merged 9 commits into from Jul 16, 2021

Conversation

esc
Copy link
Member

@esc esc commented Jul 15, 2021

As discussed during the developer meeting, we will clamp NumPy to a maximum compatible version for released versions. This implements that.

@esc esc changed the base branch from master to release0.54 July 15, 2021 13:38
@esc esc added this to the Numba 0.54 RC2 milestone Jul 15, 2021
setup.py Outdated
@@ -359,7 +360,7 @@ def check_file_at_path(path2file):
build_requires = ['numpy >={}'.format(min_numpy_build_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),
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Think this needs to be <1.21 so that e.g. 1.20.3 works ok?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

oh yes, because <=1.20 means <=1.20.0

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fixed in 77f3b

@esc esc added 4 - Waiting on reviewer Waiting for reviewer to respond to author and removed 3 - Ready for Review labels Jul 15, 2021
README.rst Outdated
@@ -50,7 +50,7 @@ Dependencies

* Python versions: 3.7-3.9
* llvmlite 0.37.*
* NumPy >=1.17 (can build with 1.11 for ABI compatibility).
* NumPy >=1.17,<=1.20 (can build with 1.11 for ABI compatibility).
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
* NumPy >=1.17,<=1.20 (can build with 1.11 for ABI compatibility).
* NumPy >=1.17,<1.21 (can build with 1.11 for ABI compatibility).

Copy link
Contributor

@stuartarchibald stuartarchibald left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should this get a guard for too high a version as well?

numba/numba/__init__.py

Lines 135 to 136 in 0c499bf

if numpy_version < (1, 17):
raise ImportError("Numba needs NumPy 1.17 or greater")

Further, what about the conda recipes? e.g.


should there be a restriction imposed here?

@@ -5,7 +5,8 @@ Installation
Compatibility
-------------

Numba is compatible with Python 3.7 or later, and Numpy versions 1.17 or later.
Numba is compatible with Python 3.7 or later, and Numpy versions from 1.17 up
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
Numba is compatible with Python 3.7 or later, and Numpy versions from 1.17 up
Numba is compatible with Python 3.7 or later, and NumPy versions from 1.17 up

though not necessary to get this merged!

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fixed in abc4f8d

@stuartarchibald stuartarchibald added 4 - Waiting on author Waiting for author to respond to review and removed 4 - Waiting on reviewer Waiting for reviewer to respond to author labels Jul 15, 2021
@esc
Copy link
Member Author

esc commented Jul 15, 2021

Should this get a guard for too high a version as well?

numba/numba/__init__.py

Lines 135 to 136 in 0c499bf

if numpy_version < (1, 17):
raise ImportError("Numba needs NumPy 1.17 or greater")

Maybe. I can patch it.

Further, what about the conda recipes? e.g.

should there be a restriction imposed here?

Conda package, for sure.

@esc esc added 4 - Waiting on reviewer Waiting for reviewer to respond to author and removed 4 - Waiting on author Waiting for author to respond to review labels Jul 15, 2021
@sklam
Copy link
Member

sklam commented Jul 15, 2021

I confirmed that the wheels are preventing numpy1.21.

Installing collected packages: numpy, numba
  Attempting uninstall: numpy
    Found existing installation: numpy 1.21.0
    Uninstalling numpy-1.21.0:
      Successfully uninstalled numpy-1.21.0
Successfully installed numba-0.54.0rc1+9.gabc4f8d62 numpy-1.20.3

@sklam sklam added 5 - Ready to merge Review and testing done, is ready to merge and removed 4 - Waiting on reviewer Waiting for reviewer to respond to author labels Jul 16, 2021
Copy link
Member

@sklam sklam left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the patch!

@sklam sklam merged commit 84cee19 into numba:release0.54 Jul 16, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
5 - Ready to merge Review and testing done, is ready to merge
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants