Mercurial > public > mercurial-scm > hg-stable
diff tests/test-template-functions.t @ 45056:4c1b4805db57
pycompat: change users of pycompat.{stdin,stdout,stderr} to use procutil.std*
On Python 3, pycompat.{stdin,stdout,stderr} are usually block-buffered even if
connected to a TTY. procutil.{stdin,stdout,stderr} provide consistent behavior
across platforms and Python versions.
author | Manuel Jacob <me@manueljacob.de> |
---|---|
date | Mon, 06 Jul 2020 17:44:25 +0200 |
parents | 7333e8bb9781 |
children | fc4fb2f17dd4 |
line wrap: on
line diff
--- a/tests/test-template-functions.t Mon Jul 06 10:30:55 2020 +0200 +++ b/tests/test-template-functions.t Mon Jul 06 17:44:25 2020 +0200 @@ -1575,15 +1575,15 @@ > from __future__ import absolute_import > from mercurial import ( > dispatch, - > pycompat, > ) > from mercurial.utils import ( > cborutil, + > procutil, > stringutil, > ) > dispatch.initstdio() - > items = cborutil.decodeall(pycompat.stdin.read()) - > pycompat.stdout.write(stringutil.pprint(items, indent=1) + b'\n') + > items = cborutil.decodeall(procutil.stdin.read()) + > procutil.stdout.write(stringutil.pprint(items, indent=1) + b'\n') > EOF $ hg log -T "{rev|cbor}" -R a -l2 | "$PYTHON" "$TESTTMP/decodecbor.py"