-
-
Notifications
You must be signed in to change notification settings - Fork 275
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
Fix namespace package detection for frozen stdlib modules on PyPy #1757
Fix namespace package detection for frozen stdlib modules on PyPy #1757
Conversation
Pull Request Test Coverage Report for Build 2940401201
💛 - Coveralls |
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.
LGTM but I don't have pypy installed, let's wait for the reporter to confirm it works.
@jacobtylerwalls : It works both against the minimal reproducer and the use case that originally triggered the issue. Thank you! |
Note to self: I actually opened an issue against PyPy for this. I'll open a PR to add some reference to this as I think it would be good to link it. Also, shouldn't we try to infer namespaces better on PyPy? Instead of just giving up? |
Thank you!
Only old-style |
Description
PyPy doesn't bother to set
__spec__
on some frozen stdlib modules likeimportlib._bootstrap
. We were using the lack of__spec__
as a heuristic for old-style namespace packages withpkg_resources
. That assumption breaks given PyPy's behavior.Type of Changes
Related Issue
Fixes #1755