Issue495458

classification
Title: multi level import from .zip file.
Type: Severity: normal
Components: Core Versions:
Milestone:
process
Status: closed Resolution: fixed
Dependencies: Superseder:
Assigned To: bckfnn Nosy List: bckfnn
Priority: normal Keywords:

Created on 2001-12-20.16:40:24 by bckfnn, last changed 2001-12-20.16:44:44 by bckfnn.

Messages
msg534 (view) Author: Finn Bock (bckfnn) Date: 2001-12-20.16:40:24
[Matt_Conway]

I had a problem with multi level import from a jar 
file in my sys.path. basically, my simple test jar 
looks as follows, with the init files being  empty, 
and the py files having a simple variable def:

jlib.jar:
Lib/
Lib/aaa/
Lib/aaa/__init__.py
Lib/aaa/bbb/
Lib/aaa/bbb/__init__.py
Lib/aaa/bbb/ccc/
Lib/aaa/bbb/ccc/__init__.py
Lib/aaa/bbb/ccc/yyy.py
Lib/aaa/bbb/xxx.py


import aaa works fine
import aaa.bbb (or more levels) doesn't

I traced the problem down to the following line from 
the method "loadFromZipFile" on line 302 in 
org/python/core/imp.java
                SyspathArchive subArchive = 
zipArchive.makeSubfolder(modName);
Which should probably be
                SyspathArchive subArchive = 
zipArchive.makeSubfolder(name);

Or at least, when I change it to that, all levels of 
import work for me =)
msg535 (view) Author: Finn Bock (bckfnn) Date: 2001-12-20.16:41:17
Logged In: YES 
user_id=4201

Added as test350.py
msg536 (view) Author: Finn Bock (bckfnn) Date: 2001-12-20.16:44:44
Logged In: YES 
user_id=4201

Fixed in imp.java: 2.58;
History
Date User Action Args
2001-12-20 16:40:24bckfnncreate