This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author ncoghlan
Recipients David Hagen, brett.cannon, eric.snow, ncoghlan, r.david.murray, serhiy.storchaka
Date 2017-09-07.22:29:22
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1504823362.73.0.255423578657.issue31385@psf.upfronthosting.co.za>
In-reply-to
Content
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"]
History
Date User Action Args
2017-09-07 22:29:22ncoghlansetrecipients: + ncoghlan, brett.cannon, r.david.murray, eric.snow, serhiy.storchaka, David Hagen
2017-09-07 22:29:22ncoghlansetmessageid: <1504823362.73.0.255423578657.issue31385@psf.upfronthosting.co.za>
2017-09-07 22:29:22ncoghlanlinkissue31385 messages
2017-09-07 22:29:22ncoghlancreate