This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author martin.panter
Recipients Ericg, martin.panter, nczeczulin, ned.deily
Date 2015-06-15.08:17:57
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1434356278.2.0.229127853524.issue24301@psf.upfronthosting.co.za>
In-reply-to
Content
Just noticed in my previous message I mentioned Issue 1508475 a few times when I meant to say Issue 1159051.

In Python 3.5, a workaround is not so easy because we would need to access the internal buffer of a BufferedReader. One potential workaround is to use read1():

>>> z.read1(1)
b'd'
>>> z.read1()
b'ata'
>>> z.read1()
OSError: Not a gzipped file (b'ga')

The only practical way to allow for an exception and read() returning all the data is to defer the exception until close() is called. Another option might be to store a list of defects, similar to “email.message.Message.defects”.
History
Date User Action Args
2015-06-15 08:17:58martin.pantersetrecipients: + martin.panter, ned.deily, Ericg, nczeczulin
2015-06-15 08:17:58martin.pantersetmessageid: <1434356278.2.0.229127853524.issue24301@psf.upfronthosting.co.za>
2015-06-15 08:17:58martin.panterlinkissue24301 messages
2015-06-15 08:17:57martin.pantercreate