From: Andrew Svetlov Date: Sat, 6 Oct 2012 15:10:01 +0000 (+0300) Subject: Issue #16025: Minor corrections to the zipfile documentation. X-Git-Tag: v3.3.1rc1~815^2~27 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=5061a342830b1a6165669eac950d67e38a0029a0;p=thirdparty%2FPython%2Fcpython.git Issue #16025: Minor corrections to the zipfile documentation. Patch by Serhiy Storchaka. --- 5061a342830b1a6165669eac950d67e38a0029a0 diff --cc Doc/library/zipfile.rst index 498a9cda9950,264cd476bcf1..9f6e0777e717 --- a/Doc/library/zipfile.rst +++ b/Doc/library/zipfile.rst @@@ -87,30 -87,7 +87,30 @@@ The module defines the following items .. data:: ZIP_DEFLATED The numeric constant for the usual ZIP compression method. This requires the - zlib module. - :mod:`zlib` module. No other compression methods are currently supported. ++ :mod:`zlib` module. + + +.. data:: ZIP_BZIP2 + + The numeric constant for the BZIP2 compression method. This requires the - bz2 module. ++ :mod:`bz2` module. + + .. versionadded:: 3.3 + +.. data:: ZIP_LZMA + + The numeric constant for the LZMA compression method. This requires the - lzma module. ++ :mod:`lzma` module. + + .. versionadded:: 3.3 + + .. note:: + + The ZIP file format specification has included support for bzip2 compression + since 2001, and for LZMA compression since 2006. However, some tools + (including older Python releases) do not support these compression + methods, and may either refuse to process the ZIP file altogether, + or fail to extract individual files. .. seealso:: @@@ -168,9 -143,6 +168,9 @@@ ZipFile Object .. versionadded:: 3.2 Added the ability to use :class:`ZipFile` as a context manager. + .. versionchanged:: 3.3 - Added support for :mod:`bzip2` and :mod:`lzma` compression. ++ Added support for :mod:`bzip2 ` and :mod:`lzma` compression. + .. method:: ZipFile.close()