Author brett.cannon
Recipients brett.cannon, eric.snow, iomintz, ncoghlan
Date 2019-07-12.21:44:00
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1562967840.82.0.0669360529911.issue37521@roundup.psfhosted.org>
In-reply-to
Content
So the issue is the lines assigning to sys.modules and loader.exec_module() are reversed. Had you not done an import in your testext.__init__ you never would have noticed, but since you are then the normal import system is noticing there's nothing in sys.modules and thus inserting a module (importlib.uilt.module_from_spec() always creates a new module so your module that you create never ends up in sys.modules).
History
Date User Action Args
2019-07-12 21:44:00brett.cannonsetrecipients: + brett.cannon, ncoghlan, eric.snow, iomintz
2019-07-12 21:44:00brett.cannonsetmessageid: <1562967840.82.0.0669360529911.issue37521@roundup.psfhosted.org>
2019-07-12 21:44:00brett.cannonlinkissue37521 messages
2019-07-12 21:44:00brett.cannoncreate