mercurial/pycompat.py
branchstable
changeset 44918 7be784f301fa
parent 44651 00e0c5c06ed5
child 44977 afcad425a0b6
equal deleted inserted replaced
44917:bad37041fc1e 44918:7be784f301fa
   141     rawinput = input
   141     rawinput = input
   142     getargspec = inspect.getfullargspec
   142     getargspec = inspect.getfullargspec
   143 
   143 
   144     long = int
   144     long = int
   145 
   145 
       
   146     # Warning: sys.stdout.buffer and sys.stderr.buffer do not necessarily have
       
   147     # the same buffering behavior as sys.stdout and sys.stderr. The interpreter
       
   148     # initializes them with block-buffered streams or unbuffered streams (when
       
   149     # the -u option or the PYTHONUNBUFFERED environment variable is set), never
       
   150     # with a line-buffered stream.
   146     # TODO: .buffer might not exist if std streams were replaced; we'll need
   151     # TODO: .buffer might not exist if std streams were replaced; we'll need
   147     # a silly wrapper to make a bytes stream backed by a unicode one.
   152     # a silly wrapper to make a bytes stream backed by a unicode one.
   148     stdin = sys.stdin.buffer
   153     stdin = sys.stdin.buffer
   149     stdout = sys.stdout.buffer
   154     stdout = sys.stdout.buffer
   150     stderr = sys.stderr.buffer
   155     stderr = sys.stderr.buffer