At pycon I talked with a few people about 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? Thanks, Rose
On Tue, Jun 2, 2015 at 5:04 PM Rose Ames <rose@happyspork.com> wrote:
At pycon I talked with a few people about 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. 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.
On 6/2/2015 5:20 PM, Brett Cannon wrote:
On Tue, Jun 2, 2015 at 5:04 PM Rose Ames <rose@happyspork.com <mailto:rose@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. Eric.
Writing it in Python did come up and was decided against, but I don't recall the reasoning. Could it have been a performance thing? On 06/02/2015 06:11 PM, Eric V. Smith wrote:
On 6/2/2015 5:20 PM, Brett Cannon wrote:
On Tue, Jun 2, 2015 at 5:04 PM Rose Ames <rose@happyspork.com <mailto:rose@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.
Eric. _______________________________________________ Python-Dev mailing list Python-Dev@python.org https://mail.python.org/mailman/listinfo/python-dev Unsubscribe: https://mail.python.org/mailman/options/python-dev/rose%40happyspork.com
On Tue, 02 Jun 2015 21:20:10 +0000 Brett Cannon <brett@python.org> wrote:
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.
You would need other modules, such as struct and zlib, right? Regards Antoine.
On Wed, Jun 3, 2015 at 5:00 AM Antoine Pitrou <solipsis@pitrou.net> wrote:
On Tue, 02 Jun 2015 21:20:10 +0000 Brett Cannon <brett@python.org> wrote:
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.
You would need other modules, such as struct and zlib, right?
zlib yes, but that's already a C extension so that could get compiled in as a built-in module if necessary. As for struct, it might be nice but it doesn't provide any functionality that couldn't be reproduced manually.
participants (4)
-
Antoine Pitrou -
Brett Cannon -
Eric V. Smith -
Rose Ames