Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

bpo-40443: Remove unused imports in distutils #19802

Merged
merged 1 commit into from
Apr 30, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 0 additions & 4 deletions Lib/distutils/_msvccompiler.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,6 @@
# ported to VS 2015 by Steve Dower

import os
import shutil
import stat
import subprocess
import winreg

Expand Down Expand Up @@ -65,8 +63,6 @@ def _find_vc2017():
If vswhere.exe is not available, by definition, VS 2017 is not
installed.
"""
import json

root = os.environ.get("ProgramFiles(x86)") or os.environ.get("ProgramFiles")
if not root:
return None, None
Expand Down
4 changes: 2 additions & 2 deletions Lib/distutils/bcppcompiler.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,10 @@

import os
from distutils.errors import \
DistutilsExecError, DistutilsPlatformError, \
DistutilsExecError, \
CompileError, LibError, LinkError, UnknownFileError
from distutils.ccompiler import \
CCompiler, gen_preprocess_options, gen_lib_options
CCompiler, gen_preprocess_options
from distutils.file_util import write_file
from distutils.dep_util import newer
from distutils import log
Expand Down
2 changes: 1 addition & 1 deletion Lib/distutils/ccompiler.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
from distutils.spawn import spawn
from distutils.file_util import move_file
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 import log

Expand Down
1 change: 0 additions & 1 deletion Lib/distutils/command/bdist_rpm.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@
import subprocess, sys, os
from distutils.core import Command
from distutils.debug import DEBUG
from distutils.util import get_platform
from distutils.file_util import write_file
from distutils.errors import *
from distutils.sysconfig import get_python_version
Expand Down
2 changes: 1 addition & 1 deletion Lib/distutils/command/bdist_wininst.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
import warnings
from distutils.core import Command
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.sysconfig import get_python_version
from distutils import log
Expand Down
1 change: 0 additions & 1 deletion Lib/distutils/command/check.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@
from docutils.parsers.rst import Parser
from docutils import frontend
from docutils import nodes
from io import StringIO

class SilentReporter(Reporter):

Expand Down
1 change: 0 additions & 1 deletion Lib/distutils/command/upload.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@

import os
import io
import platform
import hashlib
from base64 import standard_b64encode
from urllib.request import urlopen, Request, HTTPError
Expand Down
2 changes: 0 additions & 2 deletions Lib/distutils/cygwinccompiler.py
Original file line number Diff line number Diff line change
Expand Up @@ -51,12 +51,10 @@
from subprocess import Popen, PIPE, check_output
import re

from distutils.ccompiler import gen_preprocess_options, gen_lib_options
from distutils.unixccompiler import UnixCCompiler
from distutils.file_util import write_file
from distutils.errors import (DistutilsExecError, CCompilerError,
CompileError, UnknownFileError)
from distutils import log
from distutils.version import LooseVersion
from distutils.spawn import find_executable

Expand Down
3 changes: 1 addition & 2 deletions Lib/distutils/msvc9compiler.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,7 @@

from distutils.errors import DistutilsExecError, DistutilsPlatformError, \
CompileError, LibError, LinkError
from distutils.ccompiler import CCompiler, gen_preprocess_options, \
gen_lib_options
from distutils.ccompiler import CCompiler, gen_lib_options
from distutils import log
from distutils.util import get_platform

Expand Down
2 changes: 1 addition & 1 deletion Lib/distutils/msvccompiler.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
DistutilsExecError, DistutilsPlatformError, \
CompileError, LibError, LinkError
from distutils.ccompiler import \
CCompiler, gen_preprocess_options, gen_lib_options
CCompiler, gen_lib_options
from distutils import log

_can_read_reg = False
Expand Down
1 change: 0 additions & 1 deletion Lib/distutils/sysconfig.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@
import sys

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.
PREFIX = os.path.normpath(sys.prefix)
Expand Down