[Python-Dev] Python 2.3a1 release -- Dec 31
Just van Rossum
just@letterror.com
Fri, 27 Dec 2002 23:37:50 +0100
James C. Ahlstrom wrote:
> Just van Rossum wrote:
> > From: "Samuele Pedroni" <pedronis@bluewin.ch>
> >>it was considered a feature to be able to put path/to/a.zip/python
> >>in sys.path, so that the a.b package would be looked up under
> >>path/to/a.zip/python/a/b.
> >
> > PEP 273 doesn't document it as such; it only says it's needed for
> > package imports.
>
> The cornerstone of PEP 273 is Directory Equivalence, a zipped
> directory must act like the directory. And my implementation does
> provide this feature.
>
> > Also, to be honest, my implementation had some issues with that
> > usage: it would look for the plain .zip archive in
> > sys.path_importer_cache, which would obviously not be found,
> > causing the zip file index to be read again for every package
> > directory.
>
> Mine reads the zip directory only once, and caches the whole
> directory tree. The payoff from the heavy mods to import.c, I guess.
I had a long talk with Guido yesterday, and I'm going to go back to
supporting the archive.zip/subdir/ feature as well as adding a proper
archive.zip/subdir/ string to __path__. I hope to do this before monday,
if my parents-in-law allow me ;-)
Just