Skip to content

DEP: make deprecation visible for __array_wrap__ - #31194

Open
nakul-krishnakumar wants to merge 2 commits into
numpy:mainfrom
nakul-krishnakumar:dep-arraywrap-visible
Open

nakul-krishnakumar wants to merge 2 commits into
numpy:mainfrom
nakul-krishnakumar:dep-arraywrap-visible

Conversation

@nakul-krishnakumar

@nakul-krishnakumar nakul-krishnakumar commented Apr 10, 2026 •

Copy link
Copy Markdown
Contributor

PR summary

This PR convert current DeprecationWarning to VisibleDeprecationWarning for numpy.ndarray.__array_wrap__.
This PR was made related to this comment.

AI Disclosure

No AI tools used.

@nakul-krishnakumar

Copy link
Copy Markdown
Contributor Author

Please let me know if this is the expected change mentioned in this comment.
Also to test the updation I ran spin test -t numpy/_core/tests/test_deprecations.py and all passed successfully, please correct me if I am wrong or if there is a better way to test changes. It would be really helpful as I am a first time contributor to numpy. Thank you!

cc: @seberg

@jorenham jorenham added 07 - Deprecation 56 - Needs Release Note. Needs an entry in doc/release/upcoming_changes labels Apr 10, 2026
@nakul-krishnakumar

Copy link
Copy Markdown
Contributor Author

@jorenham I have added release notes.

@nakul-krishnakumar nakul-krishnakumar changed the title DEP: update deprecation to visible for __arraywrap__ DEP: make deprecation visible for __array_wrap__ Apr 12, 2026
@jorenham jorenham removed the 56 - Needs Release Note. Needs an entry in doc/release/upcoming_changes label Apr 12, 2026
@seberg

seberg commented Apr 17, 2026

Copy link
Copy Markdown
Member

Thanks, I have opened a bug report on torch: pytorch/pytorch#180657, let's merge after 2.5 is out, probably.

@seberg seberg added this to the 2.6.0 Release milestone Apr 17, 2026
@ikrommyd

Copy link
Copy Markdown
Member

Is xarray affected? I have a vague memory that they used array wrap quite a bit.

Also if we still want to do this for 2.6.0, can you please rebase and fix the conflict?

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants