[issue17621] Create a lazy import loader mixin

Brett Cannon report at bugs.python.org
Sat Jun 22 21:12:11 CEST 2013


Brett Cannon added the comment:

So the approaches I have been using make a loader lazy, so what you have to change in terms of sys.meta_path, sys.path_hooks, etc. would very from loader to loader.

I have realized one tricky thing with all of this is that importlib itself inspects modules post-import to verify that __loader__ and __package__ have been set. That typically triggers an immediate load and so might need to be special-cased.

----------

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


More information about the Python-bugs-list mailing list