From 94d5f9827da4bf4b1e61c134fe29904b2b92f124 Mon Sep 17 00:00:00 2001 From: Victor Stinner Date: Tue, 6 Jun 2023 23:13:24 +0200 Subject: [PATCH] gh-105407: Remove unused imports in the stdlib (#105411) --- Lib/configparser.py | 1 - Lib/importlib/__init__.py | 2 -- Lib/importlib/metadata/__init__.py | 1 - Lib/turtle.py | 1 - Lib/unittest/main.py | 1 - 5 files changed, 6 deletions(-) diff --git a/Lib/configparser.py b/Lib/configparser.py index 9640f71adc7..682d9736cdc 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 707c081cb2c..f38fe5c1ab4 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 82e0ce1b281..5c09666b6a4 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 54f0efa4c06..e542bc95689 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 03963e0b1b2..d29a9f91fcc 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