mercurial/url.py
changeset 30820 6a70cf94d1b5
parent 30763 a520aefb96f1
child 31936 806f9a883b4f
--- a/mercurial/url.py	Sun Jan 15 16:33:15 2017 +0900
+++ b/mercurial/url.py	Sun Jan 15 13:17:05 2017 +0530
@@ -15,10 +15,10 @@
 
 from .i18n import _
 from . import (
+    encoding,
     error,
     httpconnection as httpconnectionmod,
     keepalive,
-    pycompat,
     sslutil,
     util,
 )
@@ -81,7 +81,7 @@
 class proxyhandler(urlreq.proxyhandler):
     def __init__(self, ui):
         proxyurl = (ui.config("http_proxy", "host") or
-                        pycompat.osgetenv('http_proxy'))
+                        encoding.environ.get('http_proxy'))
         # XXX proxyauthinfo = None
 
         if proxyurl:
@@ -99,7 +99,7 @@
             no_list.extend([p.lower() for
                             p in ui.configlist("http_proxy", "no")])
             no_list.extend([p.strip().lower() for
-                            p in pycompat.osgetenv("no_proxy", '').split(',')
+                            p in encoding.environ.get("no_proxy", '').split(',')
                             if p.strip()])
             # "http_proxy.always" config is for running tests on localhost
             if ui.configbool("http_proxy", "always"):