[Python-Dev] Python 2.3a1 release -- Dec 31
Just van Rossum
just@letterror.com
Tue, 24 Dec 2002 21:48:12 +0100
Guido van Rossum wrote:
> I've read PEP 302, and while there are some things left to discuss, I
> would really like to see Just's code checked in for the alpha release,
> so that it gets widespread testing. Just, are you up for that?
Sure ;-) I'll wait a few days to see if there are any objections or
showstoppers.
I updated the patch yesterday, there was a fairly large change in
zipimport.c. If it were in CVS, this would have been the log msg:
general:
- incorporated patch from Paul Moore that adds a default zip
archive path to sys.path on Windows (it was already there on
unix). Thanks Paul!
import.c:
- matches latest version of PEP 302 (rev 1.3), regarding the
new 'path' argument of importer.find_module(fullname, path=None)
zipimporter.c
- removed the subdir feature, which allowed the path to the
zip archive to be extended with a subdirectory. PEP 273
stated this was needed for package support (and only for
that). However, with the new import hooks this is no longer
true: a path item containing the plain zip archive path can
also deal with submodules (find_module receives the full
module name after all). Therefore a pkg.__path__ from a
package loaded from a zip archive will contain the *plain*
zip archive path.
- as a consequence I could simplify and clean up lots of
things (esp. zipimporter_init: eg. it no longer needs to
check sys.path_importer_cache; yay). Getting rid of the
zipimporter.prefix attribute altogether helped a lot in
other places.
- this change additionally enabled me to get rid of the
restriction that zip paths must end in .ZIP or .zip; any
extension (or even no extension) will now work.
- implemented all the (optional) extensions of the Importer
Protocol that the latest version of PEP 302 defines.
Merry Christmas everyone!
Just