Mercurial > hg
changeset 31359:73b3bee8febe
pycompat: default to BytesIO instead of StringIO
author | Pulkit Goyal <7895pulkit@gmail.com> |
---|---|
date | Mon, 13 Mar 2017 00:55:14 +0530 |
parents | 4015dfc899bb |
children | 37acdf027ae2 |
files | mercurial/pycompat.py |
diffstat | 1 files changed, 2 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/mercurial/pycompat.py Sun Mar 12 00:48:06 2017 -0500 +++ b/mercurial/pycompat.py Mon Mar 13 00:55:14 2017 +0530 @@ -55,6 +55,7 @@ sysexecutable = sys.executable if sysexecutable: sysexecutable = os.fsencode(sysexecutable) + stringio = io.BytesIO # TODO: .buffer might not exist if std streams were replaced; we'll need # a silly wrapper to make a bytes stream backed by a unicode one. @@ -180,8 +181,8 @@ getcwd = os.getcwd sysexecutable = sys.executable shlexsplit = shlex.split + stringio = io.StringIO -stringio = io.StringIO empty = _queue.Empty queue = _queue.Queue