[New-bugs-announce] [issue21866] zipfile.ZipFile.close() doesn't respect allowZip64

Benjamin Gilbert report at bugs.python.org
Wed Jun 25 07:56:09 CEST 2014


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 <report at bugs.python.org>
<http://bugs.python.org/issue21866>
_______________________________________


More information about the New-bugs-announce mailing list