summaryrefslogtreecommitdiff
path: root/Doc/library/zipfile.rst
diff options
context:
space:
mode:
authorGregory P. Smith <greg@krypto.org>2015-04-14 10:02:20 -0700
committerGregory P. Smith <greg@krypto.org>2015-04-14 10:02:20 -0700
commitda90c3ae77ae4636cc65afb8a6d41a016bc0ca02 (patch)
tree7cb7a15661183b57b2df0760083fa2384a20bba6 /Doc/library/zipfile.rst
parent459773e1c9549724013b7e3f273059ced1c658f1 (diff)
downloadcpython-da90c3ae77ae4636cc65afb8a6d41a016bc0ca02.tar.gz
issue22046: mention that zipfile can raise NotImplementedError on unsupported
compression algorithms.
Diffstat (limited to 'Doc/library/zipfile.rst')
-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 f3e54ca922..ecb370b671 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()