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

This commit is contained in:
Serhiy Storchaka 2015-07-10 22:24:47 +03:00
parent e0fd7ef6bb
commit d44768ff16
2 changed files with 3 additions and 1 deletions

View File

@ -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:

View File

@ -66,6 +66,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