mercurial/encoding.py
changeset 44452 9d2b2df2c2ba
parent 43787 be8552f25cab
child 45681 a736ab681b78
--- a/mercurial/encoding.py	Fri Mar 06 10:52:44 2020 +0100
+++ b/mercurial/encoding.py	Fri Mar 06 13:27:41 2020 -0500
@@ -86,10 +86,10 @@
 else:
     # preferred encoding isn't known yet; use utf-8 to avoid unicode error
     # and recreate it once encoding is settled
-    environ = dict(
-        (k.encode('utf-8'), v.encode('utf-8'))
+    environ = {
+        k.encode('utf-8'): v.encode('utf-8')
         for k, v in os.environ.items()  # re-exports
-    )
+    }
 
 _encodingrewrites = {
     b'646': b'ascii',
@@ -285,10 +285,10 @@
 if not _nativeenviron:
     # now encoding and helper functions are available, recreate the environ
     # dict to be exported to other modules
-    environ = dict(
-        (tolocal(k.encode('utf-8')), tolocal(v.encode('utf-8')))
+    environ = {
+        tolocal(k.encode('utf-8')): tolocal(v.encode('utf-8'))
         for k, v in os.environ.items()  # re-exports
-    )
+    }
 
 if pycompat.ispy3:
     # os.getcwd() on Python 3 returns string, but it has os.getcwdb() which