[Python-Dev] Zipping Zope3

Moore, Paul Paul.Moore@atosorigin.com
Wed, 18 Dec 2002 09:37:55 -0000


> FWIW, <http://www.python.org/sf/652586> has been
> enhanced with the mod.__importer__ feature.=20

... and I've just added a comment expressing some concerns.

I think we need a PEP about now, pinning down the "abstract"
import hook interface. What zipimport does risks turning into
a de-facto requirement, before we have any other hooks to
compare with.

My specific issue is with get_data, which is totally unneeded
for the import protocol itself (although it does solve real,
related issues). I don't think it should be a requirement of
the import hook API. Documenting it as an optional interface
which hooks may choose to support may be reasonable, though.

[I can construct theoretical use cases where it could be hard
to support get_data. But I don't like theoretical use cases
any more than anyone else - I'm just suggesting that we wait
for practical experience before adding anything more to what
is currently a nice, clean, and simple API]

Paul.

PS If Just doesn't want to, I'll volunteer to write such a PEP.
   But be warned, if I do, I'll probably indulge my instincts
   and make the API as minimal as I can get away with (I *like*
   the iterator interface :-))