[Patches] [ python-Patches-1698917 ] ZipFile.printdir fix (2.6)
SourceForge.net
noreply at sourceforge.net
Thu Apr 19 17:59:30 CEST 2007
Patches item #1698917, was opened at 2007-04-11 22:27
Message generated for change (Comment added) made by alanmcintyre
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=305470&aid=1698917&group_id=5470
Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: Library (Lib)
Group: Python 2.6
Status: Open
Resolution: None
Priority: 5
Private: No
Submitted By: Alan McIntyre (alanmcintyre)
Assigned to: Nobody/Anonymous (nobody)
Summary: ZipFile.printdir fix (2.6)
Initial Comment:
This patch for 2.5 is in reference to bug [ 1698398 ] - "wrong % of params
for format string in ZipFile.printdir()." It makes the following changes:
- Modify ZipFile.printdir() to treat the ZipInfo.date_time object in a way
that is similar to other code in zipfile.py.
- Modified ZipFile.writestr() to pass a 6-item tuple to the ZipInfo
constructor (consistent with other treatment of ZipInfo construction in the
zipfile module) instead of the full result from time.localtime().
Passes full regrtest.py -r
----------------------------------------------------------------------
>Comment By: Alan McIntyre (alanmcintyre)
Date: 2007-04-19 10:59
Message:
Logged In: YES
user_id=1115903
Originator: YES
I see that there's already a test that checks printdir (it just doesn't
check the modified time). I'll work up a modified version of that to check
the situation that caused the original bug.
----------------------------------------------------------------------
Comment By: Alan McIntyre (alanmcintyre)
Date: 2007-04-19 09:52
Message:
Logged In: YES
user_id=1115903
Originator: YES
I would be glad to; is there a preferred way to test the output of a print
statement? If I have time today I can go dig around in the stdlib to look
for examples of it, but any pointers would be welcome.
----------------------------------------------------------------------
Comment By: Neal Norwitz (nnorwitz)
Date: 2007-04-19 01:22
Message:
Logged In: YES
user_id=33168
Originator: NO
Alan, thanks for the patch. Would you create a test case for this?
----------------------------------------------------------------------
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=305470&aid=1698917&group_id=5470
More information about the Patches
mailing list