Christian Heimes <li...@cheimes.de> added the comment:

A patch would not land in Python 3.9 since this would be a new feature and 
out-of-scope for a released version.

Do you really want to store gigabytes of downloads in RAM instead of doing 
chunked reads and store them on disk? If you cannot or don't want to write to 
disk, then there are easier and better ways to deal with large buffers. You 
could either mmap() or you could use a memoryview of a bytearray buffer:

   buf = bytearray(4 * 1024**3)
   view = memoryview(buf)
   pos = 0
   while True:
       read = conn.recv_into(view[pos:pos+1048576])
       if not read:
           break
       pos += read

----------

_______________________________________
Python tracker <rep...@bugs.python.org>
<https://bugs.python.org/issue42853>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to