Repository navigation
ENH: Adopt _umath_tests for Limited-API compliance - #32201
Conversation
|
Note: Ready for review! |
|
Thanks for the reviews @ngoldbaum, I agree the comments were trivial therefore I have removed them, please have a look. |
| dependencies: [py_dep, np_core_dep] | ||
| ) |
There was a problem hiding this comment.
This library statically included into the _umath_tests module and also needs something like this (untested, suggested by an AI model):
| dependencies: [py_dep, np_core_dep] | |
| ) | |
| c_args: get_option('python.allow_limited_api') ? ['-DPy_LIMITED_API=0x030d0000'] : [] | |
| ) |
Since it's a static library the limited API macro doesn't flow down automatically. There's no equivalent of the py.extension_module limited_api argument for this multi_targets construction. But also maybe there should be? This construction is defined only in NumPy's fork of meson and hasn't landed upstream yet.
I don't know if you're going to come across more of this in the simd module.
There was a problem hiding this comment.
Thanks for catching this, oops I wasn't aware limited_api doesn't propagate through link_with -- I have confirmed it's a real violation, also added py_limited_api_hex = '0x030d0000' since meson can't derive one from the other there's no int to hex conversion, and limited_api itself only accepts the X.Y decimal form.
96edb3e to
f3da436
Compare
|
Failing tests are unrelated! |
PR summary
Related to: #31913
AI Disclosure
Finding places where changes are required.