[Python-Dev] zipimport

Nick Coghlan ncoghlan at gmail.com
Thu Jun 4 11:30:11 CEST 2015

On 4 June 2015 at 12:10, Rose Ames <rose at happyspork.com> wrote:
> Sounds like I can just add a zipimporter to Lib/importlib/_bootstrap.py and
> remove zipimport.c entirely, is that right?

We moved things around a bit for 3.5, so this would be in
Lib/importlib/_bootstrap_external.py now.

My vague recollection is that the key complication we came up with was
how to make the "standard library in a zipfile" scenario keep working
(together with the completely frozen application case, where the app
and its modules are bundled together with the interpreter in one
binary). In that case, the zip format is just being used as an
archive, rather than for compression, so the current zlib dependency
shouldn't enter into it.

However, it likely makes sense to look at what would be involved in
making zipimport PEP 451 compatible *without* accounting for that
constraint, and then see what would need to be refactored/frozen/moved
to C to handle it after the simpler case is working.


Nick Coghlan   |   ncoghlan at gmail.com   |   Brisbane, Australia

More information about the Python-Dev mailing list