Message336498
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. |
|
| Date |
User |
Action |
Args |
| 2019-02-25 05:15:49 | martin.panter | set | recipients:
+ martin.panter, bmerry |
| 2019-02-25 05:15:49 | martin.panter | set | messageid: <1551071749.92.0.397165530704.issue36050@roundup.psfhosted.org> |
| 2019-02-25 05:15:49 | martin.panter | link | issue36050 messages |
| 2019-02-25 05:15:49 | martin.panter | create | |
|