]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
gh-120417: Remove unused imports in tests (part 2) (#120630)
authorVictor Stinner <vstinner@python.org>
Mon, 17 Jun 2024 19:05:37 +0000 (21:05 +0200)
committerGitHub <noreply@github.com>
Mon, 17 Jun 2024 19:05:37 +0000 (21:05 +0200)
Lib/test/test_dbm_sqlite3.py
Lib/test/test_decorators.py
Lib/test/test_email/test_headerregistry.py
Lib/test/test_email/test_utils.py
Lib/test/test_ensurepip.py
Lib/test/test_fractions.py
Lib/test/test_frame.py
Lib/test/test_free_threading/test_str.py
Lib/test/test_free_threading/test_type.py
Lib/test/test_fstring.py

index 7a49fd2f924f8d32c0d4f28399f6a1bb664502f9..2e1f2d32924badbd13ed968dedbac38b18a5b230 100644 (file)
@@ -1,10 +1,9 @@
 import sys
-import test.support
 import unittest
 from contextlib import closing
 from functools import partial
 from pathlib import Path
-from test.support import cpython_only, import_helper, os_helper
+from test.support import import_helper, os_helper
 
 dbm_sqlite3 = import_helper.import_module("dbm.sqlite3")
 # N.B. The test will fail on some platforms without sqlite3
index 3a4fc959f6f8a72cdd905ebc62f3f2b62e60b6b6..78361be9fa1e6199aa93837d1140080265e688c5 100644 (file)
@@ -1,5 +1,5 @@
 import unittest
-from types import MethodType
+
 
 def funcattrs(**kwds):
     def decorate(func):
index 5a608a033c7e5412797140b6af4a4a6c54c7b61d..4c0523f410332f4596f45b9db4edbb4383c7b427 100644 (file)
@@ -7,7 +7,6 @@ from email.message import Message
 from test.test_email import TestEmailBase, parameterize
 from email import headerregistry
 from email.headerregistry import Address, Group
-from email.header import decode_header
 from test.support import ALWAYS_EQ
 
 
index 8556a93699d19420186370c1a250026a9477394d..4e6201e13c87f9e301a9b54abee614efd316c637 100644 (file)
@@ -3,9 +3,7 @@ from email import utils
 import test.support
 import time
 import unittest
-import sys
-import os.path
-import zoneinfo
+
 
 class DateTimeTests(unittest.TestCase):
 
index a4b36a90d8815eafc84b7810561987741fcbdb02..6d3c91b0b6d9f985e4567f592558f85bb68e2a2c 100644 (file)
@@ -6,7 +6,6 @@ import tempfile
 import test.support
 import unittest
 import unittest.mock
-from importlib.resources.abc import Traversable
 from pathlib import Path
 
 import ensurepip
index 71865f68eb0f12d0d2daa8b5803b7fd44d5b0365..589669298e22e263d9f1cefbf2d3033a1de4c97e 100644 (file)
@@ -1,6 +1,5 @@
 """Tests for Lib/fractions.py."""
 
-import cmath
 from decimal import Decimal
 from test.support import requires_IEEE_754
 import math
index aee8d374b22710a9c4d4af60875a9fe266ae39b3..42f93822a3df604d096bf07efe3c74991f23ad75 100644 (file)
@@ -1,11 +1,9 @@
 import copy
-import gc
 import operator
 import re
 import sys
 import textwrap
 import threading
-import types
 import unittest
 import weakref
 try:
@@ -14,7 +12,7 @@ except ImportError:
     _testcapi = None
 
 from test import support
-from test.support import import_helper, threading_helper, Py_GIL_DISABLED
+from test.support import import_helper, threading_helper
 from test.support.script_helper import assert_python_ok
 
 
index f5e93b7de0aa9b8485fab772c7ab2fa204497992..72044e979b0f481b19329d015964b3d8338ae2ff 100644 (file)
@@ -1,4 +1,3 @@
-import sys
 import unittest
 
 from itertools import cycle
index 1e84b2db2d48827cf4e15c9bbca335917157de96..75259795e81bcb476b4e5b7742da1aef36c0717f 100644 (file)
@@ -5,7 +5,7 @@ from concurrent.futures import ThreadPoolExecutor
 from threading import Thread
 from unittest import TestCase
 
-from test.support import threading_helper, import_helper
+from test.support import threading_helper
 
 
 
index 27c7f70cef32e390bb5edebd495c4c1b9f15955f..49c6f761e5b4f0b3dfe2bcefc534ffac855f5f6b 100644 (file)
@@ -14,7 +14,6 @@ import re
 import types
 import decimal
 import unittest
-import warnings
 from test import support
 from test.support.os_helper import temp_cwd
 from test.support.script_helper import assert_python_failure, assert_python_ok