Phil Connell <pconn...@gmail.com> added the comment:

One version of the bug described here (and fixed in the old implementation 
under issue17633) exists in the Python implementation of zipimport:

$ unzip -l namespace1.zip
Archive:  namespace1.zip
  Length      Date    Time    Name
---------  ---------- -----   ----
        0  08-13-2020 06:30   one/
        0  08-13-2020 06:30   one/two/
        0  08-13-2020 06:30   one/two/three.py
---------                     -------
        0                     3 files
$ unzip -l namespace2.zip
Archive:  namespace2.zip
  Length      Date    Time    Name
---------  ---------- -----   ----
        0  08-13-2020 06:37   alpha/beta/gamma.py
---------                     -------
        0                     1 file
$ PYTHONPATH=namespace1.zip:namespace2.zip ./python
Python 3.10.0a0 (heads/master:c51db0ea40, Aug 13 2020, 06:41:20)
[GCC 4.8.5 20150623 (Red Hat 4.8.5-39)] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import one
>>> import alpha
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
ModuleNotFoundError: No module named 'alpha'
>>>

In short, imports where there's no separate entry for directories in the zip 
file don't work.

Any opinions on whether this *is* the problem this issue is trying to track?

----------

_______________________________________
Python tracker <rep...@bugs.python.org>
<https://bugs.python.org/issue14905>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to