summaryrefslogtreecommitdiffstats
path: root/Doc
diff options
context:
space:
mode:
authorSerhiy Storchaka <storchaka@gmail.com>2015-03-22 23:09:35 (GMT)
committerSerhiy Storchaka <storchaka@gmail.com>2015-03-22 23:09:35 (GMT)
commit77d899726f4f7c78757e4214c147e699b285a8a7 (patch)
tree5cd058cc833c7e0614c3f21ab99dc16c77d5557a /Doc
parentf07a4b663daafaf792ea39e118345fa1f10bbf8f (diff)
downloadcpython-77d899726f4f7c78757e4214c147e699b285a8a7.zip
cpython-77d899726f4f7c78757e4214c147e699b285a8a7.tar.gz
cpython-77d899726f4f7c78757e4214c147e699b285a8a7.tar.bz2
Issue #23252: Added support for writing ZIP files to unseekable streams.
Diffstat (limited to 'Doc')
-rw-r--r--Doc/library/zipfile.rst5
-rw-r--r--Doc/whatsnew/3.5.rst6
2 files changed, 10 insertions, 1 deletions
diff --git a/Doc/library/zipfile.rst b/Doc/library/zipfile.rst
index ef9a2ea..c1dda25 100644
--- a/Doc/library/zipfile.rst
+++ b/Doc/library/zipfile.rst
@@ -140,6 +140,7 @@ ZipFile Objects
ZIP file, then a new ZIP archive is appended to the file. This is meant for
adding a ZIP archive to another file (such as :file:`python.exe`). If
*mode* is ``a`` and the file does not exist at all, it is created.
+ If *mode* is ``r`` or ``a``, the file should be seekable.
*compression* is the ZIP compression method to use when writing the archive,
and should be :const:`ZIP_STORED`, :const:`ZIP_DEFLATED`,
:const:`ZIP_BZIP2` or :const:`ZIP_LZMA`; unrecognized
@@ -171,6 +172,9 @@ ZipFile Objects
.. versionchanged:: 3.4
ZIP64 extensions are enabled by default.
+ .. versionchanged:: 3.5
+ Added support for writing to unseekable streams.
+
.. method:: ZipFile.close()
@@ -328,7 +332,6 @@ ZipFile Objects
If ``arcname`` (or ``filename``, if ``arcname`` is not given) contains a null
byte, the name of the file in the archive will be truncated at the null byte.
-
.. method:: ZipFile.writestr(zinfo_or_arcname, bytes[, compress_type])
Write the string *bytes* to the archive; *zinfo_or_arcname* is either the file
diff --git a/Doc/whatsnew/3.5.rst b/Doc/whatsnew/3.5.rst
index b22c657..44915a3 100644
--- a/Doc/whatsnew/3.5.rst
+++ b/Doc/whatsnew/3.5.rst
@@ -448,6 +448,12 @@ faulthandler
:func:`~faulthandler.dump_traceback_later` functions now accept file
descriptors. (Contributed by Wei Wu in :issue:`23566`.)
+zipfile
+-------
+
+* Added support for writing ZIP files to unseekable streams.
+ (Contributed by Serhiy Storchaka in :issue:`23252`.)
+
Optimizations
=============