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.
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Use importlib to load numba extensions #5209
Use importlib to load numba extensions #5209
Changes from 3 commits
2b672f2
bedf8da
4999274
22f4f04
22e91be
8f3c285
760ae11
c3d6990
44bcc9c
22e230a
86af993
0d03446
bbe8594
1fbb79f
6184d29
7992f28
169d106
e5fdc82
61ae870
c842eda
724990f
d94e66d
fbd66c3
b5f75f6
59fa60d
4456c37
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Perhaps get this from the Anaconda distro?!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Perhaps get this from the Anaconda distro?!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What if this fails? I'm wondering if there ought to be an explicit Python>=3.8 branch which just imports it and then another which tries and fails gracefully if the package is missing.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It will only fail on Python < 3.8 if importlib_metadata is missing (it is listed as requirement).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We tend to assume nothing about how Numba was built, it's entirely possible someone just grabbed the source and some limited set of bootstrap packages available for their unusual architecture and built it (this actually happens in practice, we see these people on the issue tracker when strange things happen!). As a result, we tend to err on the side of trying to be as helpful as possible and catch things like this and say something about it being needed.
Further, this will need adding to the dependencies section in the docs: https://github.com/numba/numba/blob/13ece9b97e6f01f750e870347f231282325f60c3/docs/source/user/installing.rst#dependency-list
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Seems like a similar change can also be made to
test_entrypoint_tolerance
as part of this clean up.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Similar change made - note this also involves configuring the mock with a side effect for
init_func()
.