Skip to content

DEP: expire deprecation for null handling of context and return_scalar in arraywrap - #31119

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

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

Conversation

@nakul-krishnakumar

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

Copy link
Copy Markdown
Contributor

PR summary

Progresses #30440

AI Disclosure

No AI tools used

@nakul-krishnakumar nakul-krishnakumar changed the title DEP: remove null handling of context and return_scalar in arraywrap DEP: expire deprecation for null handling of context and return_scalar in arraywrap Apr 2, 2026
@nakul-krishnakumar

nakul-krishnakumar commented Apr 2, 2026 •

Copy link
Copy Markdown
Contributor Author

I am not sure about when to add the release notes, it would be really helpful if anybody could guide me on that. Thank you!

@jorenham

jorenham commented Apr 2, 2026

Copy link
Copy Markdown
Member

I am not sure about when to add the release notes, it would be really helpful if anybody could guide me on that. Thank you!

Expired deprecations indeed require a release note. See https://github.com/numpy/numpy/blob/main/doc/release/upcoming_changes/README.rst for details.

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

Copy link
Copy Markdown
Contributor Author

@jorenham Thank you for the reference, I have added the release notes.

Comment thread numpy/_core/src/multiarray/arraywrap.c Resolved
Comment thread numpy/_core/src/multiarray/arraywrap.c Resolved
@seberg seberg removed the 56 - Needs Release Note. Needs an entry in doc/release/upcoming_changes label Apr 9, 2026
@seberg

seberg commented Apr 9, 2026

Copy link
Copy Markdown
Member

Thanks, this LGTM. But, I have a bit of a feeling that people might have managed to blissfully not notice this, e.g. torch here: https://github.com/pytorch/pytorch/blob/main/torch/_tensor.py#L1259

So that makes me wonder a bit if we should at least only bump it to a VisibleDeprecationWarning, and maybe also open a torch issue and wait til after 2.5 (since that is very soon) to merge.

I.e. as much as I would like to get this done... there seems little rush here.

@nakul-krishnakumar

Copy link
Copy Markdown
Contributor Author

Thanks, this LGTM. But, I have a bit of a feeling that people might have managed to blissfully not notice this, e.g. torch here: https://github.com/pytorch/pytorch/blob/main/torch/_tensor.py#L1259

So that makes me wonder a bit if we should at least only bump it to a VisibleDeprecationWarning, and maybe also open a torch issue and wait til after 2.5 (since that is very soon) to merge.

I.e. as much as I would like to get this done... there seems little rush here.

That makes sense, thanks for the suggestion.
I will go ahead and open a PR for converting it to VisibleDeprecationWarning and open an issue with PyTorch to check whether this behavior is relied upon there.
Does that sound good?

@seberg

seberg commented Apr 10, 2026

Copy link
Copy Markdown
Member

Yes, that would be great! Could also convert this PR, but either way is good.

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