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 <rep...@bugs.python.org>
<http://bugs.python.org/issue17621>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to