From e9942bddb0dd3ae67403e3ca486bea2e0f4ce954 Mon Sep 17 00:00:00 2001 From: Martin Robinson Date: Mon, 10 Apr 2023 12:47:39 +0200 Subject: Replace usage of six.moves.urllib with urllib Also organize some of the imports. Now that Servo only uses Python 3, this module is unnecessary. This is part of the gradual migration to using only Python 3. --- tests/jquery/run_jquery.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'tests/jquery/run_jquery.py') diff --git a/tests/jquery/run_jquery.py b/tests/jquery/run_jquery.py index e9d50deed7b..2aae840ac75 100755 --- a/tests/jquery/run_jquery.py +++ b/tests/jquery/run_jquery.py @@ -14,7 +14,7 @@ import six.moves.BaseHTTPServer import six.moves.SimpleHTTPServer import six.moves.socketserver import threading -import six.moves.urllib.parse +import urllib import six # List of jQuery modules that will be tested. @@ -149,13 +149,13 @@ def run_http_server(): path = self.translate_path(self.path) f = None if os.path.isdir(path): - parts = six.moves.urllib.parse.urlsplit(self.path) + parts = urllib.parse.urlsplit(self.path) if not parts.path.endswith('/'): # redirect browser - doing basically what apache does self.send_response(301) new_parts = (parts[0], parts[1], parts[2] + '/', parts[3], parts[4]) - new_url = six.moves.urllib.parse.urlunsplit(new_parts) + new_url = urllib.parse.urlunsplit(new_parts) self.send_header("Location", new_url) self.end_headers() return None -- cgit v1.2.3