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 iomintz
Recipients iomintz
Date 2019-07-08.00:52:26
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1562547146.83.0.540334530677.issue37521@roundup.psfhosted.org>
In-reply-to
Content
unzip the attached zip file and run main.py

expected output:

True
<module 'testext.sub' (namespace)>

actual output:
False
<module 'testext.sub' (namespace)>

So what?
If you follow these directions, https://docs.python.org/3.7/library/importlib.html#checking-if-a-module-can-be-imported , you will put a stale reference in sys.modules even though a fresh reference is already there. If you use that code on a package with a subpackage, the subpackage will not be set as an attribute on the package.
History
Date User Action Args
2019-07-08 00:52:26iomintzsetrecipients: + iomintz
2019-07-08 00:52:26iomintzsetmessageid: <1562547146.83.0.540334530677.issue37521@roundup.psfhosted.org>
2019-07-08 00:52:26iomintzlinkissue37521 messages
2019-07-08 00:52:26iomintzcreate