# HG changeset patch # User Gregory Szorc # Date 1399760524 25200 # Node ID 007d276f8c9461384be3e7b75ee0aa69b33125fb # Parent 74be3fb1e3b8dffcd618528c3cbc489b858095dd py3kcompat: don't convert os.environ to bytes os.environ accepts str not bytes. Assigning bytes will result in a run-time error. diff -r 74be3fb1e3b8 -r 007d276f8c94 mercurial/py3kcompat.py --- a/mercurial/py3kcompat.py Sat May 10 14:57:25 2014 -0700 +++ b/mercurial/py3kcompat.py Sat May 10 15:22:04 2014 -0700 @@ -52,13 +52,6 @@ return ret.encode('utf-8', 'surrogateescape') builtins.bytesformatter = bytesformatter -# Create bytes equivalents for os.environ values -for key in list(os.environ.keys()): - # UTF-8 is fine for us - bkey = key.encode('utf-8', 'surrogateescape') - bvalue = os.environ[key].encode('utf-8', 'surrogateescape') - os.environ[bkey] = bvalue - origord = builtins.ord def fakeord(char): if isinstance(char, int):