Opened 16 years ago

Closed 16 years ago

#1866 defect closed fixed (fixed)

twisted.python.zipstream does not work with Python 2.5

Reported by: Jean-Paul Calderone Owned by:
Priority: normal Milestone:
Component: core Keywords:
Cc: Branch:
Author:

Description

The test logs this traceback:

===============================================================================
[ERROR]: twisted.test.test_zipstream.ZipstreamTest.test_unzipping

Traceback (most recent call last):
  File "/home/exarkun/Projects/Twisted/trunk/twisted/test/test_zipstream.py", line 44, in test_unzipping
    r=uziter.next()
  File "/home/exarkun/Projects/Twisted/trunk/twisted/python/zipstream.py", line 224, in unzipIterChunky
    fp=czf.readfile(entry)
  File "/home/exarkun/Projects/Twisted/trunk/twisted/python/zipstream.py", line 26, in readfile
    self.fp.seek(zinfo.file_offset, 0)
exceptions.AttributeError: 'ZipInfo' object has no attribute 'file_offset'
-------------------------------------------------------------------------------

Change History (4)

comment:1 Changed 16 years ago by jknight

Owner: changed from Jean-Paul Calderone to jknight
Status: newassigned

comment:2 Changed 16 years ago by foom

(In [17402]) Fix for python 2.5 by making same change that was made to ZipFile's read method.

Refs #1867 Refs #1866

comment:3 Changed 16 years ago by foom

Resolution: fixed
Status: assignedclosed

(In [17448]) Fix almost all python 2.5 issues.

Merging branches/python-two-point-five-1867.

Authors: mostly exarkun, some jknight Reviewer: jml Closes #1867

In detail:

Fix hashability of three classes in Python 2.5: id() now returns only positive numbers, but no longer always short ints, so returning id(self) as hash breaks. Closes #1842

Truncate mtime and atime floats to be integers in conch's unix sftp server implementation. (They changed to be floats by default in python). The interface is still underspecified. Refs #1860.

Fix Newpb failure handling for new-style exceptions. Use t.p.r.qual to determine exception type names. Closes #1861

Suppress deprecation warning for raising a string exception in test_failure.FailureTestCase.testStringExceptions. Closes #1862

Refactor testPBFailures into multiple test methods to make it easier to debug. Closes #1863

Pass absolute path to interpreter as argv[0] in stdio tests. Using an absolute path lets Python's import machinery figure out what's going on. Closes #1864

Add new-style class support to jelly (absolutely necessary because exceptions are now newstyle classes). Closes #1865

Add new-style exception support to Failure. Closes #1858. Closes #1859.

Fix twisted.python.zipstream to account for the removal of file_offset from the ZipInfo class. Closes #1866.

Use reflect.qual on warning class when logging warnings.

comment:4 Changed 11 years ago by <automation>

Owner: jknight deleted
Note: See TracTickets for help on using tickets.