[issue17621] Create a lazy import loader mixin

Brett Cannon report at bugs.python.org
Sun Dec 15 03:25:41 CET 2013


Brett Cannon added the comment:

Attached is a script to verify that PEP 451 works as desired, so Python 3.5 doesn't have any technical blockers for doing a lazy loader for PEP 451 loaders.

And with __spec__.loader_state it might be possible to work things out through a common API to work around issue #18275 so that relying on super() and doing this as a mixin goes away and instead just somehow store the final loader on the spec (e.g. loader's constructor just takes a spec so that you can instantiate the actual loader, reset __loader__ & __spec__.loader, and then proceed with exec_module()).

----------
dependencies:  -Implementation for PEP 451 (importlib.machinery.ModuleSpec)
Added file: http://bugs.python.org/file33136/lazy_test.py

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue17621>
_______________________________________


More information about the Python-bugs-list mailing list