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.
Backport of #27956.
This is required to build with the main and 3.13 branches of CPython when built with freethredaing enabled.
Without this I am seeing failures like
when building with freethreading with gcc (GCC) 14.2.1 20240910. I see this on main, 3.13, and with v3.13.1 so I'm pretty sure this is not a CPython change. I did not bisect back on numpy to see if this is a recent change in numpy or due to gcc getting upgraded locally.
I will admit to not fully understanding this change, but I did what the compiler said to do and it built....
This is required to build with the main and 3.13 branches of CPython when built with freethredaing enabled.