This revision was automatically updated to reflect the committed changes.
Closed by commit rHG6619acb2fcbc: util: prefer "bytesio" to 
"stringio" (authored by indygreg, committed by ).

REPOSITORY
  rHG Mercurial

CHANGES SINCE LAST UPDATE
  https://phab.mercurial-scm.org/D2868?vs=7046&id=7067

REVISION DETAIL
  https://phab.mercurial-scm.org/D2868

AFFECTED FILES
  mercurial/pure/mpatch.py
  mercurial/pure/parsers.py
  mercurial/pycompat.py
  mercurial/util.py

CHANGE DETAILS

diff --git a/mercurial/util.py b/mercurial/util.py
--- a/mercurial/util.py
+++ b/mercurial/util.py
@@ -71,7 +71,9 @@
 stderr = pycompat.stderr
 stdin = pycompat.stdin
 stdout = pycompat.stdout
-stringio = pycompat.stringio
+bytesio = pycompat.bytesio
+# TODO deprecate stringio name, as it is a lie on Python 3.
+stringio = bytesio
 xmlrpclib = pycompat.xmlrpclib
 
 httpserver = urllibcompat.httpserver
diff --git a/mercurial/pycompat.py b/mercurial/pycompat.py
--- a/mercurial/pycompat.py
+++ b/mercurial/pycompat.py
@@ -64,7 +64,9 @@
     sysexecutable = sys.executable
     if sysexecutable:
         sysexecutable = os.fsencode(sysexecutable)
-    stringio = io.BytesIO
+    bytesio = io.BytesIO
+    # TODO deprecate stringio name, as it is a lie on Python 3.
+    stringio = bytesio
 
     def maplist(*args):
         return list(map(*args))
@@ -343,7 +345,8 @@
     getcwd = os.getcwd
     sysexecutable = sys.executable
     shlexsplit = shlex.split
-    stringio = cStringIO.StringIO
+    bytesio = cStringIO.StringIO
+    stringio = bytesio
     maplist = map
     ziplist = zip
     rawinput = raw_input
diff --git a/mercurial/pure/parsers.py b/mercurial/pure/parsers.py
--- a/mercurial/pure/parsers.py
+++ b/mercurial/pure/parsers.py
@@ -12,7 +12,7 @@
 
 from ..node import nullid
 from .. import pycompat
-stringio = pycompat.stringio
+stringio = pycompat.bytesio
 
 
 _pack = struct.pack
diff --git a/mercurial/pure/mpatch.py b/mercurial/pure/mpatch.py
--- a/mercurial/pure/mpatch.py
+++ b/mercurial/pure/mpatch.py
@@ -10,7 +10,7 @@
 import struct
 
 from .. import pycompat
-stringio = pycompat.stringio
+stringio = pycompat.bytesio
 
 class mpatchError(Exception):
     """error raised when a delta cannot be decoded



To: indygreg, #hg-reviewers, pulkit
Cc: mercurial-devel
_______________________________________________
Mercurial-devel mailing list
Mercurial-devel@mercurial-scm.org
https://www.mercurial-scm.org/mailman/listinfo/mercurial-devel

Reply via email to