Repository navigation
MAINT: Generate the module state structs from the field lists - #32544
Merged
Merged
Conversation
prathamhole14
force-pushed
the
module_state_generated_fields
branch
3 times, most recently
from
September 8, 2026 18:30
6354a67 to
fae7610
Compare
prathamhole14
marked this pull request as ready for review
September 8, 2026 18:30
ngoldbaum
previously requested changes
Sep 8, 2026
ngoldbaum
left a comment
Member
There was a problem hiding this comment.
Nice, I'm very happy to delete a bunch of code!
I have one request to preserve comments you're deleting
prathamhole14
force-pushed
the
module_state_generated_fields
branch
from
September 9, 2026 03:23
fae7610 to
63a2125
Compare
seberg
approved these changes
Sep 9, 2026
seberg
left a comment
Member
There was a problem hiding this comment.
Thanks, and thanks for restoring the comments as well.
SwayamInSync
added a commit
to SwayamInSync/numpy
that referenced
this pull request
Sep 16, 2026
Conflict in numpy/_core/src/common/npy_import.h: numpygh-32544 now generates the members of npy_runtime_imports_struct from NPY_RUNTIME_IMPORTS_FIELDS via NPY_DECLARE_PYOBJECT_FIELDS, so the explicit member list is gone. Resolved by taking main's generated declaration and dropping the two explicit `_dot_fallback`/`_vdot_fallback` members this branch had added; they are now generated from the F() entries already present in module_state_fields.h.
1 of 2 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
PR summary
Addresses @seberg's review comment #31992 (comment) about avoiding the duplication.
AI Disclosure
In this PR almost everything is done by claude opus 5 but I understand the changes and verified them myself.