This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author pconnell
Recipients Arfrever, eric.smith, eric.snow, isoschiz, jerub, jpaugh, ncoghlan, pconnell, pje, ronaldoussoren, serhiy.storchaka
Date 2013-04-03.16:47:11
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1365007631.88.0.995872123012.issue14905@psf.upfronthosting.co.za>
In-reply-to
Content
The problem appears to be more general. zipimport fails for deeper hierarchies, even with directory entries.

With the supplied patch (zipimport-issue14905-2.patch) I see the following:

$ unzip -l foo.zip
Archive:  foo.zip
  Length      Date    Time    Name
---------  ---------- -----   ----
        0  2013-04-03 17:28   a/b/c/foo.py
        0  2013-04-03 17:34   a/
        0  2013-04-03 17:34   a/b/
        0  2013-04-03 17:34   a/b/c/
---------                     -------
        0                     4 files
$ ls
foo.zip
$ PYTHONPATH=foo.zip ~/dev/cpython/python
Python 3.4.0a0 (default:3b1dbe7a2aa0+, Apr  3 2013, 17:31:54) 
[GCC 4.8.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import a
>>> import a.b
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
ImportError: No module named 'a.b'
>>>
History
Date User Action Args
2013-04-03 16:47:11pconnellsetrecipients: + pconnell, pje, ronaldoussoren, ncoghlan, jerub, eric.smith, Arfrever, eric.snow, serhiy.storchaka, jpaugh, isoschiz
2013-04-03 16:47:11pconnellsetmessageid: <1365007631.88.0.995872123012.issue14905@psf.upfronthosting.co.za>
2013-04-03 16:47:11pconnelllinkissue14905 messages
2013-04-03 16:47:11pconnellcreate