homepage

This issue tracker has been migrated to GitHub , and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

classification
Title: duplicate lines in zipfile.py
Type: behavior Stage:
Components: Library (Lib) Versions: Python 2.6
process
Status: closed Resolution: accepted
Dependencies: Superseder:
Assigned To: amaury.forgeotdarc Nosy List: alanmcintyre, amaury.forgeotdarc, loewis
Priority: normal Keywords: patch

Created on 2008年07月07日 20:57 by amaury.forgeotdarc, last changed 2022年04月11日 14:56 by admin. This issue is now closed.

Files
File name Uploaded Description Edit
zipfile-removedups.patch amaury.forgeotdarc, 2008年07月08日 07:17
Messages (9)
msg69398 - (view) Author: Amaury Forgeot d'Arc (amaury.forgeotdarc) * (Python committer) Date: 2008年07月07日 20:57
Since r64688, zipfile.py contains duplicated definitions. The attached
patch removes them.
Also, Twisted uses a zipfile item that have been renamed by this change:
zipfile.stringFileHeader (now magicFileHeader).
This makes some tests fail on the community buildbots. See the rightmost
column on
http://www.python.org/dev/buildbot/community/trunk/
I suggest to rename all magicXXX variables back to stringXXX.
msg69400 - (view) Author: Martin v. Löwis (loewis) * (Python committer) Date: 2008年07月07日 21:13
Alan, what do you think?
msg69409 - (view) Author: Alan McIntyre (alanmcintyre) * (Python committer) Date: 2008年07月08日 02:37
I don't see a patch attached, but the duplicated code does need
removing. If you can attach a patch I'll try it out.
As much as I dislike the "string" names (magicXXX seemed much more
descriptive), I suppose they're publicly available and shouldn't be
renamed without a good reason. (Unless not being in __all__ counts as
being something one shouldn't depend on as part of the API ;)
msg69415 - (view) Author: Amaury Forgeot d'Arc (amaury.forgeotdarc) * (Python committer) Date: 2008年07月08日 07:17
Sorry, here is the patch
msg69416 - (view) Author: Amaury Forgeot d'Arc (amaury.forgeotdarc) * (Python committer) Date: 2008年07月08日 07:23
Since the use of "from X import *" is discouraged (and serious projects
try to avoid it), the __all__ list is less and less meaningful.
msg69419 - (view) Author: Alan McIntyre (alanmcintyre) * (Python committer) Date: 2008年07月08日 08:46
The patch seems to work just fine for me, all tests pass (including
test_zipfile64) on an Intel Mac. I'd vote to go ahead and revert the
magicXXX variables back to their original names--I'm sure Twisted isn't
the only project out there that made use of them.
If the magicXXX name change gets checked in along with the current patch
I'll run the zip64 tests on Mac and Linux afterward, since they don't
get run in the standard test run on the buildbots. I don't currently
have a Windows machine to test with.
msg69538 - (view) Author: Martin v. Löwis (loewis) * (Python committer) Date: 2008年07月11日 07:26
Amaury, as Alan is fine with these changes, feel free to apply them.
msg69563 - (view) Author: Amaury Forgeot d'Arc (amaury.forgeotdarc) * (Python committer) Date: 2008年07月11日 21:28
Committed as 64880.
msg69600 - (view) Author: Alan McIntyre (alanmcintyre) * (Python committer) Date: 2008年07月12日 21:03
Thanks for fixing this, Amaury. I ran the test_zipfile64 and
test_zipfile tests on Linux and OS X, and they pass.
History
Date User Action Args
2022年04月11日 14:56:36adminsetgithub: 47567
2008年07月12日 21:03:54alanmcintyresetmessages: + msg69600
2008年07月11日 21:28:38amaury.forgeotdarcsetstatus: open -> closed
messages: + msg69563
2008年07月11日 07:26:01loewissetassignee: loewis -> amaury.forgeotdarc
resolution: accepted
messages: + msg69538
2008年07月08日 08:46:36alanmcintyresetmessages: + msg69419
2008年07月08日 07:23:38amaury.forgeotdarcsetmessages: + msg69416
2008年07月08日 07:18:00amaury.forgeotdarcsetfiles: + zipfile-removedups.patch
keywords: + patch
messages: + msg69415
2008年07月08日 02:37:48alanmcintyresetmessages: + msg69409
2008年07月07日 21:13:44loewissetnosy: + alanmcintyre
messages: + msg69400
2008年07月07日 20:57:49amaury.forgeotdarccreate

AltStyle によって変換されたページ (->オリジナル) /