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 <>
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).
Date User Action Args
2019-07-12 21:44:00brett.cannonsetrecipients: + brett.cannon, ncoghlan, eric.snow, iomintz
2019-07-12 21:44:00brett.cannonsetmessageid: <>
2019-07-12 21:44:00brett.cannonlinkissue37521 messages
2019-07-12 21:44:00brett.cannoncreate