Opened 4 years ago

Closed 3 years ago

#4498 enhancement closed duplicate (duplicate)

Use zipfile.ZipFile.open instead of twisted.python.zipstream in twisted.python.zippath

Reported by: exarkun Owned by:
Priority: lowest Milestone:
Component: core Keywords: easy
Cc: Branch:
Author: Launchpad Bug:

Description

Python 2.6 introduces an open method on which provides file-like access to a file inside a zipfile. This provides the streaming access necessary to implement twisted.python.zippath.ZipPath.open.

On older versions of Python, we'll still have to use twisted.python.zipstream, of course.

Change History (6)

comment:1 Changed 4 years ago by glyph

  • Keywords easy added
  • Owner glyph deleted
  • Priority changed from normal to lowest

I don't think there's really much value in doing this; as far as I know, our implementations of this functionality are largely equivalent. It would be nice to get rid of zipstream eventually, of course, but it's going to be years before we can drop 2.5.

comment:2 Changed 4 years ago by exarkun

The main value in doing this now is probably to determine if the thing in the standard library actually works. If we report bugs against it now, they might actually be fixed in a released version of Python by the time we could drop our own implementation.

comment:3 Changed 4 years ago by exarkun

I've done this in lp:filepath now. It was actually a very simple change, just a couple lines, and the unit tests all still pass.

See http://bazaar.launchpad.net/~exarkun/filepath/trunk/revision/11#filepath/_zippath.py

(Note that this is without the fallback for older Pythons)

comment:4 Changed 4 years ago by <automation>

comment:5 Changed 3 years ago by aruse

This appears to be a duplicate of #4035, where I just submitted a patch.

comment:6 Changed 3 years ago by indigo

  • Resolution set to duplicate
  • Status changed from new to closed
Note: See TracTickets for help on using tickets.