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. --- python/servo/command_base.py | 29 +++++++++++++++-------------- 1 file changed, 15 insertions(+), 14 deletions(-) (limited to 'python/servo/command_base.py') diff --git a/python/servo/command_base.py b/python/servo/command_base.py index 7dafcd8c5db..d51e3f6bc8c 100644 --- a/python/servo/command_base.py +++ b/python/servo/command_base.py @@ -9,35 +9,36 @@ from __future__ import print_function -from errno import ENOENT as NO_SUCH_FILE_OR_DIRECTORY -from glob import glob -import shutil +import contextlib +import distro +import functools import gzip import itertools +import json import locale import os -from os import path import platform -import distro import re -import contextlib -import subprocess -from subprocess import PIPE +import shutil import six +import subprocess import sys import tarfile +import urllib import zipfile -import functools + +from errno import ENOENT as NO_SUCH_FILE_OR_DIRECTORY +from glob import glob +from os import path +from subprocess import PIPE + +import toml + from xml.etree.ElementTree import XML from servo.util import download_file -import six.moves.urllib as urllib from .bootstrap import check_gstreamer_lib - from mach.decorators import CommandArgument from mach.registrar import Registrar -import toml -import json - from servo.packages import WINDOWS_MSVC as msvc_deps from servo.util import host_triple -- cgit v1.2.3