Skip to content

Commit

Permalink
pythongh-109653: Remove unused imports in the Lib/ directory (pytho…
Browse files Browse the repository at this point in the history
  • Loading branch information
AlexWaygood authored and Glyphack committed Jan 27, 2024
1 parent ad743bc commit 4638f8f
Show file tree
Hide file tree
Showing 20 changed files with 6 additions and 25 deletions.
1 change: 0 additions & 1 deletion Lib/asyncio/tasks.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@
import itertools
import math
import types
import warnings
import weakref
from types import GenericAlias

Expand Down
1 change: 0 additions & 1 deletion Lib/test/mapping_tests.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
# tests common to dict and UserDict
import unittest
import collections
import sys
from test.support import Py_C_RECURSION_LIMIT


Expand Down
2 changes: 1 addition & 1 deletion Lib/test/support/interpreters.py
Original file line number Diff line number Diff line change
Expand Up @@ -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,
)
Expand Down
1 change: 0 additions & 1 deletion Lib/test/test_asyncio/test_eager_task_factory.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
3 changes: 0 additions & 3 deletions Lib/test/test_capi/test_abstract.py
Original file line number Diff line number Diff line change
@@ -1,8 +1,5 @@
import unittest
import sys
from collections import OrderedDict
from test import support
from test.support import import_helper
import _testcapi


Expand Down
3 changes: 0 additions & 3 deletions Lib/test/test_capi/test_dict.py
Original file line number Diff line number Diff line change
@@ -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


Expand Down
2 changes: 1 addition & 1 deletion Lib/test/test_capi/test_misc.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion Lib/test/test_csv.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
1 change: 0 additions & 1 deletion Lib/test/test_decimal.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
1 change: 0 additions & 1 deletion Lib/test/test_dictviews.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
import collections.abc
import copy
import pickle
import sys
import unittest
from test.support import Py_C_RECURSION_LIMIT

Expand Down
1 change: 0 additions & 1 deletion Lib/test/test_gdb.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
# Lib/test/test_jit_gdb.py

import os
import platform
import re
import subprocess
import sys
Expand Down
1 change: 0 additions & 1 deletion Lib/test/test_importlib/import_/test_packages.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
from test.test_importlib import util
import sys
import unittest
from test import support
from test.support import import_helper


Expand Down
1 change: 0 additions & 1 deletion Lib/test/test_peg_generator/__init__.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import os.path
import unittest
from test import support
from test.support import load_package_tests

Expand Down
3 changes: 1 addition & 2 deletions Lib/test/test_pyexpat.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
# handler, are obscure and unhelpful.

import os
import platform
import sys
import sysconfig
import unittest
Expand All @@ -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):
Expand Down
1 change: 0 additions & 1 deletion Lib/test/test_sqlite3/test_dump.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
# Author: Paul Kippes <[email protected]>

import unittest
import sqlite3 as sqlite

from .util import memory_database
from .util import MemoryDatabaseMixin
Expand Down
2 changes: 1 addition & 1 deletion Lib/test/test_sqlite3/test_userfunctions.py
Original file line number Diff line number Diff line change
Expand Up @@ -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():
Expand Down
1 change: 0 additions & 1 deletion Lib/test/test_sqlite3/util.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
import re
import sqlite3
import test.support
import unittest


# Helper for temporary memory databases
Expand Down
1 change: 0 additions & 1 deletion Lib/test/test_tkinter/support.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import functools
import tkinter
import unittest

class AbstractTkTest:

Expand Down
2 changes: 1 addition & 1 deletion Lib/test/test_unittest/testmock/testthreadingmock.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
1 change: 0 additions & 1 deletion Lib/test/test_zlib.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
from test.support import import_helper
import binascii
import copy
import os
import pickle
import random
import sys
Expand Down

0 comments on commit 4638f8f

Please sign in to comment.