Nick Coghlan added the comment:
As Serhiy notes, this isn't a bug in the import name resolution, it's a
consequence of the wildcard import in bugtest's __init__.py replacing its own
"bug.foo" submodule attribute with a reference to "bug.foo.foo".
If the star imports can't be avoided, then a potential workaround is to restore
"bugtest.foo" from sys.modules:
foo = sys.modules[__name__ + ".foo"]
----------
resolution: -> not a bug
stage: -> resolved
status: open -> closed
_______________________________________
Python tracker <[email protected]>
<https://bugs.python.org/issue31385>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe:
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com