]> granicus.if.org Git - python/commitdiff
Issue #24608: chunk.Chunk.read() now always returns bytes, not str.
authorSerhiy Storchaka <storchaka@gmail.com>
Fri, 10 Jul 2015 19:24:47 +0000 (22:24 +0300)
committerSerhiy Storchaka <storchaka@gmail.com>
Fri, 10 Jul 2015 19:24:47 +0000 (22:24 +0300)
Lib/chunk.py
Misc/NEWS

index 98187b2c43ad7e5cfaabc72c8010b5ce57bc3937..84b77cc8202f92340de5bfa8fb2c86a9b2ab0915 100644 (file)
@@ -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:
index 87327b30bde797482c099b993161702747aa5731..bdbd74e6bfab7f6fff19ca376cc90f8e25ad749b 100644 (file)
--- 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