Skip to content

Commit 259dd71

Browse files
authored
gh-84623: Remove unused imports in stdlib (#93773)
1 parent 65ac273 commit 259dd71

12 files changed

+3
-12
lines changed

Lib/asyncio/base_futures.py

-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
__all__ = ()
22

33
import reprlib
4-
from _thread import get_ident
54

65
from . import format_helpers
76

Lib/asyncio/coroutines.py

-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@
44
import inspect
55
import os
66
import sys
7-
import traceback
87
import types
98

109

Lib/asyncio/locks.py

-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@
88

99
from . import exceptions
1010
from . import mixins
11-
from . import tasks
1211

1312
class _ContextManagerMixin:
1413
async def __aenter__(self):

Lib/asyncio/runners.py

-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@
55
import functools
66
import threading
77
import signal
8-
import sys
98
from . import coroutines
109
from . import events
1110
from . import exceptions

Lib/asyncio/streams.py

-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@
44

55
import socket
66
import sys
7-
import warnings
87
import weakref
98

109
if hasattr(socket, 'AF_UNIX'):

Lib/distutils/sysconfig.py

-1
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@
99
1010
"""
1111

12-
import _imp
1312
import os
1413
import re
1514
import sys

Lib/idlelib/configdialog.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
"""
1212
import re
1313

14-
from tkinter import (Toplevel, Listbox, Scale, Canvas,
14+
from tkinter import (Toplevel, Listbox, Canvas,
1515
StringVar, BooleanVar, IntVar, TRUE, FALSE,
1616
TOP, BOTTOM, RIGHT, LEFT, SOLID, GROOVE,
1717
NONE, BOTH, X, Y, W, E, EW, NS, NSEW, NW,

Lib/idlelib/util.py

-1
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,6 @@
1212
* std streams (pyshell, run),
1313
* warning stuff (pyshell, run).
1414
"""
15-
from os import path
1615

1716
# .pyw is for Windows; .pyi is for stub files.
1817
py_extensions = ('.py', '.pyw', '.pyi') # Order needed for open/save dialogs.

Lib/threading.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77

88
from time import monotonic as _time
99
from _weakrefset import WeakSet
10-
from itertools import islice as _islice, count as _count
10+
from itertools import count as _count
1111
try:
1212
from _collections import deque as _deque
1313
except ImportError:

Lib/tkinter/commondialog.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010

1111
__all__ = ["Dialog"]
1212

13-
from tkinter import Frame, _get_temp_root, _destroy_temp_root
13+
from tkinter import _get_temp_root, _destroy_temp_root
1414

1515

1616
class Dialog:

Lib/urllib/parse.py

-1
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,6 @@
3030
from collections import namedtuple
3131
import functools
3232
import re
33-
import sys
3433
import types
3534
import warnings
3635

Lib/urllib/request.py

-1
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,6 @@
8888
import http.client
8989
import io
9090
import os
91-
import posixpath
9291
import re
9392
import socket
9493
import string

0 commit comments

Comments
 (0)