Author eric.snow
Recipients Arfrever, brett.cannon, eric.snow, ncoghlan, python-dev
Date 2013-12-06.06:35:07
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <>
Is the problem here that builtins (and extension modules) don't necessarily obey the rules to the letter?  load_module() is supposed to use whatever is in sys.modules. [1]  (BuiltinImporter.load_module() is essentially a synonym for _imp.init_builtin(), right?)

So in each PyInit_*() the code should be using the module out of sys.modules...  That sounds like a bug and I expect that the builtin modules and most extension modules don't comply.

That said, I realize the spirit of the load_module() rule is to support reloading, which is mostly not applicable to builtins and extension modules.  The code you reverted would rely on enforcing the rule outside the implicit applicability.

I'll be glad when we've resolved the extension module API changes that support exec_module()!

Date User Action Args
2013-12-06 06:35:08eric.snowsetrecipients: + eric.snow, brett.cannon, ncoghlan, Arfrever, python-dev
2013-12-06 06:35:08eric.snowsetmessageid: <>
2013-12-06 06:35:08eric.snowlinkissue19698 messages
2013-12-06 06:35:07eric.snowcreate