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 eric.snow
Recipients brett.cannon, eric.snow, grahamd, ncoghlan
Date 2016-10-11.22:44:47
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <>
What's the benefit to adding PyInterpreterState_GetModuleCache()?  TBH, it should only be needed in this short period during startup when the import system hasn't been bootstrapped yet.  After that code can import sys and access sys.modules from there.  (For that matter, PyImport_GetModuleDict() doesn't buy all that much either...)  I think all this would be clearer in a world with PEP 432.  :)

FWIW, I'm inclined to encourage new APIs where it makes sense that take an explicit interp arg.  I just don't think a new public API is warranted here.  If we didn't already have PyImport_GetModuleDict(), I'd probably just move the code to Python/pylifecycle.c, inlined or in a small static function.

And +1 to ModuleCache vs. ModuleDict. :)
Date User Action Args
2016-10-11 22:44:47eric.snowsetrecipients: + eric.snow, brett.cannon, ncoghlan, grahamd
2016-10-11 22:44:47eric.snowsetmessageid: <>
2016-10-11 22:44:47eric.snowlinkissue28411 messages
2016-10-11 22:44:47eric.snowcreate