Author bmintz
Recipients bmintz
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:26bmintzsetrecipients: + bmintz
2019-07-08 00:52:26bmintzsetmessageid: <1562547146.83.0.540334530677.issue37521@roundup.psfhosted.org>
2019-07-08 00:52:26bmintzlinkissue37521 messages
2019-07-08 00:52:26bmintzcreate