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 berker.peksag
Recipients berker.peksag, jdherg, martin.panter, serhiy.storchaka, vstinner
Date 2015-03-30.22:55:46
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1427756146.46.0.143290585693.issue23796@psf.upfronthosting.co.za>
In-reply-to
Content
Thanks for the patch, John.

> I'm under the impression that the final patch will need to include a test that confirms the patch worked,

Correct. You could convert the reproducers in msg239445 to a test case.

The patch looks good to me. I think you'll also need to add a similar check to buffered_read1():

>>> from io import *
>>> b = BufferedReader(BytesIO(b"12"))
>>> b.read(1)
b'1'
>>> b.close()
>>> b.peek()
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
ValueError: peek of closed file
>>> b.read1(1)
Segmentation fault (core dumped)
History
Date User Action Args
2015-03-30 22:55:46berker.peksagsetrecipients: + berker.peksag, vstinner, martin.panter, serhiy.storchaka, jdherg
2015-03-30 22:55:46berker.peksagsetmessageid: <1427756146.46.0.143290585693.issue23796@psf.upfronthosting.co.za>
2015-03-30 22:55:46berker.peksaglinkissue23796 messages
2015-03-30 22:55:46berker.peksagcreate