Author nadeem.vawda
Recipients alex, dabeaz, eric.araujo, gruszczy, nadeem.vawda, pitrou, r.david.murray, vstinner
Date 2011-04-04.17:01:24
SpamBayes Score 4.64097e-11
Marked as misclassified No
Message-id <1301936485.6.0.268378912084.issue10791@psf.upfronthosting.co.za>
In-reply-to
Content
> Something looks fishy: what happens if size is -1 and EOFError is not raised?

You're right - I missed that possibility. In that case, extrasize and offset get
updated incorrectly, which will break subsequent calls to seek() and tell().
However, it seems that subsequent reads work fine, because slicing a bytes object
with a too-large upper bound doesn't raise an exception.

The attached patch fixes this bug, and updates test_read1() to catch regressions.
History
Date User Action Args
2011-04-04 17:01:25nadeem.vawdasetrecipients: + nadeem.vawda, pitrou, vstinner, eric.araujo, alex, r.david.murray, gruszczy, dabeaz
2011-04-04 17:01:25nadeem.vawdasetmessageid: <1301936485.6.0.268378912084.issue10791@psf.upfronthosting.co.za>
2011-04-04 17:01:25nadeem.vawdalinkissue10791 messages
2011-04-04 17:01:24nadeem.vawdacreate