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 benjamin.peterson, martin.panter, pitrou, serhiy.storchaka, stutzbach
Date 2016-03-13.12:01:15
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1457870475.72.0.380033906207.issue23214@psf.upfronthosting.co.za>
In-reply-to
Content
Calling BufferedReader.read1(sys.maxsize) gives me a MemoryError. Making read1(-1) equivalent to read1(sys.maxsize) only makes sense where the return value already has a predetermined size, and only a limited buffer needs to be allocated.

Another interpretation is to return an arbitrary, modest buffer size. This is what I ended up doing with LZMAFile.read1() in Issue 23529: return no more than 8 KiB. It is not equivalent to sys.maxsize because more than 8 KiB is possible if you ask for it. HTTPResponse (for non-chunked responses) is similar, but uses a default of 16 KiB.
History
Date User Action Args
2016-03-13 12:01:15martin.pantersetrecipients: + martin.panter, pitrou, benjamin.peterson, stutzbach, serhiy.storchaka
2016-03-13 12:01:15martin.pantersetmessageid: <1457870475.72.0.380033906207.issue23214@psf.upfronthosting.co.za>
2016-03-13 12:01:15martin.panterlinkissue23214 messages
2016-03-13 12:01:15martin.pantercreate