Commit 05121159 authored by Serhiy Storchaka's avatar Serhiy Storchaka

Issue #24608: chunk.Chunk.read() now always returns bytes, not str.

parents 3d031e61 d44768ff
...@@ -128,7 +128,7 @@ class Chunk: ...@@ -128,7 +128,7 @@ class Chunk:
if self.closed: if self.closed:
raise ValueError("I/O operation on closed file") raise ValueError("I/O operation on closed file")
if self.size_read >= self.chunksize: if self.size_read >= self.chunksize:
return '' return b''
if size < 0: if size < 0:
size = self.chunksize - self.size_read size = self.chunksize - self.size_read
if size > self.chunksize - self.size_read: if size > self.chunksize - self.size_read:
......
...@@ -17,6 +17,8 @@ Core and Builtins ...@@ -17,6 +17,8 @@ Core and Builtins
Library Library
------- -------
- Issue #24608: chunk.Chunk.read() now always returns bytes, not str.
- Issue #18684: Fixed reading out of the buffer in the re module. - Issue #18684: Fixed reading out of the buffer in the re module.
- Issue #24259: tarfile now raises a ReadError if an archive is truncated - Issue #24259: tarfile now raises a ReadError if an archive is truncated
......
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