summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSerhiy Storchaka <storchaka@gmail.com>2015-07-10 19:26:44 (GMT)
committerSerhiy Storchaka <storchaka@gmail.com>2015-07-10 19:26:44 (GMT)
commite5505175e52f37287de47440939649ccc979dab9 (patch)
tree0996b7a3aa1242354a341ed802f32fb41f3df913
parent16c96bb22e5ba699188079986c907cb6a8a72164 (diff)
parent05121159b3b8d2764847a2cff782bb9ecf773dc0 (diff)
downloadcpython-e5505175e52f37287de47440939649ccc979dab9.zip
cpython-e5505175e52f37287de47440939649ccc979dab9.tar.gz
cpython-e5505175e52f37287de47440939649ccc979dab9.tar.bz2
Issue #24608: chunk.Chunk.read() now always returns bytes, not str.
-rw-r--r--Lib/chunk.py2
-rw-r--r--Misc/NEWS2
2 files changed, 3 insertions, 1 deletions
diff --git a/Lib/chunk.py b/Lib/chunk.py
index 98187b2..84b77cc 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 d4aae6f..554d9aa 100644
--- a/Misc/NEWS
+++ b/Misc/NEWS
@@ -33,6 +33,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