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
frozen packages set an improper __path__ value #48461
Comments
If you import a frozen package (e.g. __phello__), __path__ is set to Changing import to put the string in a list is all that is needed to |
Looking at Python/import.c:find_module, fixing this will require To make the change work for find frozen modules, find_module() will need The performance cost can go away if some strapping young lad happens to Setting as a release blocker for now in case Barry is willing to let |
I have an attached patch that fixes the reported problem. First, it adds a sanity check that no empty module name is checked for Second, the __path__ attribute is now a list. This does break Third, I removed the special-casing of frozen packages and just made At this point I need a review to get this into 3.0 and a decision on |
FWIW, I agree with the idea of fixing it for 3.0 and leaving it in for 2.x. |
I approve of the API change. It's 3.0, dammit! |
Fixed in r67112. |
Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.
Show more details
GitHub fields:
bugs.python.org fields:
The text was updated successfully, but these errors were encountered: