From: Serhiy Storchaka Date: Fri, 10 Jul 2015 19:24:47 +0000 (+0300) Subject: Issue #24608: chunk.Chunk.read() now always returns bytes, not str. X-Git-Tag: v3.5.0b4~56^2 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=d44768ff16131c17bb9dc277840a94810a87b6a9;p=python Issue #24608: chunk.Chunk.read() now always returns bytes, not str. --- diff --git a/Lib/chunk.py b/Lib/chunk.py index 98187b2c43..84b77cc820 100644 --- a/Lib/chunk.py +++ b/Lib/chunk.py @@ -128,7 +128,7 @@ class Chunk: if self.closed: raise ValueError("I/O operation on closed file") if self.size_read >= self.chunksize: - return '' + return b'' if size < 0: size = self.chunksize - self.size_read if size > self.chunksize - self.size_read: diff --git a/Misc/NEWS b/Misc/NEWS index 87327b30bd..bdbd74e6bf 100644 --- a/Misc/NEWS +++ b/Misc/NEWS @@ -66,6 +66,8 @@ Core and Builtins 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 #24259: tarfile now raises a ReadError if an archive is truncated