]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
gh-84623: Remove unused imports in stdlib (#93773)
authorVictor Stinner <vstinner@python.org>
Mon, 13 Jun 2022 14:28:41 +0000 (16:28 +0200)
committerGitHub <noreply@github.com>
Mon, 13 Jun 2022 14:28:41 +0000 (16:28 +0200)
12 files changed:
Lib/asyncio/base_futures.py
Lib/asyncio/coroutines.py
Lib/asyncio/locks.py
Lib/asyncio/runners.py
Lib/asyncio/streams.py
Lib/distutils/sysconfig.py
Lib/idlelib/configdialog.py
Lib/idlelib/util.py
Lib/threading.py
Lib/tkinter/commondialog.py
Lib/urllib/parse.py
Lib/urllib/request.py

index cd811a788cb6df2601b35b5b5b1d069e6b39100f..7987963bd993492eb4b55e48307daad4762b6e2e 100644 (file)
@@ -1,7 +1,6 @@
 __all__ = ()
 
 import reprlib
-from _thread import get_ident
 
 from . import format_helpers
 
index 0e4b489f30fd7ca10a419d4e0fd9a3fa9087f02f..7fda0e449d500a05340f8b74ea43120b980f5961 100644 (file)
@@ -4,7 +4,6 @@ import collections.abc
 import inspect
 import os
 import sys
-import traceback
 import types
 
 
index e71130274dd6f3c67f6570985f545cb4fed47b64..42177f1c0799489ab92fef025cabf2d9c0f29ad4 100644 (file)
@@ -8,7 +8,6 @@ import enum
 
 from . import exceptions
 from . import mixins
-from . import tasks
 
 class _ContextManagerMixin:
     async def __aenter__(self):
index 065691bed99285827dfe28b9326bc942395daad4..f524c3b8e424f562f139d660e8a1022e46b8c9fe 100644 (file)
@@ -5,7 +5,6 @@ import enum
 import functools
 import threading
 import signal
-import sys
 from . import coroutines
 from . import events
 from . import exceptions
index a568c4e4b295f0f11919604f8182e192efe3bf53..9a169035de8865ff67d323e1ecd731c9a62820a4 100644 (file)
@@ -4,7 +4,6 @@ __all__ = (
 
 import socket
 import sys
-import warnings
 import weakref
 
 if hasattr(socket, 'AF_UNIX'):
index 3414a761e76b996db296033c4e8faba62b51ca19..041877512051b48db791c18bc28cdbd8fbb5546a 100644 (file)
@@ -9,7 +9,6 @@ Written by:   Fred L. Drake, Jr.
 Email:        <fdrake@acm.org>
 """
 
-import _imp
 import os
 import re
 import sys
index d5748a64a798b71890f5faa151f1041fe877135e..57eaffeef39625eec3e9d3b0f45c8d93b031910e 100644 (file)
@@ -11,7 +11,7 @@ Refer to comments in EditorWindow autoindent code for details.
 """
 import re
 
-from tkinter import (Toplevel, Listbox, Scale, Canvas,
+from tkinter import (Toplevel, Listbox, Canvas,
                      StringVar, BooleanVar, IntVar, TRUE, FALSE,
                      TOP, BOTTOM, RIGHT, LEFT, SOLID, GROOVE,
                      NONE, BOTH, X, Y, W, E, EW, NS, NSEW, NW,
index 5480219786bca663fad6163a9de77901697fcde3..ede670a4db5536028b6e263eafab40e56537cacf 100644 (file)
@@ -12,7 +12,6 @@ TODO:
     * std streams (pyshell, run),
     * warning stuff (pyshell, run).
 """
-from os import path
 
 # .pyw is for Windows; .pyi is for stub files.
 py_extensions = ('.py', '.pyw', '.pyi')  # Order needed for open/save dialogs.
index a3df587f10666cbb52497fcb4de6b20f5da5a9eb..e32ad1418d9dd789071d0f47fd148b595a89f87e 100644 (file)
@@ -7,7 +7,7 @@ import functools
 
 from time import monotonic as _time
 from _weakrefset import WeakSet
-from itertools import islice as _islice, count as _count
+from itertools import count as _count
 try:
     from _collections import deque as _deque
 except ImportError:
index e595c99defb9910fd67f1d8636d6a4aeb0f6a908..86f5387e001bf28a4c073b4e75316b8ac138845d 100644 (file)
@@ -10,7 +10,7 @@
 
 __all__ = ["Dialog"]
 
-from tkinter import Frame, _get_temp_root, _destroy_temp_root
+from tkinter import _get_temp_root, _destroy_temp_root
 
 
 class Dialog:
index d70a6943f0a73924ae56187db691792aa1f3ffc5..fd6d9f44c6268ccaa41461bf099988de804f7dd9 100644 (file)
@@ -30,7 +30,6 @@ test_urlparse.py provides a good indicator of parsing behavior.
 from collections import namedtuple
 import functools
 import re
-import sys
 import types
 import warnings
 
index 6d580a434a7bea01a745124352a7be1738bc6a7c..c352fb25ae2bc49aece1fa51cd9ac18f34a70e5a 100644 (file)
@@ -88,7 +88,6 @@ import hashlib
 import http.client
 import io
 import os
-import posixpath
 import re
 import socket
 import string