[Python-Dev] Fwd: zipimport

Eric V. Smith eric at trueblade.com
Wed Jun 3 00:11:13 CEST 2015

On 6/2/2015 5:20 PM, Brett Cannon wrote:
> On Tue, Jun 2, 2015 at 5:04 PM Rose Ames <rose at happyspork.com
> <mailto:rose at happyspork.com>> wrote:
>     At pycon I talked with a few people about bugs.python.org/issue19699
>     <http://bugs.python.org/issue19699>.
>     The consensus seemed to be that zipimport wants a lot of work, possibly
>     a rewrite.
>     I'll have some time to work on this over the next couple of months, but
>     I want to be working on the right thing.  Could the people who were
>     involved in that conversation remind me of their concerns with
>     zipimport?  What exactly would the goal of a rewrite be?
> I believe the participants consisted of Thomas Wouters, Greg Smith, Eric
> Snow, Nick Coghlan, and myself. In the end I think the general consensus
> for long-term maintenance was to write the minimal amount of code
> required that could read zip files and then write all of the
> import-related code on top of that. Basically the idea of freezing
> zipfile seemed messy since it has a ton of dependencies and baggage that
> simply isn't needed to replace zipimport.

Hey, I was there! This is what I recall as well.

> I vaguely remember people suggesting writing the minimal zip reading
> code in C but I can't remember why since we have I/O access in importlib
> through _io and thus it's really just the pulling apart of the zip file
> to get at the files to import and thus should be doable in pure Python.

I don't think writing it in Python ever came up. I can't think of a
reason why that wouldn't work. Rose: this seems like a good approach to try.


More information about the Python-Dev mailing list