[Python-checkins] cpython (3.4): issue22046: mention that zipfile can raise NotImplementedError on unsupported
gregory.p.smith
python-checkins at python.org
Tue Apr 14 19:05:16 CEST 2015
https://hg.python.org/cpython/rev/3e8047ee9bbb
changeset: 95646:3e8047ee9bbb
branch: 3.4
parent: 95641:1e139b3c489e
user: Gregory P. Smith <greg at krypto.org>
date: Tue Apr 14 10:02:20 2015 -0700
summary:
issue22046: mention that zipfile can raise NotImplementedError on unsupported
compression algorithms.
files:
Doc/library/zipfile.rst | 6 +++++-
1 files changed, 5 insertions(+), 1 deletions(-)
diff --git a/Doc/library/zipfile.rst b/Doc/library/zipfile.rst
--- a/Doc/library/zipfile.rst
+++ b/Doc/library/zipfile.rst
@@ -298,7 +298,11 @@
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()
--
Repository URL: https://hg.python.org/cpython
More information about the Python-checkins
mailing list