changeset 36585:63fe5ca93b13

pycompat: add support for encoding argument to our wrapper This only works on Python 3, but I'm about to need it for a regrettable hack in the convert code. Differential Revision: https://phab.mercurial-scm.org/D2524
author Augie Fackler <augie@google.com>
date Thu, 01 Mar 2018 17:46:34 -0500
parents c28de190e20a
children d60430dc7853
files mercurial/pycompat.py
diffstat 1 files changed, 2 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/mercurial/pycompat.py	Fri Mar 02 04:49:08 2018 +0530
+++ b/mercurial/pycompat.py	Thu Mar 01 17:46:34 2018 -0500
@@ -224,8 +224,8 @@
     xrange = builtins.range
     unicode = str
 
-    def open(name, mode='r', buffering=-1):
-        return builtins.open(name, sysstr(mode), buffering)
+    def open(name, mode='r', buffering=-1, encoding=None):
+        return builtins.open(name, sysstr(mode), buffering, encoding)
 
     def _getoptbwrapper(orig, args, shortlist, namelist):
         """