[Python Dev] No longer trigger a DeprecationWarning when using a UDF #16433
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.
This PR fixes #16370
Numpy has deprecated access to
numpy.core
in 2.0.0, we need to make suremultiarray
does not get imported by a non-main thread for the first time, as this causes a segfault.multiarray
is sadly not exposed through the public API, so we kind of jump through a couple hoops to not trigger the warning anymore, while still remaining backwards compatible.What does scare me a little is that I did not run into the DeprecationWarning during testing, so I wonder if accessing
multiarray
in this roundabout fashion is taking the right path, if it's not then we could still run the risk of running into the aforementioned segfault.