Repository navigation
ENH: Update pythoncapi-compat and add Limited API fallbacks for Py_SETREF - #32871
Conversation
|
The upstream PR is merged so it should be safe to move this out of draft after pointing the submodule on upstream |
|
This includes #32864, closing that one. |
Py_SETREF
|
Failing test is unrelated, I think we can merge this now and then I will push a small follow up to remove dead code because of python/pythoncapi-compat#187 when it is merged. |
|
I think we should wait for python/pythoncapi-compat#187 to provide the macros. |
Maybe we can get this merged now and then in future I will do a follow to remove those macros once . I have a few PRs lined up like #32951 |
| #include "numpy/arrayobject.h" | ||
|
|
||
| #include "npy_config.h" | ||
| #include "npy_pycompat.h" |
There was a problem hiding this comment.
Why does this file need the include? Likewise, there are other files with the include without any other changes.
|
Thanks @prathamhole14 |
|
I'm glad that adding limited C API support to pythoncapi-compat is useful to numpy! I'm sorry, I didn't investigate the Py_SETREF() issue on strict aliasing on Python upstream yet. Recently, I was busy with backporting many C API fixes from Python main to Python 3.14 and 3.15 branches, like backporting Py_CLEAR, Py_SETREF, Py_XSETREF changes and test_cext enhancements. |
|
See python/cpython#161186 for my Py_SETREF() strict aliasing fix. |
PR summary
Part of the Limited API work for
_multiarray_umath.Related to: #31913
Updates the
pythoncapi-compatsubmodule to upstreammain(ebbf075), which now supports the Limited APIPy_SETREFandpythoncapi-compat#32864