<br><br><div class="gmail_quote">On Tue, Feb 7, 2012 at 22:47, Nick Coghlan <span dir="ltr">&lt;<a href="mailto:ncoghlan@gmail.com">ncoghlan@gmail.com</a>&gt;</span> wrote</div><div class="gmail_quote"><br></div><div class="gmail_quote">

[SNIP]<div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">The fact that we have an undocumented PEP 302 based reimplementation<br>
of imports squirrelled away in pkgutil to make pkgutil and runpy work<br>
is sheer insanity (replacing *that* with importlib might actually be a<br>
good first step towards full integration).<br></blockquote><div><br></div><div>It easily goes beyond runpy. You could ditch much of imp&#39;s C code (e.g. load_module()), you could write py_compile and compileall using importlib, you could rewrite zipimport, etc. Anything that touches import could be refactored to (a) use just Python code, and (b) reshare code so as to not re-invent the wheel constantly.</div>

</div>