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

Updated deprecated NumPy alias #6814

Merged
merged 1 commit into from Dec 21, 2022
Merged

Updated deprecated NumPy alias #6814

merged 1 commit into from Dec 21, 2022

Conversation

radarhere
Copy link
Member

https://github.com/python-pillow/Pillow/actions/runs/3730334148/jobs/6327268745#step:8:4081

/home/runner/work/Pillow/Pillow/Tests/test_numpy.py:196: DeprecationWarning: np.bool8 is a deprecated alias for np.bool_. (Deprecated NumPy 1.24)

See also the NumPy release notes

https://numpy.org/devdocs/release/1.24.0-notes.html#np-str0-and-similar-are-now-deprecated

The scalar type aliases ending in a 0 bit size: np.object0, np.str0, np.bytes0, np.void0, np.int0, np.uint0 as well as np.bool8 are now deprecated and will eventually be removed.

@hugovk
Copy link
Member

hugovk commented Dec 21, 2022

Do you know which version of NumPy added the replacement np.bool_ and when it says released?

That's now the minimum version required to run this code. It only affects a test, so should be fine.

@radarhere
Copy link
Member Author

I can see it in the docs for NumPy 1.13 - https://numpy.org/doc/1.13/reference/arrays.scalars.html. That's as far back as the docs go.

I can see it used in a pull request from 2014 - https://github.com/numpy/numpy/pull/4105/files

@hugovk
Copy link
Member

hugovk commented Dec 21, 2022

That's plenty then, thank you!

@hugovk hugovk merged commit 46b4967 into python-pillow:main Dec 21, 2022
@radarhere radarhere deleted the numpy branch December 21, 2022 20:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants