[issue22046] ZipFile.read() should mention that it might throw NotImplementedError

2015-04-14 Thread Gregory P. Smith
Changes by Gregory P. Smith : -- resolution: -> fixed status: open -> closed ___ Python tracker ___ ___ Python-bugs-list mailing list

[issue22046] ZipFile.read() should mention that it might throw NotImplementedError

2015-04-14 Thread Gregory P. Smith
Gregory P. Smith added the comment: fyi - i didn't update the 2.7 docs. just 3.4 and 3.5. if some committer wants to, feel free. -- nosy: +gregory.p.smith ___ Python tracker ___

[issue22046] ZipFile.read() should mention that it might throw NotImplementedError

2015-04-14 Thread Roundup Robot
Roundup Robot added the comment: New changeset 3e8047ee9bbb by Gregory P. Smith in branch '3.4': issue22046: mention that zipfile can raise NotImplementedError on unsupported https://hg.python.org/cpython/rev/3e8047ee9bbb New changeset 4b9deb7e6f2b by Gregory P. Smith in branch 'default': issue2

[issue22046] ZipFile.read() should mention that it might throw NotImplementedError

2014-08-06 Thread Jason Heeris
Jason Heeris added the comment: > Python documentation never document all possible exceptions raised by a > method. No, but clearly *some* exceptions are documented, and presumably there's some reasoning behind which are and aren't. In this case, the NotImplemented error is there by design. I

[issue22046] ZipFile.read() should mention that it might throw NotImplementedError

2014-08-05 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: ZipFile's constructor and ZipFile.open() can raise NotImplementedError, RuntimeError, EOFError, IOError, OSError or its subclasses, or any exception raised from underlying file object, including TypeError and AttributeError. ZipExtFile.read() can raise zlib.

[issue22046] ZipFile.read() should mention that it might throw NotImplementedError

2014-08-05 Thread Jason Heeris
Jason Heeris added the comment: Sorry, that was run with Python 2.7.5+ on Ubuntu. -- ___ Python tracker ___ ___ Python-bugs-list maili

[issue22046] ZipFile.read() should mention that it might throw NotImplementedError

2014-08-05 Thread Jason Heeris
Jason Heeris added the comment: Okay, I've attached two files: 1. Scheme.zip, from issue 5701 2. "zftest.py", a script that you run in the same dir as "Scheme.zip" to produce this: $ python zftest.py Extracting: 1!SCHEME.Z64 Traceback (most recent call last): File "zftest.py", line 8, in

[issue22046] ZipFile.read() should mention that it might throw NotImplementedError

2014-08-05 Thread Jason Heeris
Changes by Jason Heeris : Added file: http://bugs.python.org/file36280/zftest.py ___ Python tracker ___ ___ Python-bugs-list mailing list Unsu

[issue22046] ZipFile.read() should mention that it might throw NotImplementedError

2014-08-05 Thread Jason Heeris
Changes by Jason Heeris : Added file: http://bugs.python.org/file36279/Scheme.zip ___ Python tracker ___ ___ Python-bugs-list mailing list Uns

[issue22046] ZipFile.read() should mention that it might throw NotImplementedError

2014-08-05 Thread Ezio Melotti
Ezio Melotti added the comment: FWIW #5701 has a test zipfile (I haven't tried it though). If I'm reading the code right, the compression method is specified and checked in the __init__, so we should know if the compression method was available long before we reach .read(). I will be happy to

[issue22046] ZipFile.read() should mention that it might throw NotImplementedError

2014-08-05 Thread Jason Heeris
Jason Heeris added the comment: @Ezio I am pretty sure it was read(). I couldn't submit the file I used as an example, so I'll see if I can construct a minimal example to post here. -- ___ Python tracker

[issue22046] ZipFile.read() should mention that it might throw NotImplementedError

2014-08-05 Thread Ezio Melotti
Ezio Melotti added the comment: After further investigation it seems to me that read can't raise NotImplementedError. ZipFile also won't raise it, but will raise a RuntimeError: >>> zipfile.ZipFile('spam.zip', 'w', compression=zipfile.ZIP_BZIP2) RuntimeError: Compression requires the (missing)

[issue22046] ZipFile.read() should mention that it might throw NotImplementedError

2014-08-05 Thread Tuikku Anttila
Tuikku Anttila added the comment: Added mention that an error might also be raised if the method is not available. -- Added file: http://bugs.python.org/file36270/22046_1.patch ___ Python tracker __

[issue22046] ZipFile.read() should mention that it might throw NotImplementedError

2014-08-02 Thread Tuikku Anttila
Tuikku Anttila added the comment: Added to the documentation of zipfile.ZipFile.read() that the method will throw a NotImplementedError when the compression scheme of the ZipFile is something else than ZIP_STORED, ZIP_DEFLATED, ZIP_BZIP2 or ZIP_LZMA. -- keywords: +patch nosy: +Tuikku.A

[issue22046] ZipFile.read() should mention that it might throw NotImplementedError

2014-07-31 Thread Serhiy Storchaka
Changes by Serhiy Storchaka : -- stage: -> needs patch versions: +Python 3.4, Python 3.5 -Python 3.3 ___ Python tracker ___ ___ Pytho

[issue22046] ZipFile.read() should mention that it might throw NotImplementedError

2014-07-23 Thread Jason Heeris
New submission from Jason Heeris: As per issue 5701, the zipfile.ZipFile.read() method will throw a NotImplementedError if the compression scheme is not supported. However, there is no mention of this possibility in the documentation for the read() method. I would suggest, say, "Calling read()