changeset: 96898:9e035639516c branch: 3.4 parent: 96895:938b28bfe806 user: Serhiy Storchaka date: Fri Jul 10 22:24:47 2015 +0300 files: Lib/chunk.py Misc/NEWS description: Issue #24608: chunk.Chunk.read() now always returns bytes, not str. diff -r 938b28bfe806 -r 9e035639516c Lib/chunk.py --- a/Lib/chunk.py Fri Jul 10 22:13:40 2015 +0300 +++ b/Lib/chunk.py Fri Jul 10 22:24:47 2015 +0300 @@ -128,7 +128,7 @@ 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 -r 938b28bfe806 -r 9e035639516c Misc/NEWS --- a/Misc/NEWS Fri Jul 10 22:13:40 2015 +0300 +++ b/Misc/NEWS Fri Jul 10 22:24:47 2015 +0300 @@ -66,6 +66,8 @@ 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