Message205355
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()!
[1] http://docs.python.org/dev/library/importlib.html#importlib.abc.Loader.load_module |
|
Date |
User |
Action |
Args |
2013-12-06 06:35:08 | eric.snow | set | recipients:
+ eric.snow, brett.cannon, ncoghlan, Arfrever, python-dev |
2013-12-06 06:35:08 | eric.snow | set | messageid: <1386311708.11.0.398728623736.issue19698@psf.upfronthosting.co.za> |
2013-12-06 06:35:08 | eric.snow | link | issue19698 messages |
2013-12-06 06:35:07 | eric.snow | create | |
|