[Patches] [ python-Patches-476047 ] Zip importing; do NOT install

noreply@sourceforge.net noreply@sourceforge.net
Wed, 07 Nov 2001 07:08:17 -0800


Patches item #476047, was opened at 2001-10-29 08:21
You can respond by visiting: 
http://sourceforge.net/tracker/?func=detail&atid=305470&aid=476047&group_id=5470

Category: Core (C code)
Group: None
Status: Open
Resolution: None
Priority: 5
Submitted By: James C. Ahlstrom (ahlstromjc)
Assigned to: Nobody/Anonymous (nobody)
Summary: Zip importing; do NOT install

Initial Comment:
Here is the zip importing implementation.  Do not
install, just look at it.  A known bug is that a
sys.path item "/A/arch.zip/Lib" fails.  Patch is
against 2.2a3.

JimA



----------------------------------------------------------------------

>Comment By: James C. Ahlstrom (ahlstromjc)
Date: 2001-11-07 07:08

Message:
Logged In: YES 
user_id=64929

I have attached a second version of the patches to import.c.
Do not install this either, but it is closer.

The major change is the use of os.listdir() to list
the files in directories, and the use of the resultant
dictionary entries to speed up imports.

Highly interesting is the use of Python module os.listdir()
as part of the import process.  This means that any Python
module could be used as well, thus making possible the
replacement of import.c by a custom importer after a
boot phase.

----------------------------------------------------------------------

Comment By: Jeremy Hylton (jhylton)
Date: 2001-10-30 12:11

Message:
Logged In: YES 
user_id=31392

I wonder if it would be better to do more of the work at the
C level, rather than passing everything up to Python.  The
tuples that describe the ZIP file contents could be C
structs and the actual retrieval could be written in C.  I
suspect it is worthwhile, since our goal is to make imports
faster.


----------------------------------------------------------------------

You can respond by visiting: 
http://sourceforge.net/tracker/?func=detail&atid=305470&aid=476047&group_id=5470