Roundup Robot added the comment:
New changeset ce869b05762c by Serhiy Storchaka in branch '2.7':
Issue #9720: zipfile now writes correct local headers for files larger than 4
GiB.
http://hg.python.org/cpython/rev/ce869b05762c
New changeset b93848ca7760 by Serhiy Storchaka in branch '3.2':
Serhiy Storchaka added the comment:
Fixed. Thank you for report, Craig de Stigter.
--
resolution: - fixed
stage: patch review - committed/rejected
status: open - closed
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue9720
Nico Möller added the comment:
I most definitely need a patch for 2.7.3
Would be awesome if you could provide a patch for that version.
--
nosy: +Nico.Möller
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue9720
Serhiy Storchaka added the comment:
Here are second variant patches for 2.7 and 3.2.
--
Added file: http://bugs.python.org/file28558/zipfile_zip64_try_2-2.7.patch
Added file: http://bugs.python.org/file28559/zipfile_zip64_try_2-3.2.patch
___
Python
Serhiy Storchaka added the comment:
What variant of patches should I commit? Or prepare other?
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue9720
___
Changes by Serhiy Storchaka storch...@gmail.com:
--
assignee: - serhiy.storchaka
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue9720
___
___
Serhiy Storchaka added the comment:
Patches updated to resolve merge conflict with issue11981.
Please review and apply any of this patches. This is needed for some
other my zipfile patches.
--
Added file: http://bugs.python.org/file28145/zipfile_zip64_always_2.patch
Added file:
Changes by Jon Henry jhe...@ccs.neu.edu:
--
nosy: +jhenry82
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue9720
___
___
Python-bugs-list mailing
Serhiy Storchaka added the comment:
Please, review the patches.
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue9720
___
___
Python-bugs-list
Changes by Ruben Gonzalez ruben...@teltek.es:
--
nosy: +Ruben.Gonzalez
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue9720
___
___
Python-bugs-list
Serhiy Storchaka added the comment:
What the conclusion about the patches? Which variant I should backport for
older versions?
--
versions: +Python 3.4
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue9720
Ronald Oussoren added the comment:
I'd write the extended header when the current file size is larger than the
zip64 limit (that is, when 'st.st_size ZIP64_LIMIT' in the write method.
That way the minimal header size is used whenever possible.
As you noted this can cause problems when the
Serhiy Storchaka added the comment:
I see two rational solutions of the issue (all written below is applicable only
for allowZip64=True):
1) Always write Zip64 extended information extra field. This approach always
successful, but the zipfile size will increase by 20 bytes for each file.
The
Changes by Serhiy Storchaka storch...@gmail.com:
--
stage: needs patch - patch review
Added file: http://bugs.python.org/file27263/zipfile_zip64_try.patch
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue9720
Serhiy Storchaka added the comment:
No, on the contrary, it is not such easy to fix, and the patch is incorrect.
Sorry that it is not clear either. The size of the header with extra args
depends on the size of the file. The file size can be changed in the process of
compressing, and
Changes by Kristof Keppens kkepp...@gmail.com:
--
nosy: +Kristof.Keppens
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue9720
___
___
Christian Heimes added the comment:
Serhiy:
If I understand you correctly it should be easy to fix. The code in close() has
to check if any file is beyond the ZIP64 limit and then write all headers with
extra args. Is that correct?
--
keywords: +needs review
nosy: +christian.heimes
Changes by David Andrzejewski site+python@davidandrzejewski.com:
--
nosy: +dandrzejewski
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue9720
___
Changes by Serhiy Storchaka storch...@gmail.com:
--
nosy: +storchaka
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue9720
___
___
Python-bugs-list
Serhiy Storchaka storch...@gmail.com added the comment:
I am afraid that the problem is more complicated. With the option
allowZip64=True all files need to write with this extension, because size of
local file header may change and there will be after compression just go back
and rewrite it.
Nadeem Vawda nadeem.va...@gmail.com added the comment:
Issue 6434 was marked as a duplicate of this issue.
--
nosy: +Paul, amaury.forgeotdarc, enlavin, lambacck, nadeem.vawda, segfault42
stage: - needs patch
versions: +Python 3.3 -Python 3.1
___
in context:
http://old.nabble.com/-issue9720--zipfile-writes-incorrect-local-file-header-for-large-files-in-zip64-tp29578646p31928738.html
Sent from the Python - python-bugs-list mailing list archive at Nabble.com.
___
Python-bugs-list mailing list
Alan McIntyre alan.mcint...@gmail.com added the comment:
Here's an updated patch for the py3k trunk with tests. This pretty much
doubles the runtime of test_zipfile64.py. The patch also removes some
unnecessary code from the existing test_zipfile64 tests.
Note: It looks like writestr will
Alan McIntyre alan.mcint...@gmail.com added the comment:
Thanks for the patch, Craig; I should have some time later today or tomorrow to
do a review. Did you have a patch for the test suite(s) as well? If not, I
can just make sure your test case is covered in test_zipfile64.
--
Craig de Stigter craig...@gmail.com added the comment:
Hi, sorry no I haven't had time to add a real test for this
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue9720
___
Éric Araujo mer...@netwok.org added the comment:
A tip about versions: Development happens on the current active branch, py3k
(future 3.2 version), and bug or doc fixes are backported to the stable
versions 2.7 and 3.1. Security fixes go into 2.6 too.
Can you reproduce your bug in 2.7, 3.1
Craig de Stigter craig...@gmail.com added the comment:
Yes, the bug still exists in Python 3.1.2. However, struct.pack() no longer
silently ignores overflow, so I get this error instead:
z.write('foo.txt')
Traceback (most recent call last):
File stdin, line 1, in module
File
New submission from Craig de Stigter craig...@gmail.com:
Steps to reproduce:
# create a large (4gb) file
f = open('foo.txt', 'wb')
text = 'a' * 1024**2
for i in xrange(5 * 1024):
f.write(text)
f.close()
# now zip the file
import zipfile
z = zipfile.ZipFile('foo.zip', mode='w',
28 matches
Mail list logo