diff options
author | Gregory P. Smith <greg@krypto.org> | 2015-04-14 17:02:49 (GMT) |
---|---|---|
committer | Gregory P. Smith <greg@krypto.org> | 2015-04-14 17:02:49 (GMT) |
commit | 6eda1be83c692f58ec1997bf3e81b60d9181ded8 (patch) | |
tree | cf433da5e662ad62bb9772a671d4ba34c91c9657 | |
parent | 9d04e6ab01365ce4b3c0c044404ad60f4e21a2ae (diff) | |
parent | f2a448a66b94b25abd6c41cdc4c959fcda61eca3 (diff) | |
download | cpython-6eda1be83c692f58ec1997bf3e81b60d9181ded8.zip cpython-6eda1be83c692f58ec1997bf3e81b60d9181ded8.tar.gz cpython-6eda1be83c692f58ec1997bf3e81b60d9181ded8.tar.bz2 |
issue22046: mention that zipfile can raise NotImplementedError on unsupported
compression algorithms.
-rw-r--r-- | Doc/library/zipfile.rst | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/Doc/library/zipfile.rst b/Doc/library/zipfile.rst index 4e1a87f..60f03e5 100644 --- a/Doc/library/zipfile.rst +++ b/Doc/library/zipfile.rst @@ -300,7 +300,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() |