ENH: Removed remnants of Python 2 buffer protocol from NumPy internals#31176
ENH: Removed remnants of Python 2 buffer protocol from NumPy internals#31176Anushreebasics wants to merge 2 commits intonumpy:mainfrom
Conversation
SummaryIt makes three main changes:
@ngoldbaum @jorenham please review |
eaa9145 to
da1a38a
Compare
ngoldbaum
left a comment
There was a problem hiding this comment.
Left some comments. FWIW it's OK if you used AI for PRs like this, you just need to disclose it.
| npy_intp len; | ||
| int flags; | ||
| } _PyArray_Chunk; | ||
| #else |
There was a problem hiding this comment.
Why add this indirection if you're not going to deprecate using the struct or change it? I'd just keep it around and use the public version internally.
There was a problem hiding this comment.
You could also figure out a way to signal to users that this struct is deprecated. In that case it makes sense to add the indirection.
da1a38a to
7fb72af
Compare
|
@ngoldbaum please review the changes |
ngoldbaum
left a comment
There was a problem hiding this comment.
Looks good! I marked it for the 2.5 release. Before this can be merged it needs a release note though. See doc/release/upcoming_changes/README.rst for instructions.
|
@ngoldbaum I have added the release notes, please review the changes |
fixes #30813
First time committer introduction
Hi NumPy team, I’m a first-time contributor. I use NumPy regularly for array-heavy Python work, mainly for data processing and numerical experimentation. While working with NumPy internals/C-API docs, I noticed issue #30813 around legacy Python 2 buffer-protocol language and wanted to help modernize and clarify that path. This contribution is my attempt to reduce confusion for future contributors and keep the API/docs aligned with current behavior.
AI Disclosure
no AI tools were used