changeset 31577:b2a41a826d71

tests: use urlreq in tinyproxy.py This is our last consumer of util.urlparse.
author Gregory Szorc <gregory.szorc@gmail.com>
date Tue, 21 Mar 2017 22:45:02 -0700
parents 29fcfb981324
children c0c4e14ee597
files tests/tinyproxy.py
diffstat 1 files changed, 3 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/tests/tinyproxy.py	Tue Mar 21 22:39:52 2017 -0700
+++ b/tests/tinyproxy.py	Tue Mar 21 22:45:02 2017 -0700
@@ -23,8 +23,8 @@
 from mercurial import util
 
 httpserver = util.httpserver
-urlparse = util.urlparse
 socketserver = util.socketserver
+urlreq = util.urlreq
 
 if os.environ.get('HGIPV6', '0') == '1':
     family = socket.AF_INET6
@@ -85,7 +85,7 @@
             self.connection.close()
 
     def do_GET(self):
-        (scm, netloc, path, params, query, fragment) = urlparse.urlparse(
+        (scm, netloc, path, params, query, fragment) = urlreq.urlparse(
             self.path, 'http')
         if scm != 'http' or fragment or not netloc:
             self.send_error(400, "bad url %s" % self.path)
@@ -96,7 +96,7 @@
                 self.log_request()
                 soc.send("%s %s %s\r\n" % (
                     self.command,
-                    urlparse.urlunparse(('', '', path, params, query, '')),
+                    urlreq.urlunparse(('', '', path, params, query, '')),
                     self.request_version))
                 self.headers['Connection'] = 'close'
                 del self.headers['Proxy-Connection']