Andreas Schawo andreas.sch...@gmail.com added the comment:
As I understand actually the zipfile module possibly creates damaged zip
files after version 2.4 because of '\x00\x00\x00\x00' instead of
'\xff\xff\xff\xff' as header offset. But without any error.
I think the _struct.c should be
Mark Dickinson dicki...@gmail.com added the comment:
I don't know the zipfile module very well (i.e., at all),
but as far as I can tell from looking at the source,
there's no use of struct.pack('L', -1) in 2.6 onwards:
it's only potentially a problem in 2.5 (and that isn't
going to change, now
Mark Dickinson dicki...@gmail.com added the comment:
Was zipfile ever fixed to avoid this deprecated behaviour? If not, is the
fix fairly trivial?
It would be nice to be able to finally turn these struct deprecation
warnings into errors in Python 3.1 and/or Python 2.7.
--
nosy:
Georg Brandl ge...@python.org added the comment:
Committed to trunk in r68120.
--
nosy: +georg.brandl
status: open - closed
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue4228
___
Changes by Martin v. Löwis mar...@v.loewis.de:
--
versions: -Python 2.5, Python 2.5.3
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue4228
___
___
Changes by Martin v. Löwis mar...@v.loewis.de:
--
priority: deferred blocker - release blocker
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue4228
___
Martin v. Löwis mar...@v.loewis.de added the comment:
Thanks for the patch. Committed (along with a test case) as r67733, in
the 2.5 branch.
Porting to the other branches still needs to happen. Armin, if you want
to make these changes, please go ahead.
--
priority: release blocker -
Changes by Martin v. Löwis mar...@v.loewis.de:
--
priority: normal - deferred blocker
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue4228
___
___
Armin Rigo [EMAIL PROTECTED] added the comment:
FWIW, struct.pack(I, whatever) produces \x00\x00\x00\x00 too.
___
Python tracker [EMAIL PROTECTED]
http://bugs.python.org/issue4228
___
Armin Rigo [EMAIL PROTECTED] added the comment:
Attached struct-2.5-fix.diff. The tests still pass (both 32- and 64-bits).
--
keywords: +patch
Added file: http://bugs.python.org/file12326/struct-2.5-fix.diff
___
Python tracker [EMAIL PROTECTED]
Changes by Martin v. Löwis mar...@v.loewis.de:
--
priority: - release blocker
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue4228
___
___
Martin v. Löwis [EMAIL PROTECTED] added the comment:
Can you provide a fix within the next two days? Otherwise, I see little
chance that this gets fixed in 2.5.
--
nosy: +loewis
___
Python tracker [EMAIL PROTECTED]
http://bugs.python.org/issue4228
New submission from Armin Rigo [EMAIL PROTECTED]:
struct.pack('L', -1) raises a DeprecationWarning since Python 2.5, as it
should. However, it also returns a different (and nonsensical) result
than Python = 2.4 used to: it returns '\x00\x00\x00\x00' instead of
'\xff\xff\xff\xff'.
This might
Armin Rigo [EMAIL PROTECTED] added the comment:
Ah, I should also mention that a fix of zipfile for 2.5 to no longer use
the deprecated feature (and thus no longer cause DeprecationWarnings)
also sounds like a good idea, in addition to the fix to the struct module.
14 matches
Mail list logo