Mailing List Archive

revised import code (was: Relative Package Imports)
On Mon, 13 Sep 1999, M.-A. Lemburg wrote:
> Gordon McMillan wrote:
> > But I strongly believe that import.c should be left alone, maybe
> > even to die. There are too many people doing import hooks to
> > make fiddling with its behavior safe.
> >
> > I'm also a strong proponent of Greg's imputil.py scheme, which
> > makes it a breeze to do import hooks. And my experience
> > disproves the notion that the import mechanism needs to be in C. If
> > you don't believe me, try the ZlibArchive stuff (which is cross
> > platform) from my Win32 installer stuff. You can pack the standard
> > library into one 475K file, and get a perceptible performance boost.
>
> You're probably right in saying that we don't need the code in C.
> I just wanted to avoid yet another import hook being incompatible
> with all the other existing hooks.
>
> Perhaps we should restart the import discussion all over and
> come up with a more flexbile 100% compatible framework based
> on Greg's imputil scheme. Then I could add my hook for the relative
> imports and be happy ;-)

I'll code up some patches to strip down import.c and replace with
imputil.py and some bootstrap/support C code -- as soon as 1.6 development
opens up.

Guido?

Cheers,
-g

--
Greg Stein, http://www.lyra.org/