From e11ce06512078bb8119d0aadc69c84f27a8c3591 Mon Sep 17 00:00:00 2001 From: Victor Stinner Date: Mon, 13 Jun 2022 15:35:49 +0200 Subject: [PATCH 1/3] gh:84623: Remove unused imports in tests --- Lib/test/datetimetester.py | 1 - Lib/test/libregrtest/setup.py | 2 +- Lib/test/list_tests.py | 3 +-- Lib/test/lock_tests.py | 1 - Lib/test/test_asyncio/test_events.py | 1 - Lib/test/test_asyncio/test_runners.py | 1 - Lib/test/test_asyncio/test_sock_lowlevel.py | 2 +- Lib/test/test_asyncio/test_tasks.py | 4 ---- Lib/test/test_asyncio/test_timeouts.py | 1 - Lib/test/test_atexit.py | 1 - Lib/test/test_binascii.py | 2 +- Lib/test/test_bufio.py | 1 - Lib/test/test_codecs.py | 1 - Lib/test/test_decorators.py | 1 - Lib/test/test_defaultdict.py | 2 -- Lib/test/test_descr.py | 1 - Lib/test/test_email/test_email.py | 3 +-- Lib/test/test_exception_group.py | 1 - Lib/test/test_exceptions.py | 1 - Lib/test/test_extcall.py | 1 - Lib/test/test_float.py | 1 - Lib/test/test_flufl.py | 1 - Lib/test/test_functools.py | 2 -- Lib/test/test_future.py | 1 - Lib/test/test_getpath.py | 1 - Lib/test/test_heapq.py | 1 - Lib/test/test_http_cookiejar.py | 1 - Lib/test/test_imaplib.py | 4 +--- Lib/test/test_importlib/test_abc.py | 1 - Lib/test/test_importlib/test_api.py | 1 - Lib/test/test_launcher.py | 1 - Lib/test/test_lltrace.py | 1 - Lib/test/test_mailcap.py | 1 - Lib/test/test_nis.py | 1 - Lib/test/test_regrtest.py | 1 - Lib/test/test_select.py | 1 - Lib/test/test_shelve.py | 2 -- Lib/test/test_site.py | 3 +-- Lib/test/test_sqlite3/__init__.py | 1 - Lib/test/test_sysconfig.py | 1 - Lib/test/test_tcl.py | 3 --- Lib/test/test_threading_local.py | 1 - Lib/test/test_tools/test_md5sum.py | 1 - Lib/test/test_tools/test_pathfix.py | 1 - Lib/test/test_tools/test_pindent.py | 1 - Lib/test/test_traceback.py | 1 - Lib/test/test_type_comments.py | 1 - Lib/test/test_univnewlines.py | 1 - Lib/test/test_urllib2.py | 1 - Lib/test/test_venv.py | 2 +- 50 files changed, 8 insertions(+), 63 deletions(-) diff --git a/Lib/test/datetimetester.py b/Lib/test/datetimetester.py index 8e4bcc7c9efdca..311f9db10ffefa 100644 --- a/Lib/test/datetimetester.py +++ b/Lib/test/datetimetester.py @@ -7,7 +7,6 @@ import bisect import copy import decimal -import functools import sys import os import pickle diff --git a/Lib/test/libregrtest/setup.py b/Lib/test/libregrtest/setup.py index cfc1b82d2785cb..4298c922723407 100644 --- a/Lib/test/libregrtest/setup.py +++ b/Lib/test/libregrtest/setup.py @@ -141,7 +141,7 @@ def _adjust_resource_limits(): """Adjust the system resource limits (ulimit) if needed.""" try: import resource - from resource import RLIMIT_NOFILE, RLIM_INFINITY + from resource import RLIMIT_NOFILE except ImportError: return fd_limit, max_fds = resource.getrlimit(RLIMIT_NOFILE) diff --git a/Lib/test/list_tests.py b/Lib/test/list_tests.py index f7eea88c54a6ae..fe3ee80b8d461f 100644 --- a/Lib/test/list_tests.py +++ b/Lib/test/list_tests.py @@ -3,10 +3,9 @@ """ import sys -import os from functools import cmp_to_key -from test import support, seq_tests +from test import seq_tests from test.support import ALWAYS_EQ, NEVER_EQ diff --git a/Lib/test/lock_tests.py b/Lib/test/lock_tests.py index f16c7ed952cf55..a4f52cb20ad301 100644 --- a/Lib/test/lock_tests.py +++ b/Lib/test/lock_tests.py @@ -2,7 +2,6 @@ Various tests for synchronization primitives. """ -import os import gc import sys import time diff --git a/Lib/test/test_asyncio/test_events.py b/Lib/test/test_asyncio/test_events.py index 05d9107b28e2ae..80d7152128c469 100644 --- a/Lib/test/test_asyncio/test_events.py +++ b/Lib/test/test_asyncio/test_events.py @@ -29,7 +29,6 @@ import asyncio from asyncio import coroutines from asyncio import events -from asyncio import proactor_events from asyncio import selector_events from test.test_asyncio import utils as test_utils from test import support diff --git a/Lib/test/test_asyncio/test_runners.py b/Lib/test/test_asyncio/test_runners.py index 957cfe41eff85d..94d449f4791844 100644 --- a/Lib/test/test_asyncio/test_runners.py +++ b/Lib/test/test_asyncio/test_runners.py @@ -1,7 +1,6 @@ import _thread import asyncio import contextvars -import gc import re import signal import threading diff --git a/Lib/test/test_asyncio/test_sock_lowlevel.py b/Lib/test/test_asyncio/test_sock_lowlevel.py index db47616d18343e..b829fd4cc69fff 100644 --- a/Lib/test/test_asyncio/test_sock_lowlevel.py +++ b/Lib/test/test_asyncio/test_sock_lowlevel.py @@ -5,7 +5,7 @@ from asyncio import proactor_events from itertools import cycle, islice -from unittest.mock import patch, Mock +from unittest.mock import Mock from test.test_asyncio import utils as test_utils from test import support from test.support import socket_helper diff --git a/Lib/test/test_asyncio/test_tasks.py b/Lib/test/test_asyncio/test_tasks.py index 6458859db2d127..69cecb3ab12070 100644 --- a/Lib/test/test_asyncio/test_tasks.py +++ b/Lib/test/test_asyncio/test_tasks.py @@ -1,22 +1,18 @@ """Tests for tasks.py.""" import collections -import contextlib import contextvars -import functools import gc import io import random import re import sys -import textwrap import traceback import unittest from unittest import mock from types import GenericAlias import asyncio -from asyncio import coroutines from asyncio import futures from asyncio import tasks from test.test_asyncio import utils as test_utils diff --git a/Lib/test/test_asyncio/test_timeouts.py b/Lib/test/test_asyncio/test_timeouts.py index ef1ab0acb390d2..9801541e55b7f8 100644 --- a/Lib/test/test_asyncio/test_timeouts.py +++ b/Lib/test/test_asyncio/test_timeouts.py @@ -4,7 +4,6 @@ import time import asyncio -from asyncio import tasks def tearDownModule(): diff --git a/Lib/test/test_atexit.py b/Lib/test/test_atexit.py index 7ac063cfc78d3a..913b7556be83af 100644 --- a/Lib/test/test_atexit.py +++ b/Lib/test/test_atexit.py @@ -1,6 +1,5 @@ import atexit import os -import sys import textwrap import unittest from test import support diff --git a/Lib/test/test_binascii.py b/Lib/test/test_binascii.py index 7087d7a471d3f4..a2d7d0293ce1ae 100644 --- a/Lib/test/test_binascii.py +++ b/Lib/test/test_binascii.py @@ -4,7 +4,7 @@ import binascii import array import re -from test.support import bigmemtest, _1G, _4G, warnings_helper +from test.support import bigmemtest, _1G, _4G # Note: "*_hex" functions are aliases for "(un)hexlify" diff --git a/Lib/test/test_bufio.py b/Lib/test/test_bufio.py index 17151b13615e94..dc9a82dc635318 100644 --- a/Lib/test/test_bufio.py +++ b/Lib/test/test_bufio.py @@ -1,5 +1,4 @@ import unittest -from test import support from test.support import os_helper import io # C implementation. diff --git a/Lib/test/test_codecs.py b/Lib/test/test_codecs.py index 42c600dcb00de1..57f3648eb7017c 100644 --- a/Lib/test/test_codecs.py +++ b/Lib/test/test_codecs.py @@ -9,7 +9,6 @@ from test import support from test.support import os_helper -from test.support import warnings_helper try: import _testcapi diff --git a/Lib/test/test_decorators.py b/Lib/test/test_decorators.py index a6baa3ad1dd6b3..4b492178c1581f 100644 --- a/Lib/test/test_decorators.py +++ b/Lib/test/test_decorators.py @@ -1,4 +1,3 @@ -from test import support import unittest from types import MethodType diff --git a/Lib/test/test_defaultdict.py b/Lib/test/test_defaultdict.py index 68fc449780a3db..bdbe9b81e8fb3f 100644 --- a/Lib/test/test_defaultdict.py +++ b/Lib/test/test_defaultdict.py @@ -1,9 +1,7 @@ """Unit tests for collections.defaultdict.""" -import os import copy import pickle -import tempfile import unittest from collections import defaultdict diff --git a/Lib/test/test_descr.py b/Lib/test/test_descr.py index 9a09d8a9e3fe03..b5f1bd4af888d3 100644 --- a/Lib/test/test_descr.py +++ b/Lib/test/test_descr.py @@ -3563,7 +3563,6 @@ class MyInt(int): def test_str_of_str_subclass(self): # Testing __str__ defined in subclass of str ... import binascii - import io class octetstring(str): def __str__(self): diff --git a/Lib/test/test_email/test_email.py b/Lib/test/test_email/test_email.py index 2b1e2b864feda1..0bf679b4c56ca0 100644 --- a/Lib/test/test_email/test_email.py +++ b/Lib/test/test_email/test_email.py @@ -7,7 +7,6 @@ import base64 import unittest import textwrap -import warnings from io import StringIO, BytesIO from itertools import chain @@ -45,7 +44,7 @@ # These imports are documented to work, but we are testing them using a # different path, so we import them here just to make sure they are importable. -from email.parser import FeedParser, BytesFeedParser +from email.parser import FeedParser NL = '\n' EMPTYSTRING = '' diff --git a/Lib/test/test_exception_group.py b/Lib/test/test_exception_group.py index 2cfd8738304d1c..3ea5dff5c379af 100644 --- a/Lib/test/test_exception_group.py +++ b/Lib/test/test_exception_group.py @@ -1,5 +1,4 @@ import collections.abc -import traceback import types import unittest diff --git a/Lib/test/test_exceptions.py b/Lib/test/test_exceptions.py index ff1a02821a58fc..d91308572b27cc 100644 --- a/Lib/test/test_exceptions.py +++ b/Lib/test/test_exceptions.py @@ -1,7 +1,6 @@ # Python test set -- part 5, built-in exceptions import copy -import gc import os import sys import unittest diff --git a/Lib/test/test_extcall.py b/Lib/test/test_extcall.py index 13265ea0d8ce85..076ef0d7217f6f 100644 --- a/Lib/test/test_extcall.py +++ b/Lib/test/test_extcall.py @@ -522,7 +522,6 @@ import doctest import unittest -from test import support def load_tests(loader, tests, pattern): tests.addTest(doctest.DocTestSuite()) diff --git a/Lib/test/test_float.py b/Lib/test/test_float.py index d8c0fe1854eba5..672ec141155530 100644 --- a/Lib/test/test_float.py +++ b/Lib/test/test_float.py @@ -8,7 +8,6 @@ import unittest from test import support -from test.support import import_helper from test.test_grammar import (VALID_UNDERSCORE_LITERALS, INVALID_UNDERSCORE_LITERALS) from math import isinf, isnan, copysign, ldexp diff --git a/Lib/test/test_flufl.py b/Lib/test/test_flufl.py index a81a4d4c8f0e4c..fd264c926bd575 100644 --- a/Lib/test/test_flufl.py +++ b/Lib/test/test_flufl.py @@ -1,6 +1,5 @@ import __future__ import unittest -from test import support class FLUFLTests(unittest.TestCase): diff --git a/Lib/test/test_functools.py b/Lib/test/test_functools.py index 382e7dbffddf9d..767d2a9c1aea96 100644 --- a/Lib/test/test_functools.py +++ b/Lib/test/test_functools.py @@ -13,7 +13,6 @@ import typing import unittest import unittest.mock -import os import weakref import gc from weakref import proxy @@ -21,7 +20,6 @@ from test.support import import_helper from test.support import threading_helper -from test.support.script_helper import assert_python_ok import functools diff --git a/Lib/test/test_future.py b/Lib/test/test_future.py index c3e8420d6672c5..189cbdc4365b79 100644 --- a/Lib/test/test_future.py +++ b/Lib/test/test_future.py @@ -3,7 +3,6 @@ import __future__ import ast import unittest -from test import support from test.support import import_helper from textwrap import dedent import os diff --git a/Lib/test/test_getpath.py b/Lib/test/test_getpath.py index 5208374e20013c..1e46cb5780c942 100644 --- a/Lib/test/test_getpath.py +++ b/Lib/test/test_getpath.py @@ -2,7 +2,6 @@ import ntpath import pathlib import posixpath -import sys import unittest from test.support import verbose diff --git a/Lib/test/test_heapq.py b/Lib/test/test_heapq.py index cb1e4505b02a30..1aa8e4e289730d 100644 --- a/Lib/test/test_heapq.py +++ b/Lib/test/test_heapq.py @@ -4,7 +4,6 @@ import unittest import doctest -from test import support from test.support import import_helper from unittest import TestCase, skipUnless from operator import itemgetter diff --git a/Lib/test/test_http_cookiejar.py b/Lib/test/test_http_cookiejar.py index f0d205a60a4cad..f8291c2aa32cfe 100644 --- a/Lib/test/test_http_cookiejar.py +++ b/Lib/test/test_http_cookiejar.py @@ -4,7 +4,6 @@ import stat import sys import re -import test.support from test.support import os_helper from test.support import warnings_helper import time diff --git a/Lib/test/test_imaplib.py b/Lib/test/test_imaplib.py index ed26fa16d6ea8b..b554bc0c79960d 100644 --- a/Lib/test/test_imaplib.py +++ b/Lib/test/test_imaplib.py @@ -10,9 +10,7 @@ import threading import socket -from test.support import (verbose, - run_with_tz, run_with_locale, cpython_only, - requires_working_socket) +from test.support import verbose, run_with_tz, run_with_locale, cpython_only from test.support import hashlib_helper from test.support import threading_helper from test.support import warnings_helper diff --git a/Lib/test/test_importlib/test_abc.py b/Lib/test/test_importlib/test_abc.py index 92cb78067d0ebd..d59b663a43ed06 100644 --- a/Lib/test/test_importlib/test_abc.py +++ b/Lib/test/test_importlib/test_abc.py @@ -2,7 +2,6 @@ import marshal import os import sys -from test import support from test.support import import_helper import types import unittest diff --git a/Lib/test/test_importlib/test_api.py b/Lib/test/test_importlib/test_api.py index e94a48fe044ab5..b3a99dc2dd5731 100644 --- a/Lib/test/test_importlib/test_api.py +++ b/Lib/test/test_importlib/test_api.py @@ -6,7 +6,6 @@ import os.path import sys -from test import support from test.support import import_helper from test.support import os_helper import types diff --git a/Lib/test/test_launcher.py b/Lib/test/test_launcher.py index e9f6fcb7d7f245..cd7b944f98f586 100644 --- a/Lib/test/test_launcher.py +++ b/Lib/test/test_launcher.py @@ -7,7 +7,6 @@ import sys import sysconfig import tempfile -import textwrap import unittest from pathlib import Path from test import support diff --git a/Lib/test/test_lltrace.py b/Lib/test/test_lltrace.py index 5d175ce57b179e..7cf89846f8a727 100644 --- a/Lib/test/test_lltrace.py +++ b/Lib/test/test_lltrace.py @@ -1,5 +1,4 @@ import dis -import sys import textwrap import unittest diff --git a/Lib/test/test_mailcap.py b/Lib/test/test_mailcap.py index 8185f4a7806615..819dc80a266433 100644 --- a/Lib/test/test_mailcap.py +++ b/Lib/test/test_mailcap.py @@ -3,7 +3,6 @@ import sys import test.support import unittest -import warnings from test.support import os_helper from test.support import warnings_helper diff --git a/Lib/test/test_nis.py b/Lib/test/test_nis.py index 797c9023ad34d4..f327ecf3d1de45 100644 --- a/Lib/test/test_nis.py +++ b/Lib/test/test_nis.py @@ -1,4 +1,3 @@ -from test import support from test.support import import_helper import unittest import warnings diff --git a/Lib/test/test_regrtest.py b/Lib/test/test_regrtest.py index 4f632bb2f39543..133abf5044d424 100644 --- a/Lib/test/test_regrtest.py +++ b/Lib/test/test_regrtest.py @@ -15,7 +15,6 @@ import sysconfig import tempfile import textwrap -import time import unittest from test import libregrtest from test import support diff --git a/Lib/test/test_select.py b/Lib/test/test_select.py index ca2a9d9d24dabc..a82584d6904920 100644 --- a/Lib/test/test_select.py +++ b/Lib/test/test_select.py @@ -1,5 +1,4 @@ import errno -import os import select import subprocess import sys diff --git a/Lib/test/test_shelve.py b/Lib/test/test_shelve.py index b9eb007c827966..08c6562f2a273e 100644 --- a/Lib/test/test_shelve.py +++ b/Lib/test/test_shelve.py @@ -1,11 +1,9 @@ import unittest import dbm import shelve -import glob import pickle import os -from test import support from test.support import os_helper from collections.abc import MutableMapping from test.test_dbm import dbm_iterator diff --git a/Lib/test/test_site.py b/Lib/test/test_site.py index dd018d6b38a864..e66a2db7e9b3c4 100644 --- a/Lib/test/test_site.py +++ b/Lib/test/test_site.py @@ -10,10 +10,9 @@ from test.support import os_helper from test.support import socket_helper from test.support import captured_stderr -from test.support.os_helper import TESTFN, EnvironmentVarGuard, change_cwd +from test.support.os_helper import TESTFN, EnvironmentVarGuard import ast import builtins -import encodings import glob import io import os diff --git a/Lib/test/test_sqlite3/__init__.py b/Lib/test/test_sqlite3/__init__.py index 099c01e3b3cc70..c3cab8f0acdc0b 100644 --- a/Lib/test/test_sqlite3/__init__.py +++ b/Lib/test/test_sqlite3/__init__.py @@ -3,7 +3,6 @@ # Skip test if _sqlite3 module not installed. import_helper.import_module('_sqlite3') -import unittest import os import sqlite3 diff --git a/Lib/test/test_sysconfig.py b/Lib/test/test_sysconfig.py index 1679700f59296f..c00d7d5b5024f4 100644 --- a/Lib/test/test_sysconfig.py +++ b/Lib/test/test_sysconfig.py @@ -11,7 +11,6 @@ from test.support.import_helper import import_module from test.support.os_helper import (TESTFN, unlink, skip_unless_symlink, change_cwd) -from test.support.warnings_helper import check_warnings import sysconfig from sysconfig import (get_paths, get_platform, get_config_vars, diff --git a/Lib/test/test_tcl.py b/Lib/test/test_tcl.py index 548914796ed762..cd79024ab2c8e3 100644 --- a/Lib/test/test_tcl.py +++ b/Lib/test/test_tcl.py @@ -1,10 +1,7 @@ import unittest -import locale -import re import subprocess import sys import os -import warnings from test import support from test.support import import_helper from test.support import os_helper diff --git a/Lib/test/test_threading_local.py b/Lib/test/test_threading_local.py index 9888e631881fa6..48e302930ff7e9 100644 --- a/Lib/test/test_threading_local.py +++ b/Lib/test/test_threading_local.py @@ -4,7 +4,6 @@ from test import support from test.support import threading_helper import weakref -import gc # Modules under test import _thread diff --git a/Lib/test/test_tools/test_md5sum.py b/Lib/test/test_tools/test_md5sum.py index c5a230e95c2b7e..710461f8819754 100644 --- a/Lib/test/test_tools/test_md5sum.py +++ b/Lib/test/test_tools/test_md5sum.py @@ -1,6 +1,5 @@ """Tests for the md5sum script in the Tools directory.""" -import sys import os import unittest from test.support import os_helper diff --git a/Lib/test/test_tools/test_pathfix.py b/Lib/test/test_tools/test_pathfix.py index ff61935298b920..aa754bc479b468 100644 --- a/Lib/test/test_tools/test_pathfix.py +++ b/Lib/test/test_tools/test_pathfix.py @@ -2,7 +2,6 @@ import subprocess import sys import unittest -from test import support from test.support import os_helper from test.test_tools import scriptsdir, skip_if_missing diff --git a/Lib/test/test_tools/test_pindent.py b/Lib/test/test_tools/test_pindent.py index 01f13850eae733..61e97fea48cfba 100644 --- a/Lib/test/test_tools/test_pindent.py +++ b/Lib/test/test_tools/test_pindent.py @@ -5,7 +5,6 @@ import unittest import subprocess import textwrap -from test import support from test.support import os_helper from test.support.script_helper import assert_python_ok diff --git a/Lib/test/test_traceback.py b/Lib/test/test_traceback.py index ed5ddf95069e35..07472e29df45c3 100644 --- a/Lib/test/test_traceback.py +++ b/Lib/test/test_traceback.py @@ -14,7 +14,6 @@ from test.support.os_helper import TESTFN, unlink from test.support.script_helper import assert_python_ok, assert_python_failure -import os import textwrap import traceback from functools import partial diff --git a/Lib/test/test_type_comments.py b/Lib/test/test_type_comments.py index 71d1430dbc939d..668c1787f64d97 100644 --- a/Lib/test/test_type_comments.py +++ b/Lib/test/test_type_comments.py @@ -1,7 +1,6 @@ import ast import sys import unittest -from test import support funcdef = """\ diff --git a/Lib/test/test_univnewlines.py b/Lib/test/test_univnewlines.py index b905491878001c..ed2e0970bac949 100644 --- a/Lib/test/test_univnewlines.py +++ b/Lib/test/test_univnewlines.py @@ -4,7 +4,6 @@ import unittest import os import sys -from test import support from test.support import os_helper diff --git a/Lib/test/test_urllib2.py b/Lib/test/test_urllib2.py index 46a0ab1d83e60e..88270b7537b5e7 100644 --- a/Lib/test/test_urllib2.py +++ b/Lib/test/test_urllib2.py @@ -1,7 +1,6 @@ import unittest from test import support from test.support import os_helper -from test.support import socket_helper from test.support import warnings_helper from test import test_urllib diff --git a/Lib/test/test_venv.py b/Lib/test/test_venv.py index 37b61a780cb07b..e6a870fcf22008 100644 --- a/Lib/test/test_venv.py +++ b/Lib/test/test_venv.py @@ -15,7 +15,7 @@ import subprocess import sys import tempfile -from test.support import (captured_stdout, captured_stderr, requires_zlib, +from test.support import (captured_stdout, captured_stderr, skip_if_broken_multiprocessing_synchronize, verbose, requires_subprocess, is_emscripten, is_wasi, requires_venv_with_pip) From d3bed21d0507be1514db9b17f60b64380ff4c656 Mon Sep 17 00:00:00 2001 From: Victor Stinner Date: Mon, 13 Jun 2022 15:47:52 +0200 Subject: [PATCH 2/3] distutils and lib2to3 tests --- Lib/distutils/tests/test_bdist.py | 1 - Lib/distutils/tests/test_sysconfig.py | 1 - Lib/lib2to3/tests/test_all_fixers.py | 1 - 3 files changed, 3 deletions(-) diff --git a/Lib/distutils/tests/test_bdist.py b/Lib/distutils/tests/test_bdist.py index 241fc9ad75f34b..5676f7f34d4292 100644 --- a/Lib/distutils/tests/test_bdist.py +++ b/Lib/distutils/tests/test_bdist.py @@ -1,5 +1,4 @@ """Tests for distutils.command.bdist.""" -import os import unittest from test.support import run_unittest diff --git a/Lib/distutils/tests/test_sysconfig.py b/Lib/distutils/tests/test_sysconfig.py index 0664acade82cd1..270e91a98d0c4d 100644 --- a/Lib/distutils/tests/test_sysconfig.py +++ b/Lib/distutils/tests/test_sysconfig.py @@ -12,7 +12,6 @@ from distutils.tests import support from test.support import run_unittest, swap_item, requires_subprocess, is_wasi from test.support.os_helper import TESTFN -from test.support.warnings_helper import check_warnings class SysconfigTestCase(support.EnvironGuard, unittest.TestCase): diff --git a/Lib/lib2to3/tests/test_all_fixers.py b/Lib/lib2to3/tests/test_all_fixers.py index a265941490d5dc..d0fca7072482cb 100644 --- a/Lib/lib2to3/tests/test_all_fixers.py +++ b/Lib/lib2to3/tests/test_all_fixers.py @@ -7,7 +7,6 @@ # Python imports import os.path -import sys import test.support import unittest From b3433923ebb6d1848880b5e1c6454d9bb205aaa6 Mon Sep 17 00:00:00 2001 From: Victor Stinner Date: Mon, 13 Jun 2022 16:23:21 +0200 Subject: [PATCH 3/3] Revert test_extcall change --- Lib/test/test_extcall.py | 1 + 1 file changed, 1 insertion(+) diff --git a/Lib/test/test_extcall.py b/Lib/test/test_extcall.py index 076ef0d7217f6f..13265ea0d8ce85 100644 --- a/Lib/test/test_extcall.py +++ b/Lib/test/test_extcall.py @@ -522,6 +522,7 @@ import doctest import unittest +from test import support def load_tests(loader, tests, pattern): tests.addTest(doctest.DocTestSuite())