[Import-SIG] backport of importlib

Eric Snow ericsnowcurrently at gmail.com
Sun Jul 17 00:24:43 CEST 2011

On Sat, Jul 16, 2011 at 2:22 AM, Nick Coghlan <ncoghlan at gmail.com> wrote:
> I suspect several of the transforms you're applying would be handled
> natively by 3to2 - have you looked into using that at all?

Yeah, I remembered it once I was mostly already done (it didn't take a
long time).  If the backport script has many omissions I may revisit
it with 3to2.

> Did I ever tell you about the (deliberately undocumented) standard
> import emulation in pkgutil? That's what runpy and a couple of other
> pieces of the 2.x stdlib use to get around the fact that importlib
> didn't exist until recently (and still doesn't exist in its full form
> in 2.x). (Although I guess relying on that would make it harder to use
> importlib itself when forward porting to 3.x)

That and I figure it will be easier to take advantage of things like
the import engine and PEP 382 if it is a scripted backport of
importlib.  If I remember right from pycon, the packaging folks were
looking at a similar strategy.


> Cheers,
> Nick.
> --
> Nick Coghlan   |   ncoghlan at gmail.com   |   Brisbane, Australia

More information about the Import-SIG mailing list