Skip to content

Commit 8f4ef3b

Browse files
authored
Remove unused imports in tests (GH-14518)
1 parent f9b7457 commit 8f4ef3b

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

53 files changed

+31
-84
lines changed

Lib/test/libregrtest/main.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -587,7 +587,6 @@ def create_temp_dir(self):
587587

588588
def cleanup(self):
589589
import glob
590-
import shutil
591590

592591
path = os.path.join(self.tmp_dir, 'test_python_*')
593592
print("Cleanup %s directory" % self.tmp_dir)

Lib/test/support/__init__.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@
66
import asyncio.events
77
import collections.abc
88
import contextlib
9-
import datetime
109
import errno
1110
import faulthandler
1211
import fnmatch
@@ -15,7 +14,6 @@
1514
import glob
1615
import importlib
1716
import importlib.util
18-
import io
1917
import logging.handlers
2018
import nntplib
2119
import os

Lib/test/test__xxsubinterpreters.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
import os
55
import pickle
66
import sys
7-
from textwrap import dedent, indent
7+
from textwrap import dedent
88
import threading
99
import time
1010
import unittest

Lib/test/test_argparse.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
# Author: Steven J. Bethard <steven.bethard@gmail.com>.
22

3-
import codecs
43
import inspect
54
import os
65
import shutil

Lib/test/test_asynchat.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@
77
import errno
88
import socket
99
import sys
10-
import _thread as thread
1110
import threading
1211
import time
1312
import unittest

Lib/test/test_asyncio/test_events.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,8 +26,6 @@
2626
import tty
2727

2828
import asyncio
29-
from asyncio import base_events
30-
from asyncio import constants
3129
from asyncio import coroutines
3230
from asyncio import events
3331
from asyncio import proactor_events

Lib/test/test_asyncio/test_pep492.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@
44
import types
55
import unittest
66

7-
from test import support
87
from unittest import mock
98

109
import asyncio

Lib/test/test_asyncio/test_proactor_events.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,9 @@
44
import socket
55
import unittest
66
import sys
7-
from collections import deque
87
from unittest import mock
98

109
import asyncio
11-
from asyncio import events
1210
from asyncio.proactor_events import BaseProactorEventLoop
1311
from asyncio.proactor_events import _ProactorSocketTransport
1412
from asyncio.proactor_events import _ProactorWritePipeTransport

Lib/test/test_asyncio/test_server.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
import asyncio
2-
import socket
32
import time
43
import threading
54
import unittest

Lib/test/test_asyncio/test_sslproto.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,6 @@
1515
from asyncio import log
1616
from asyncio import protocols
1717
from asyncio import sslproto
18-
from asyncio import tasks
1918
from test.test_asyncio import utils as test_utils
2019
from test.test_asyncio import functional as func_tests
2120

0 commit comments

Comments
 (0)