[Python-checkins] cpython (merge 3.4 -> 3.5): Issue #24608: chunk.Chunk.read() now always returns bytes, not str.

serhiy.storchaka python-checkins at python.org
Fri Jul 10 21:27:12 CEST 2015


https://hg.python.org/cpython/rev/64b2d154a5db
changeset: 96899:64b2d154a5db
branch: 3.5
parent: 96896:8b75fa4ec53f
parent: 96898:9e035639516c
user: Serhiy Storchaka <storchaka at gmail.com>
date: Fri Jul 10 22:26:08 2015 +0300
summary:
 Issue #24608: chunk.Chunk.read() now always returns bytes, not str.
files:
 Lib/chunk.py | 2 +-
 Misc/NEWS | 2 ++
 2 files changed, 3 insertions(+), 1 deletions(-)
diff --git a/Lib/chunk.py b/Lib/chunk.py
--- a/Lib/chunk.py
+++ b/Lib/chunk.py
@@ -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 --git a/Misc/NEWS b/Misc/NEWS
--- a/Misc/NEWS
+++ b/Misc/NEWS
@@ -17,6 +17,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
-- 
Repository URL: https://hg.python.org/cpython


More information about the Python-checkins mailing list

AltStyle によって変換されたページ (->オリジナル) /