diff --git a/common/security-features/subresource/static-import.py b/common/security-features/subresource/static-import.py index 435753eefb6215..717d3de6b186b2 100644 --- a/common/security-features/subresource/static-import.py +++ b/common/security-features/subresource/static-import.py @@ -1,5 +1,5 @@ import os, sys -from six.moves.urllib.parse import unquote +from urllib.parse import unquote from wptserve.utils import isomorphic_decode import importlib diff --git a/common/security-features/subresource/subresource.py b/common/security-features/subresource/subresource.py index 0416c324b31de0..b3c055a93a58c6 100644 --- a/common/security-features/subresource/subresource.py +++ b/common/security-features/subresource/subresource.py @@ -1,5 +1,5 @@ import os, json -from six.moves.urllib.parse import parse_qsl, SplitResult, urlencode, urlsplit, urlunsplit +from urllib.parse import parse_qsl, SplitResult, urlencode, urlsplit, urlunsplit from wptserve.utils import isomorphic_decode, isomorphic_encode diff --git a/cookie-store/resources/cookie_helper.py b/cookie-store/resources/cookie_helper.py index b88b25c701639d..c76822f81d710b 100755 --- a/cookie-store/resources/cookie_helper.py +++ b/cookie-store/resources/cookie_helper.py @@ -22,7 +22,7 @@ from six import PY3 -from six.moves.urllib.parse import parse_qs, quote +from urllib.parse import parse_qs, quote from wptserve.utils import isomorphic_decode, isomorphic_encode diff --git a/cookies/resources/helpers.py b/cookies/resources/helpers.py index 47f40b4fc19a83..035afad42b2e29 100644 --- a/cookies/resources/helpers.py +++ b/cookies/resources/helpers.py @@ -1,6 +1,6 @@ from six import integer_types -from six.moves.urllib.parse import parse_qs +from urllib.parse import parse_qs from wptserve.utils import isomorphic_encode diff --git a/cookies/resources/set.py b/cookies/resources/set.py index ffd8a7d33b86a4..eda9338c9269e9 100644 --- a/cookies/resources/set.py +++ b/cookies/resources/set.py @@ -1,5 +1,5 @@ from cookies.resources import helpers -from six.moves.urllib.parse import unquote +from urllib.parse import unquote from wptserve.utils import isomorphic_encode diff --git a/fetch/api/resources/redirect.py b/fetch/api/resources/redirect.py index c8d481ebd3376d..2ff8b78f09539b 100644 --- a/fetch/api/resources/redirect.py +++ b/fetch/api/resources/redirect.py @@ -1,6 +1,6 @@ import time -from six.moves.urllib.parse import urlencode, urlparse +from urllib.parse import urlencode, urlparse from wptserve.utils import isomorphic_decode, isomorphic_encode diff --git a/fetch/api/resources/trickle.py b/fetch/api/resources/trickle.py index 5091a2b3fddce7..6423f7f36fe76f 100644 --- a/fetch/api/resources/trickle.py +++ b/fetch/api/resources/trickle.py @@ -1,7 +1,5 @@ import time -from six.moves import xrange - def main(request, response): delay = float(request.GET.first(b"ms", 500)) / 1E3 count = int(request.GET.first(b"count", 50)) @@ -11,6 +9,6 @@ def main(request, response): response.headers.set(b"Content-type", b"text/plain") response.write_status_headers() time.sleep(delay) - for i in xrange(count): + for i in range(count): response.writer.write_content(b"TEST_TRICKLE\n") time.sleep(delay) diff --git a/resource-timing/SyntheticResponse.py b/resource-timing/SyntheticResponse.py index 0cce1df3cf6b53..6f888f37896e12 100644 --- a/resource-timing/SyntheticResponse.py +++ b/resource-timing/SyntheticResponse.py @@ -1,4 +1,4 @@ -from six.moves.urllib.parse import unquote +from urllib.parse import unquote from wptserve.utils import isomorphic_decode, isomorphic_encode diff --git a/resources/test/conftest.py b/resources/test/conftest.py index 860784d2409929..72ade590dd97bb 100644 --- a/resources/test/conftest.py +++ b/resources/test/conftest.py @@ -4,12 +4,12 @@ import ssl import sys import subprocess +import urllib import html5lib import py import pytest from six import text_type -from six.moves import urllib from wptserver import WPTServer diff --git a/resources/test/wptserver.py b/resources/test/wptserver.py index a504a76a46e00d..90af5cea475281 100644 --- a/resources/test/wptserver.py +++ b/resources/test/wptserver.py @@ -3,7 +3,7 @@ import subprocess import time import sys -from six.moves import urllib +import urllib class WPTServer(object): diff --git a/service-workers/service-worker/resources/notification_icon.py b/service-workers/service-worker/resources/notification_icon.py index da479fcd9b8352..71f5a9d488d7a1 100644 --- a/service-workers/service-worker/resources/notification_icon.py +++ b/service-workers/service-worker/resources/notification_icon.py @@ -1,4 +1,4 @@ -from six.moves.urllib.parse import parse_qs +from urllib.parse import parse_qs from wptserve.utils import isomorphic_encode diff --git a/service-workers/service-worker/resources/update-worker.py b/service-workers/service-worker/resources/update-worker.py index 0bf331cb2aae6b..5638a8849cb749 100644 --- a/service-workers/service-worker/resources/update-worker.py +++ b/service-workers/service-worker/resources/update-worker.py @@ -1,4 +1,4 @@ -from six.moves.urllib.parse import unquote +from urllib.parse import unquote from wptserve.utils import isomorphic_decode, isomorphic_encode diff --git a/webdriver/tests/support/authentication.py b/webdriver/tests/support/authentication.py index e61eef0696ca21..9da4bb7be5ffb7 100644 --- a/webdriver/tests/support/authentication.py +++ b/webdriver/tests/support/authentication.py @@ -1,4 +1,4 @@ -from six.moves.urllib.parse import urlencode +from urllib.parse import urlencode def basic_authentication(url, username=None, password=None, protocol="http"): diff --git a/webdriver/tests/support/fixtures.py b/webdriver/tests/support/fixtures.py index 0ecfcdbb2427a9..1ea76cce1623ae 100644 --- a/webdriver/tests/support/fixtures.py +++ b/webdriver/tests/support/fixtures.py @@ -8,7 +8,7 @@ from six import string_types -from six.moves.urllib.parse import urlunsplit +from urllib.parse import urlunsplit from tests.support import defaults from tests.support.helpers import cleanup_session, deep_update diff --git a/webdriver/tests/support/http_request.py b/webdriver/tests/support/http_request.py index 895d1319ac0ac8..3e5fe66c3175f2 100644 --- a/webdriver/tests/support/http_request.py +++ b/webdriver/tests/support/http_request.py @@ -3,7 +3,7 @@ from six import text_type -from six.moves.http_client import HTTPConnection +from http.client import HTTPConnection class HTTPRequest(object): diff --git a/webdriver/tests/support/inline.py b/webdriver/tests/support/inline.py index 39e926dd09a37a..494ca74f92653d 100644 --- a/webdriver/tests/support/inline.py +++ b/webdriver/tests/support/inline.py @@ -1,6 +1,6 @@ """Helpers for inlining extracts of documents in tests.""" -from six.moves.urllib.parse import urlencode +from urllib.parse import urlencode BOILERPLATES = { diff --git a/webdriver/tests/switch_to_frame/cross_origin.py b/webdriver/tests/switch_to_frame/cross_origin.py index ec345c1cfc3fdc..633eba3f424857 100644 --- a/webdriver/tests/switch_to_frame/cross_origin.py +++ b/webdriver/tests/switch_to_frame/cross_origin.py @@ -1,4 +1,4 @@ -from six.moves.urllib.parse import urlparse +from urllib.parse import urlparse import webdriver.protocol as protocol diff --git a/websockets/cookies/support/set-cookie.py b/websockets/cookies/support/set-cookie.py index f373d1341a3ad1..71cd8bca607c51 100644 --- a/websockets/cookies/support/set-cookie.py +++ b/websockets/cookies/support/set-cookie.py @@ -1,7 +1,7 @@ -from six.moves.urllib import parse +from urllib.parse import unquote from wptserve.utils import isomorphic_encode def main(request, response): - response.headers.set(b'Set-Cookie', isomorphic_encode(parse.unquote(request.url_parts.query))) + response.headers.set(b'Set-Cookie', isomorphic_encode(unquote(request.url_parts.query))) return [(b"Content-Type", b"text/plain")], b"" diff --git a/websockets/handlers/set-cookie-secure_wsh.py b/websockets/handlers/set-cookie-secure_wsh.py index 4db321fc9dc212..052a8820844317 100755 --- a/websockets/handlers/set-cookie-secure_wsh.py +++ b/websockets/handlers/set-cookie-secure_wsh.py @@ -1,5 +1,5 @@ #!/usr/bin/python -from six.moves import urllib +import urllib def web_socket_do_extra_handshake(request): diff --git a/websockets/handlers/set-cookie_http_wsh.py b/websockets/handlers/set-cookie_http_wsh.py index 2fa0ded65d804b..533109196427de 100755 --- a/websockets/handlers/set-cookie_http_wsh.py +++ b/websockets/handlers/set-cookie_http_wsh.py @@ -1,6 +1,6 @@ #!/usr/bin/python -from six.moves import urllib +import urllib def web_socket_do_extra_handshake(request): url_parts = urllib.parse.urlsplit(request.uri) diff --git a/websockets/handlers/set-cookie_wsh.py b/websockets/handlers/set-cookie_wsh.py index 3cec1c041cf11e..5fe3ad9c57343a 100755 --- a/websockets/handlers/set-cookie_wsh.py +++ b/websockets/handlers/set-cookie_wsh.py @@ -1,5 +1,5 @@ #!/usr/bin/python -from six.moves import urllib +import urllib def web_socket_do_extra_handshake(request): diff --git a/websockets/handlers/set-cookies-samesite_wsh.py b/websockets/handlers/set-cookies-samesite_wsh.py index 6f4a1b46c2cc7c..59f0a4a598ebaf 100644 --- a/websockets/handlers/set-cookies-samesite_wsh.py +++ b/websockets/handlers/set-cookies-samesite_wsh.py @@ -1,4 +1,4 @@ -from six.moves import urllib +import urllib def web_socket_do_extra_handshake(request): diff --git a/websockets/handlers/stash_responder_wsh.py b/websockets/handlers/stash_responder_wsh.py index fd6eabc7023f43..08495615691321 100755 --- a/websockets/handlers/stash_responder_wsh.py +++ b/websockets/handlers/stash_responder_wsh.py @@ -1,6 +1,6 @@ #!/usr/bin/python -from six.moves import urllib import json +import urllib from mod_pywebsocket import common, msgutil, util from mod_pywebsocket.handshake import hybi from wptserve import stash diff --git a/xhr/resources/trickle.py b/xhr/resources/trickle.py index 4a6bbd7f4f275e..eab5310387e37a 100644 --- a/xhr/resources/trickle.py +++ b/xhr/resources/trickle.py @@ -1,7 +1,5 @@ import time -from six.moves import range - def main(request, response): chunk = b"TEST_TRICKLE\n" delay = float(request.GET.first(b"ms", 500)) / 1E3