Kaydet (Commit) 1f4560c8 authored tarafından Charles-François Natali's avatar Charles-François Natali

Issue #1441530: In imaplib, read the data in one chunk to speed up large

reads and simplify code.
üst 17dc8195
......@@ -249,15 +249,7 @@ class IMAP4:
def read(self, size):
"""Read 'size' bytes from remote."""
chunks = []
read = 0
while read < size:
data = self.file.read(min(size-read, 4096))
if not data:
break
read += len(data)
chunks.append(data)
return b''.join(chunks)
return self.file.read(size)
def readline(self):
......
......@@ -161,6 +161,9 @@ Core and Builtins
Library
-------
- Issue #1441530: In imaplib, read the data in one chunk to speed up large
reads and simplify code.
- Issue #12070: Fix the Makefile parser of the sysconfig module to handle
correctly references to "bogus variable" (e.g. "prefix=$/opt/python").
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment