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 bmerry, martin.panter
Date 2019-02-25.05:15:49
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1551071749.92.0.397165530704.issue36050@roundup.psfhosted.org>
In-reply-to
Content
The 1 MiB limit was added for Issue 1296004; apparently some platforms were overallocating multiple buffers and running out of memory. I suspect the loop in "_safe_read" was inherited from Python 2, which has different kinds of file objects. The comments suggest it does partial reads.

But the Python 3 code calls "socket.makefile" with "buffering" mode enabled by default. I agree it should be safe to read the total length in one go.
History
Date User Action Args
2019-02-25 05:15:49martin.pantersetrecipients: + martin.panter, bmerry
2019-02-25 05:15:49martin.pantersetmessageid: <1551071749.92.0.397165530704.issue36050@roundup.psfhosted.org>
2019-02-25 05:15:49martin.panterlinkissue36050 messages
2019-02-25 05:15:49martin.pantercreate
Morty Proxy This is a proxified and sanitized view of the page, visit original site.