From 90549676e063c2c818cfc14213d3adb7edcc2bd5 Mon Sep 17 00:00:00 2001 From: Victor Stinner Date: Thu, 30 Apr 2020 11:26:33 +0200 Subject: [PATCH] bpo-40443: Remove unused imports in the stdlib (GH-19803) --- Lib/asyncio/events.py | 1 - Lib/asyncio/sslproto.py | 1 - Lib/bz2.py | 1 - Lib/concurrent/futures/process.py | 1 - Lib/concurrent/futures/thread.py | 1 - Lib/ctypes/test/test_loading.py | 1 - Lib/modulefinder.py | 2 -- Lib/plistlib.py | 2 -- Lib/xml/dom/xmlbuilder.py | 1 - Lib/zipfile.py | 1 - 10 files changed, 12 deletions(-) diff --git a/Lib/asyncio/events.py b/Lib/asyncio/events.py index 16a6cfd438b..70017cb86a0 100644 --- a/Lib/asyncio/events.py +++ b/Lib/asyncio/events.py @@ -19,7 +19,6 @@ import sys import threading from . import format_helpers -from . import exceptions class Handle: diff --git a/Lib/asyncio/sslproto.py b/Lib/asyncio/sslproto.py index 3eca6b4a391..cad25b26539 100644 --- a/Lib/asyncio/sslproto.py +++ b/Lib/asyncio/sslproto.py @@ -5,7 +5,6 @@ try: except ImportError: # pragma: no cover ssl = None -from . import base_events from . import constants from . import protocols from . import transports diff --git a/Lib/bz2.py b/Lib/bz2.py index e094fbb548b..ce07ebeb142 100644 --- a/Lib/bz2.py +++ b/Lib/bz2.py @@ -12,7 +12,6 @@ __author__ = "Nadeem Vawda " from builtins import open as _builtin_open import io import os -import warnings import _compression from threading import RLock diff --git a/Lib/concurrent/futures/process.py b/Lib/concurrent/futures/process.py index a76e2c9cf23..90bc98bf2ec 100644 --- a/Lib/concurrent/futures/process.py +++ b/Lib/concurrent/futures/process.py @@ -45,7 +45,6 @@ Process #1..n: __author__ = 'Brian Quinlan (brian@sweetapp.com)' -import atexit import os from concurrent.futures import _base import queue diff --git a/Lib/concurrent/futures/thread.py b/Lib/concurrent/futures/thread.py index 2810b357bc1..b7a2cac7f57 100644 --- a/Lib/concurrent/futures/thread.py +++ b/Lib/concurrent/futures/thread.py @@ -5,7 +5,6 @@ __author__ = 'Brian Quinlan (brian@sweetapp.com)' -import atexit from concurrent.futures import _base import itertools import queue diff --git a/Lib/ctypes/test/test_loading.py b/Lib/ctypes/test/test_loading.py index 5c48b0db4c3..ba655bceb8b 100644 --- a/Lib/ctypes/test/test_loading.py +++ b/Lib/ctypes/test/test_loading.py @@ -3,7 +3,6 @@ import os import shutil import subprocess import sys -import sysconfig import unittest import test.support from ctypes.util import find_library diff --git a/Lib/modulefinder.py b/Lib/modulefinder.py index aadcd23edba..cb455f40c4d 100644 --- a/Lib/modulefinder.py +++ b/Lib/modulefinder.py @@ -7,8 +7,6 @@ import marshal import os import io import sys -import types -import warnings LOAD_CONST = dis.opmap['LOAD_CONST'] diff --git a/Lib/plistlib.py b/Lib/plistlib.py index a84bb57371e..aff5fe36ca3 100644 --- a/Lib/plistlib.py +++ b/Lib/plistlib.py @@ -51,7 +51,6 @@ __all__ = [ import binascii import codecs -import contextlib import datetime import enum from io import BytesIO @@ -59,7 +58,6 @@ import itertools import os import re import struct -from warnings import warn from xml.parsers.expat import ParserCreate diff --git a/Lib/xml/dom/xmlbuilder.py b/Lib/xml/dom/xmlbuilder.py index 213ab14551c..8a200263497 100644 --- a/Lib/xml/dom/xmlbuilder.py +++ b/Lib/xml/dom/xmlbuilder.py @@ -1,7 +1,6 @@ """Implementation of the DOM Level 3 'LS-Load' feature.""" import copy -import warnings import xml.dom from xml.dom.NodeFilter import NodeFilter diff --git a/Lib/zipfile.py b/Lib/zipfile.py index c3f814cc747..8903d6a42ee 100644 --- a/Lib/zipfile.py +++ b/Lib/zipfile.py @@ -4,7 +4,6 @@ Read and write ZIP files. XXX references to utf-8 need further investigation. """ import binascii -import functools import importlib.util import io import itertools