Mercurial > public > mercurial-scm > hg
diff tests/test-hgweb-non-interactive.t @ 45055: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 | f80f7a67e176 |
children | 42d2b31cee0b |
line wrap: on
line diff
--- a/tests/test-hgweb-non-interactive.t Mon Jul 06 10:30:55 2020 +0200 +++ b/tests/test-hgweb-non-interactive.t Mon Jul 06 17:44:25 2020 +0200 @@ -14,10 +14,12 @@ > dispatch, > encoding, > hg, - > pycompat, > ui as uimod, > util, > ) + > from mercurial.utils import ( + > procutil, + > ) > ui = uimod.ui > from mercurial.hgweb import hgweb_mod > stringio = util.stringio @@ -69,8 +71,8 @@ > for c in i(env, startrsp): > pass > sys.stdout.flush() - > pycompat.stdout.write(b'---- ERRORS\n') - > pycompat.stdout.write(b'%s\n' % errors.getvalue()) + > procutil.stdout.write(b'---- ERRORS\n') + > procutil.stdout.write(b'%s\n' % errors.getvalue()) > print('---- OS.ENVIRON wsgi variables') > print(sorted([x for x in os.environ if x.startswith('wsgi')])) > print('---- request.ENVIRON wsgi variables')