Skip to content

Conversation

@bsteffensmeier
Copy link
Member

This change prevents jep from importing numpy if it isn't already imported into an interpreter. It is especially important for anyone who builds jep with numpy support and wants to use isolated sub-interpreters. Numpy does not work in isolated sub-interpreters so jep should not ever import it. It should still be possible to use the same build of Jep with numpy support in shared interpreters.

Without this change TestIsolatedSubInterpreter.java will fail when jep is built with numpy support so new testing is not needed, our existing test verify this change whenever jep is built with numpy support.

@bsteffensmeier bsteffensmeier requested a review from ndjensen March 28, 2025 00:52
Copy link
Member

@ndjensen ndjensen left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A good change.

@bsteffensmeier bsteffensmeier merged commit 9b69911 into ninia:dev_4.3 Mar 31, 2025
1 check passed
@bsteffensmeier bsteffensmeier deleted the lazy-numpy-import branch March 31, 2025 00:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants