Commit a672328f authored by Victor Stinner's avatar Victor Stinner Committed by GitHub

bpo-40443: Remove unused imports in distutils (GH-19802)

parent ea19518a
...@@ -14,8 +14,6 @@ for older versions in distutils.msvc9compiler and distutils.msvccompiler. ...@@ -14,8 +14,6 @@ for older versions in distutils.msvc9compiler and distutils.msvccompiler.
# ported to VS 2015 by Steve Dower # ported to VS 2015 by Steve Dower
import os import os
import shutil
import stat
import subprocess import subprocess
import winreg import winreg
...@@ -65,8 +63,6 @@ def _find_vc2017(): ...@@ -65,8 +63,6 @@ def _find_vc2017():
If vswhere.exe is not available, by definition, VS 2017 is not If vswhere.exe is not available, by definition, VS 2017 is not
installed. installed.
""" """
import json
root = os.environ.get("ProgramFiles(x86)") or os.environ.get("ProgramFiles") root = os.environ.get("ProgramFiles(x86)") or os.environ.get("ProgramFiles")
if not root: if not root:
return None, None return None, None
......
...@@ -14,10 +14,10 @@ for the Borland C++ compiler. ...@@ -14,10 +14,10 @@ for the Borland C++ compiler.
import os import os
from distutils.errors import \ from distutils.errors import \
DistutilsExecError, DistutilsPlatformError, \ DistutilsExecError, \
CompileError, LibError, LinkError, UnknownFileError CompileError, LibError, LinkError, UnknownFileError
from distutils.ccompiler import \ from distutils.ccompiler import \
CCompiler, gen_preprocess_options, gen_lib_options CCompiler, gen_preprocess_options
from distutils.file_util import write_file from distutils.file_util import write_file
from distutils.dep_util import newer from distutils.dep_util import newer
from distutils import log from distutils import log
......
...@@ -8,7 +8,7 @@ from distutils.errors import * ...@@ -8,7 +8,7 @@ from distutils.errors import *
from distutils.spawn import spawn from distutils.spawn import spawn
from distutils.file_util import move_file from distutils.file_util import move_file
from distutils.dir_util import mkpath from distutils.dir_util import mkpath
from distutils.dep_util import newer_pairwise, newer_group from distutils.dep_util import newer_group
from distutils.util import split_quoted, execute from distutils.util import split_quoted, execute
from distutils import log from distutils import log
......
...@@ -6,7 +6,6 @@ distributions).""" ...@@ -6,7 +6,6 @@ distributions)."""
import subprocess, sys, os import subprocess, sys, os
from distutils.core import Command from distutils.core import Command
from distutils.debug import DEBUG from distutils.debug import DEBUG
from distutils.util import get_platform
from distutils.file_util import write_file from distutils.file_util import write_file
from distutils.errors import * from distutils.errors import *
from distutils.sysconfig import get_python_version from distutils.sysconfig import get_python_version
......
...@@ -8,7 +8,7 @@ import sys ...@@ -8,7 +8,7 @@ import sys
import warnings import warnings
from distutils.core import Command from distutils.core import Command
from distutils.util import get_platform from distutils.util import get_platform
from distutils.dir_util import create_tree, remove_tree from distutils.dir_util import remove_tree
from distutils.errors import * from distutils.errors import *
from distutils.sysconfig import get_python_version from distutils.sysconfig import get_python_version
from distutils import log from distutils import log
......
...@@ -11,7 +11,6 @@ try: ...@@ -11,7 +11,6 @@ try:
from docutils.parsers.rst import Parser from docutils.parsers.rst import Parser
from docutils import frontend from docutils import frontend
from docutils import nodes from docutils import nodes
from io import StringIO
class SilentReporter(Reporter): class SilentReporter(Reporter):
......
...@@ -7,7 +7,6 @@ index). ...@@ -7,7 +7,6 @@ index).
import os import os
import io import io
import platform
import hashlib import hashlib
from base64 import standard_b64encode from base64 import standard_b64encode
from urllib.request import urlopen, Request, HTTPError from urllib.request import urlopen, Request, HTTPError
......
...@@ -51,12 +51,10 @@ import copy ...@@ -51,12 +51,10 @@ import copy
from subprocess import Popen, PIPE, check_output from subprocess import Popen, PIPE, check_output
import re import re
from distutils.ccompiler import gen_preprocess_options, gen_lib_options
from distutils.unixccompiler import UnixCCompiler from distutils.unixccompiler import UnixCCompiler
from distutils.file_util import write_file from distutils.file_util import write_file
from distutils.errors import (DistutilsExecError, CCompilerError, from distutils.errors import (DistutilsExecError, CCompilerError,
CompileError, UnknownFileError) CompileError, UnknownFileError)
from distutils import log
from distutils.version import LooseVersion from distutils.version import LooseVersion
from distutils.spawn import find_executable from distutils.spawn import find_executable
......
...@@ -19,8 +19,7 @@ import re ...@@ -19,8 +19,7 @@ import re
from distutils.errors import DistutilsExecError, DistutilsPlatformError, \ from distutils.errors import DistutilsExecError, DistutilsPlatformError, \
CompileError, LibError, LinkError CompileError, LibError, LinkError
from distutils.ccompiler import CCompiler, gen_preprocess_options, \ from distutils.ccompiler import CCompiler, gen_lib_options
gen_lib_options
from distutils import log from distutils import log
from distutils.util import get_platform from distutils.util import get_platform
......
...@@ -13,7 +13,7 @@ from distutils.errors import \ ...@@ -13,7 +13,7 @@ from distutils.errors import \
DistutilsExecError, DistutilsPlatformError, \ DistutilsExecError, DistutilsPlatformError, \
CompileError, LibError, LinkError CompileError, LibError, LinkError
from distutils.ccompiler import \ from distutils.ccompiler import \
CCompiler, gen_preprocess_options, gen_lib_options CCompiler, gen_lib_options
from distutils import log from distutils import log
_can_read_reg = False _can_read_reg = False
......
...@@ -15,7 +15,6 @@ import re ...@@ -15,7 +15,6 @@ import re
import sys import sys
from .errors import DistutilsPlatformError from .errors import DistutilsPlatformError
from .util import get_platform, get_host_platform
# These are needed in a couple of spots, so just compute them once. # These are needed in a couple of spots, so just compute them once.
PREFIX = os.path.normpath(sys.prefix) PREFIX = os.path.normpath(sys.prefix)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment