]> granicus.if.org Git - python/commitdiff
issue22046: mention that zipfile can raise NotImplementedError on unsupported
authorGregory P. Smith <greg@krypto.org>
Tue, 14 Apr 2015 17:02:20 +0000 (10:02 -0700)
committerGregory P. Smith <greg@krypto.org>
Tue, 14 Apr 2015 17:02:20 +0000 (10:02 -0700)
compression algorithms.

Doc/library/zipfile.rst

index f3e54ca922b33dd917f8ba36fb67a89eccf594c4..ecb370b671bfaa8fee3bbc1f3d33400bba52f4e3 100644 (file)
@@ -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()