<br><br><div>On Wed May 28 2014 at 12:55:00 AM, Eric Snow <<a href="mailto:ericsnowcurrently@gmail.com">ericsnowcurrently@gmail.com</a>> wrote:</div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Hi all,<br>
<br>
Motivated at PyCon by the "pymigrate" discussions, I started<br>
backporting importlib to 2.7.  I've finally freed up some time in the<br>
last week or so and have come close to having the project ready to<br>
release on the cheeseshop (as importlib2).  I'm hosting the repo and<br>
bug tracker on bitbucket:<br>
<br>
<a href="https://bitbucket.org/ericsnowcurrently/importlib2" target="_blank">https://bitbucket.org/<u></u>ericsnowcurrently/importlib2</a><br>
<br>
Feel free to take it for a spin.  Keep in mind that any functionality<br>
that depends on the no-longer-implicit import state (finders/path<br>
hooks) will not work without first calling importlib2.hook.inject().<br>
That includes importlib2.import_module().  If you notice any other<br>
rough corners just let me know.<br>
<br>
There are a few minor things I want to wrap up before officially<br>
releasing the project, but that shouldn't take much work.  In parallel<br>
I'm going to start working on the pymigrate* project, which will<br>
leverage importlib2 and importers to facilitate per-module enforcement<br>
of the 2.7/3.x intersection language.<br></blockquote><div><br></div><div>You'll have to refresh my memory because there were a lot of ideas tossed out at PyCon: why an importer and not some custom rules for pylint? E.g. I can see requiring that either ``from __future__ import unicode_literals`` or every string literal being marked with u or b being a rule, but I don't see the exact benefit of that over an importer (I realize that a per-file thing is desired, but tooling for that should be possible as well).</div>
<div><br></div><div>Anyway, this discussion should probably happen on the python-porting list since that's the audience more interested in this topic. =)</div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">

<br>
Lastly, I can never offer enough thanks to Brett Cannon for importlib<br>
and its thorough test suite.  It's made the backporting job possible<br>
(and almost easy).  Thanks Brett!<br></blockquote><div><br></div><div>Glad it helped someone else out! If I ever needed a personal example of why testing is important, importlib is it (there has been hardly any bugs about importlib which still continues to astound me).</div>
<div> </div><div>-Brett</div><div><br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<br>
-eric<br>
<br>
* Go go gadget bikeshed!<br>
______________________________<u></u>_________________<br>
Import-SIG mailing list<br>
<a href="mailto:Import-SIG@python.org" target="_blank">Import-SIG@python.org</a><br>
<a href="https://mail.python.org/mailman/listinfo/import-sig" target="_blank">https://mail.python.org/<u></u>mailman/listinfo/import-sig</a><br>
</blockquote>