From: Victor Stinner Date: Tue, 6 Jun 2023 21:13:24 +0000 (+0200) Subject: gh-105407: Remove unused imports in the stdlib (#105411) X-Git-Tag: v3.13.0a1~1865 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=94d5f9827da4bf4b1e61c134fe29904b2b92f124;p=thirdparty%2FPython%2Fcpython.git gh-105407: Remove unused imports in the stdlib (#105411) --- diff --git a/Lib/configparser.py b/Lib/configparser.py index 9640f71adc77..682d9736cdc2 100644 --- a/Lib/configparser.py +++ b/Lib/configparser.py @@ -147,7 +147,6 @@ import itertools import os import re import sys -import warnings __all__ = ("NoSectionError", "DuplicateOptionError", "DuplicateSectionError", "NoOptionError", "InterpolationError", "InterpolationDepthError", diff --git a/Lib/importlib/__init__.py b/Lib/importlib/__init__.py index 707c081cb2c5..f38fe5c1ab46 100644 --- a/Lib/importlib/__init__.py +++ b/Lib/importlib/__init__.py @@ -54,8 +54,6 @@ _unpack_uint32 = _bootstrap_external._unpack_uint32 # Fully bootstrapped at this point, import whatever you like, circular # dependencies and startup overhead minimisation permitting :) -import warnings - # Public API ######################################################### diff --git a/Lib/importlib/metadata/__init__.py b/Lib/importlib/metadata/__init__.py index 82e0ce1b281c..5c09666b6a40 100644 --- a/Lib/importlib/metadata/__init__.py +++ b/Lib/importlib/metadata/__init__.py @@ -12,7 +12,6 @@ import warnings import functools import itertools import posixpath -import contextlib import collections import inspect diff --git a/Lib/turtle.py b/Lib/turtle.py index 54f0efa4c062..e542bc956897 100644 --- a/Lib/turtle.py +++ b/Lib/turtle.py @@ -104,7 +104,6 @@ import math import time import inspect import sys -import warnings from os.path import isfile, split, join from copy import deepcopy diff --git a/Lib/unittest/main.py b/Lib/unittest/main.py index 03963e0b1b2a..d29a9f91fcca 100644 --- a/Lib/unittest/main.py +++ b/Lib/unittest/main.py @@ -3,7 +3,6 @@ import sys import argparse import os -import warnings from . import loader, runner from .signals import installHandler