summaryrefslogtreecommitdiffstats
path: root/Doc
diff options
context:
space:
mode:
authorGregory P. Smith <greg@krypto.org>2015-04-14 17:02:20 (GMT)
committerGregory P. Smith <greg@krypto.org>2015-04-14 17:02:20 (GMT)
commitf2a448a66b94b25abd6c41cdc4c959fcda61eca3 (patch)
tree94d6158045bc06a034827bcd372828431efcb00f /Doc
parent34c9be7ebdc135e38914d161b028f5b56bf00642 (diff)
downloadcpython-f2a448a66b94b25abd6c41cdc4c959fcda61eca3.zip
cpython-f2a448a66b94b25abd6c41cdc4c959fcda61eca3.tar.gz
cpython-f2a448a66b94b25abd6c41cdc4c959fcda61eca3.tar.bz2
issue22046: mention that zipfile can raise NotImplementedError on unsupported
compression algorithms.
Diffstat (limited to 'Doc')
-rw-r--r--Doc/library/zipfile.rst6
1 files changed, 5 insertions, 1 deletions
diff --git a/Doc/library/zipfile.rst b/Doc/library/zipfile.rst
index f3e54ca..ecb370b 100644
--- a/Doc/library/zipfile.rst
+++ b/Doc/library/zipfile.rst
@@ -298,7 +298,11 @@ ZipFile Objects
file in the archive, or a :class:`ZipInfo` object. The archive must be open for
read or append. *pwd* is the password used for encrypted files and, if specified,
it will override the default password set with :meth:`setpassword`. Calling
- :meth:`read` on a closed ZipFile will raise a :exc:`RuntimeError`.
+ :meth:`read` on a closed ZipFile will raise a :exc:`RuntimeError`. Calling
+ :meth:`read` on a ZipFile that uses a compression method other than
+ :const:`ZIP_STORED`, :const:`ZIP_DEFLATED`, :const:`ZIP_BZIP2` or
+ :const:`ZIP_LZMA` will raise a :exc:`NotImplementedError`. An error will also
+ be raised if the corresponding compression module is not available.
.. method:: ZipFile.testzip()