Message278507
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:47 | eric.snow | set | recipients:
+ eric.snow, brett.cannon, ncoghlan, grahamd |
2016-10-11 22:44:47 | eric.snow | set | messageid: <1476225887.07.0.494948614607.issue28411@psf.upfronthosting.co.za> |
2016-10-11 22:44:47 | eric.snow | link | issue28411 messages |
2016-10-11 22:44:47 | eric.snow | create | |
|