[issue21866] zipfile.ZipFile.close() doesn't respect allowZip64

2014-09-23 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 8a010ca89094 by Serhiy Storchaka in branch '2.7':
Issue #21866: ZipFile.close() no longer writes ZIP64 central directory
https://hg.python.org/cpython/rev/8a010ca89094

New changeset 8f25d118ce38 by Serhiy Storchaka in branch '3.4':
Issue #21866: ZipFile.close() no longer writes ZIP64 central directory
https://hg.python.org/cpython/rev/8f25d118ce38

New changeset d361d2176121 by Serhiy Storchaka in branch 'default':
Issue #21866: ZipFile.close() no longer writes ZIP64 central directory
https://hg.python.org/cpython/rev/d361d2176121

--
nosy: +python-dev

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue21866
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue21866] zipfile.ZipFile.close() doesn't respect allowZip64

2014-09-23 Thread Serhiy Storchaka

Changes by Serhiy Storchaka storch...@gmail.com:


--
resolution:  - fixed
stage: patch review - resolved
status: open - closed

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue21866
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue21866] zipfile.ZipFile.close() doesn't respect allowZip64

2014-09-05 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

Thank you Benjamin for explanation.

Here is a patch which adds all three required checks in the close() method and 
adds a check for files count in write methods. Implementing other checks in 
write methods is too laborious.

As far as test_zipfile64 is disabled, for manual testing you need temporary 
comment out the support.requires() statement and run only selected tests:

./python -m test.regrtest -v -m OtherTests test_zipfile64

--
keywords: +patch
stage: needs patch - patch review
Added file: http://bugs.python.org/file36548/zipfile64_additional_checks.patch

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue21866
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue21866] zipfile.ZipFile.close() doesn't respect allowZip64

2014-07-07 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

An offset is checked in write() and writestr() methods and an exception is 
raised if an offset is = 2 GiB and ZIP64 extension is not allowed. I don't see 
a possibility for a bug.

--
status: open - pending

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue21866
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue21866] zipfile.ZipFile.close() doesn't respect allowZip64

2014-07-07 Thread Benjamin Gilbert

Benjamin Gilbert added the comment:

Here are the cases where close() will generate a ZIP64 archive and an exception 
will never be raised:

1. There are more than 65535 files in the archive.

2. The start of the central directory is at  2 GB.

3. The central directory size is  2 GB.

#1 could be checked from write/writestr.  #2 could possibly be checked from 
write/writestr by looking at the file offset after writing the compressed data. 
 #3 cannot be checked until close, but I'm not sure if it can ever occur 
without triggering one of the other checks first.

--
status: pending - open

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue21866
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue21866] zipfile.ZipFile.close() doesn't respect allowZip64

2014-06-25 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

Do you want to provide a patch?

--
assignee:  - serhiy.storchaka
nosy: +serhiy.storchaka
stage:  - needs patch
versions:  -Python 3.1, Python 3.2, Python 3.3

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue21866
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue21866] zipfile.ZipFile.close() doesn't respect allowZip64

2014-06-24 Thread Benjamin Gilbert

New submission from Benjamin Gilbert:

The ZipFile documentation says:

 If allowZip64 is True (the default) zipfile will create ZIP files that
 use the ZIP64 extensions when the zipfile is larger than 2 GiB. If it
 is false zipfile will raise an exception when the ZIP file would
 require ZIP64 extensions.

ZipFile.close() will write ZIP64 central directory records if e.g. a member's 
local file header starts at an offset  2 GB, or if there are more than 65535 
files in the archive.  It will do this even if allowZip64 is False, whereas the 
documentation implies that it should raise an exception in that case.

--
components: Library (Lib)
messages: 221525
nosy: bgilbert
priority: normal
severity: normal
status: open
title: zipfile.ZipFile.close() doesn't respect allowZip64
type: behavior
versions: Python 2.7, Python 3.1, Python 3.2, Python 3.3, Python 3.4, Python 3.5

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue21866
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com