gh-109653: Remove unused imports in the Lib/ directory (#109803)

This commit is contained in:
Alex Waygood 2023-09-24 15:07:23 +01:00 committed by GitHub
parent 649768fb67
commit 19601efa36
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
20 changed files with 6 additions and 25 deletions

View file

@ -17,7 +17,6 @@
import itertools
import math
import types
import warnings
import weakref
from types import GenericAlias

View file

@ -1,7 +1,6 @@
# tests common to dict and UserDict
import unittest
import collections
import sys
from test.support import Py_C_RECURSION_LIMIT

View file

@ -5,7 +5,7 @@
import _xxinterpchannels as _channels
# aliases:
from _xxsubinterpreters import is_shareable, RunFailedError
from _xxsubinterpreters import is_shareable
from _xxinterpchannels import (
ChannelError, ChannelNotFoundError, ChannelEmptyError,
)

View file

@ -7,7 +7,6 @@
from unittest import mock
from asyncio import tasks
from test.test_asyncio import utils as test_utils
import test.support
from test.support.script_helper import assert_python_ok
MOCK_ANY = mock.ANY

View file

@ -1,8 +1,5 @@
import unittest
import sys
from collections import OrderedDict
from test import support
from test.support import import_helper
import _testcapi

View file

@ -1,9 +1,6 @@
import unittest
import sys
from collections import OrderedDict, UserDict
from types import MappingProxyType
from test import support
from test.support import import_helper
import _testcapi

View file

@ -2,7 +2,7 @@
# these are all functions _testcapi exports whose name begins with 'test_'.
import _thread
from collections import OrderedDict, deque
from collections import deque
import contextlib
import importlib.machinery
import importlib.util

View file

@ -10,7 +10,7 @@
import gc
import pickle
from test import support
from test.support import warnings_helper, import_helper, check_disallow_instantiation
from test.support import import_helper, check_disallow_instantiation
from itertools import permutations
from textwrap import dedent
from collections import OrderedDict

View file

@ -41,7 +41,6 @@
darwin_malloc_err_warning, is_emscripten)
from test.support.import_helper import import_fresh_module
from test.support import threading_helper
from test.support import warnings_helper
import random
import inspect
import threading

View file

@ -1,7 +1,6 @@
import collections.abc
import copy
import pickle
import sys
import unittest
from test.support import Py_C_RECURSION_LIMIT

View file

@ -4,7 +4,6 @@
# Lib/test/test_jit_gdb.py
import os
import platform
import re
import subprocess
import sys

View file

@ -1,7 +1,6 @@
from test.test_importlib import util
import sys
import unittest
from test import support
from test.support import import_helper

View file

@ -1,5 +1,4 @@
import os.path
import unittest
from test import support
from test.support import load_package_tests

View file

@ -2,7 +2,6 @@
# handler, are obscure and unhelpful.
import os
import platform
import sys
import sysconfig
import unittest
@ -14,7 +13,7 @@
from xml.parsers import expat
from xml.parsers.expat import errors
from test.support import sortdict, is_emscripten, is_wasi
from test.support import sortdict
class SetAttributeTest(unittest.TestCase):

View file

@ -1,7 +1,6 @@
# Author: Paul Kippes <kippesp@gmail.com>
import unittest
import sqlite3 as sqlite
from .util import memory_database
from .util import MemoryDatabaseMixin

View file

@ -29,7 +29,7 @@
from test.support import bigmemtest, gc_collect
from .util import cx_limit, memory_database
from .util import with_tracebacks, check_tracebacks
from .util import with_tracebacks
def func_returntext():

View file

@ -4,7 +4,6 @@
import re
import sqlite3
import test.support
import unittest
# Helper for temporary memory databases

View file

@ -1,6 +1,5 @@
import functools
import tkinter
import unittest
class AbstractTkTest:

View file

@ -3,7 +3,7 @@
import concurrent.futures
from test.support import threading_helper
from unittest.mock import patch, ThreadingMock, call
from unittest.mock import patch, ThreadingMock
threading_helper.requires_working_threading(module=True)

View file

@ -3,7 +3,6 @@
from test.support import import_helper
import binascii
import copy
import os
import pickle
import random
import sys