Skip to content

ENH: Add limited API support for _struct_ufunc_tests module - #32210

Merged
ngoldbaum merged 5 commits into
numpy:mainfrom
prathamhole14:struct_ufunc_tests_limited_api
Aug 12, 2026
Merged

ngoldbaum merged 5 commits into
numpy:mainfrom
prathamhole14:struct_ufunc_tests_limited_api

Conversation

@prathamhole14

Copy link
Copy Markdown
Member

PR summary

Related to: #31913

AI Disclosure

For the comment.

@prathamhole14

Copy link
Copy Markdown
Member Author

I think the failing test is unrelated, this PR is ready for review!

Comment on lines +6 to +12
/* Build as a downstream module: the internal `PyArray_DTypeMeta` is built on
* `PyHeapTypeObject`, which is not in the limited API. `NPY_TARGET_VERSION`
* keeps the API target that `NPY_INTERNAL_BUILD` implied. */
#if defined(NPY_INTERNAL_BUILD)
#undef NPY_INTERNAL_BUILD
#endif
#define NPY_TARGET_VERSION NPY_API_VERSION

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

I think this is OK? But I'd like it if another C API expert could confirm.

These tests are all supposed to check if we're breaking external C API users, so you could even argue this is a more correct way to do it.

Comment thread numpy/_core/meson.build Resolved
@ngoldbaum

Copy link
Copy Markdown
Member

Merging the other PR introduced a conflict - I'll merge this after you clear it.

@ngoldbaum

Copy link
Copy Markdown
Member

Thanks @prathamhole14

@ngoldbaum
ngoldbaum merged commit 9760fef into numpy:main Aug 12, 2026
91 of 92 checks passed
@prathamhole14
prathamhole14 deleted the struct_ufunc_tests_limited_api branch August 12, 2026 19:12
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.

2 participants