Patch #1622: Correct interpretation of various ZIP header fields.
Also fixes
- Issue #1526: Allow more than 64k files to be added to Zip64 file.
- Issue #1746: Correct handling of zipfile archive comments (previously
archives with comments over 4k were flagged as invalid). Allow writing
Zip files with archives by setting the 'comment' attribute of a ZipFile.
diff --git a/Doc/library/zipfile.rst b/Doc/library/zipfile.rst
index f87b856..7ba5ffe 100644
--- a/Doc/library/zipfile.rst
+++ b/Doc/library/zipfile.rst
@@ -285,7 +285,7 @@
member of the given :class:`ZipInfo` instance. By default, the
:class:`ZipInfo` constructor sets this member to :const:`ZIP_STORED`.
-The following data attribute is also available:
+The following data attributes are also available:
.. attribute:: ZipFile.debug
@@ -294,6 +294,12 @@
output) to ``3`` (the most output). Debugging information is written to
``sys.stdout``.
+.. attribute:: ZipFile.comment
+
+ The comment text associated with the ZIP file. If assigning a comment to a
+ :class:`ZipFile` instance created with mode 'a' or 'w', this should be a
+ string no longer than 65535 bytes. Comments longer than this will be
+ truncated in the written archive when :meth:`ZipFile.close` is called.
.. _pyzipfile-objects: