[Python-Dev] New and Improved Import Hooks

Martin v. Löwis martin@v.loewis.de
03 Dec 2002 09:57:53 +0100


Just van Rossum <just@letterror.com> writes:

> Don't you at least agree it's a hairy patch?

It is very hard to read, as a patch, yes, and it does a lot of things
that aren't clearly needed.

However, in all cases I've investigated, the resulting import.c works
just as fine as the original one. Don't read the patch, read the
resulting code instead.

I don't like to reject the patch on grounds of "it is too
complicated". Perhaps the complexity is inherent, and it can't be done
trivially. In that case, it would be a pity since it means that we can
never get zipfile imports.

The feature that this patch provides is well-defined. If somebody
volunteers to cleanup the implementation later - this would be
definitely appreciated.

> > In what time frame would you expect to implement the zipfile import
> > patch using your framework?
> 
> Don't know, I can't do it by myself. Shouldn't be too hard, though.

That, of course, speaks against the framework, or atleast against
rejecting the zipfile patch.

It seems that the likeliness is high that we get a new framework, and
no application for it. If we require zipfile importing to use the new
framework, we will never get zipfile importing.

This doesn't sound very promising, so I'd mandate that any new
framework demonstrates its usefulness in a non-trivial case, which is
best done by implementing (or re-implementing) zipfile import.

Regards,
Martin