[Python-checkins] cpython: Remove unused imports.
serhiy.storchaka
python-checkins at python.org
Fri Dec 16 13:00:34 EST 2016
https://hg.python.org/cpython/rev/25b8b5cf8e2f
changeset: 105684:25b8b5cf8e2f
user: Serhiy Storchaka <storchaka at gmail.com>
date: Fri Dec 16 20:00:15 2016 +0200
summary:
Remove unused imports.
files:
Lib/asyncio/base_events.py | 1 -
Lib/http/client.py | 1 -
Lib/idlelib/idle_test/test_macosx.py | 1 -
Lib/idlelib/idle_test/test_tree.py | 1 -
Lib/idlelib/macosx.py | 1 -
Lib/idlelib/stackviewer.py | 1 -
Lib/lib2to3/pytree.py | 1 -
Lib/lib2to3/tests/__init__.py | 1 -
Lib/modulefinder.py | 1 -
Lib/socketserver.py | 1 -
Lib/test/support/script_helper.py | 3 ---
Lib/test/test_asyncgen.py | 1 -
Lib/test/test_asyncio/test_tasks.py | 1 -
Lib/test/test_asyncio/test_unix_events.py | 1 -
Lib/test/test_bz2.py | 1 -
Lib/test/test_cmd.py | 1 -
Lib/test/test_cmd_line.py | 1 -
Lib/test/test_configparser.py | 1 -
Lib/test/test_dbm_dumb.py | 1 -
Lib/test/test_decimal.py | 2 --
Lib/test/test_dis.py | 1 -
Lib/test/test_faulthandler.py | 1 -
Lib/test/test_frame.py | 2 --
Lib/test/test_import/__init__.py | 1 -
Lib/test/test_importlib/abc.py | 1 -
Lib/test/test_importlib/test_abc.py | 2 --
Lib/test/test_inspect.py | 3 ---
Lib/test/test_os.py | 1 -
Lib/test/test_peepholer.py | 3 ---
Lib/test/test_raise.py | 1 -
Lib/test/test_re.py | 3 ---
Lib/test/test_set.py | 1 -
Lib/test/test_shutil.py | 1 -
Lib/test/test_signal.py | 4 ----
Lib/test/test_ssl.py | 1 -
Lib/test/test_subclassinit.py | 1 -
Lib/test/test_super.py | 1 -
Lib/test/test_timeit.py | 1 -
Lib/test/test_unicode_identifiers.py | 1 -
Lib/test/test_winsound.py | 2 --
Lib/test/test_yield_from.py | 3 ---
Lib/urllib/request.py | 1 -
Lib/zipfile.py | 1 -
43 files changed, 0 insertions(+), 60 deletions(-)
diff --git a/Lib/asyncio/base_events.py b/Lib/asyncio/base_events.py
--- a/Lib/asyncio/base_events.py
+++ b/Lib/asyncio/base_events.py
@@ -16,7 +16,6 @@
import collections
import concurrent.futures
import heapq
-import inspect
import itertools
import logging
import os
diff --git a/Lib/http/client.py b/Lib/http/client.py
--- a/Lib/http/client.py
+++ b/Lib/http/client.py
@@ -72,7 +72,6 @@
import email.message
import http
import io
-import os
import re
import socket
import collections
diff --git a/Lib/idlelib/idle_test/test_macosx.py b/Lib/idlelib/idle_test/test_macosx.py
--- a/Lib/idlelib/idle_test/test_macosx.py
+++ b/Lib/idlelib/idle_test/test_macosx.py
@@ -4,7 +4,6 @@
'''
from idlelib import macosx
from test.support import requires
-import sys
import tkinter as tk
import unittest
import unittest.mock as mock
diff --git a/Lib/idlelib/idle_test/test_tree.py b/Lib/idlelib/idle_test/test_tree.py
--- a/Lib/idlelib/idle_test/test_tree.py
+++ b/Lib/idlelib/idle_test/test_tree.py
@@ -5,7 +5,6 @@
from idlelib import tree
from test.support import requires
requires('gui')
-import os
import unittest
from tkinter import Tk
diff --git a/Lib/idlelib/macosx.py b/Lib/idlelib/macosx.py
--- a/Lib/idlelib/macosx.py
+++ b/Lib/idlelib/macosx.py
@@ -2,7 +2,6 @@
A number of functions that enhance IDLE on Mac OSX.
"""
from sys import platform # Used in _init_tk_type, changed by test.
-import warnings
import tkinter
diff --git a/Lib/idlelib/stackviewer.py b/Lib/idlelib/stackviewer.py
--- a/Lib/idlelib/stackviewer.py
+++ b/Lib/idlelib/stackviewer.py
@@ -1,6 +1,5 @@
import linecache
import os
-import re
import sys
import tkinter as tk
diff --git a/Lib/lib2to3/pytree.py b/Lib/lib2to3/pytree.py
--- a/Lib/lib2to3/pytree.py
+++ b/Lib/lib2to3/pytree.py
@@ -13,7 +13,6 @@
__author__ = "Guido van Rossum <guido at python.org>"
import sys
-import warnings
from io import StringIO
HUGE = 0x7FFFFFFF # maximum repeat count, default max
diff --git a/Lib/lib2to3/tests/__init__.py b/Lib/lib2to3/tests/__init__.py
--- a/Lib/lib2to3/tests/__init__.py
+++ b/Lib/lib2to3/tests/__init__.py
@@ -1,7 +1,6 @@
# Author: Collin Winter
import os
-import unittest
from test.support import load_package_tests
diff --git a/Lib/modulefinder.py b/Lib/modulefinder.py
--- a/Lib/modulefinder.py
+++ b/Lib/modulefinder.py
@@ -7,7 +7,6 @@
import os
import sys
import types
-import struct
import warnings
with warnings.catch_warnings():
warnings.simplefilter('ignore', DeprecationWarning)
diff --git a/Lib/socketserver.py b/Lib/socketserver.py
--- a/Lib/socketserver.py
+++ b/Lib/socketserver.py
@@ -126,7 +126,6 @@
import socket
import selectors
import os
-import errno
import sys
try:
import threading
diff --git a/Lib/test/support/script_helper.py b/Lib/test/support/script_helper.py
--- a/Lib/test/support/script_helper.py
+++ b/Lib/test/support/script_helper.py
@@ -6,11 +6,8 @@
import sys
import os
import os.path
-import tempfile
import subprocess
import py_compile
-import contextlib
-import shutil
import zipfile
from importlib.util import source_from_cache
diff --git a/Lib/test/test_asyncgen.py b/Lib/test/test_asyncgen.py
--- a/Lib/test/test_asyncgen.py
+++ b/Lib/test/test_asyncgen.py
@@ -1,5 +1,4 @@
import inspect
-import sys
import types
import unittest
diff --git a/Lib/test/test_asyncio/test_tasks.py b/Lib/test/test_asyncio/test_tasks.py
--- a/Lib/test/test_asyncio/test_tasks.py
+++ b/Lib/test/test_asyncio/test_tasks.py
@@ -7,7 +7,6 @@
import os
import re
import sys
-import time
import types
import unittest
import weakref
diff --git a/Lib/test/test_asyncio/test_unix_events.py b/Lib/test/test_asyncio/test_unix_events.py
--- a/Lib/test/test_asyncio/test_unix_events.py
+++ b/Lib/test/test_asyncio/test_unix_events.py
@@ -12,7 +12,6 @@
import tempfile
import threading
import unittest
-import warnings
from unittest import mock
if sys.platform == 'win32':
diff --git a/Lib/test/test_bz2.py b/Lib/test/test_bz2.py
--- a/Lib/test/test_bz2.py
+++ b/Lib/test/test_bz2.py
@@ -10,7 +10,6 @@
import random
import shutil
import subprocess
-import sys
from test.support import unlink
import _compression
diff --git a/Lib/test/test_cmd.py b/Lib/test/test_cmd.py
--- a/Lib/test/test_cmd.py
+++ b/Lib/test/test_cmd.py
@@ -6,7 +6,6 @@
import cmd
import sys
-import re
import unittest
import io
from test import support
diff --git a/Lib/test/test_cmd_line.py b/Lib/test/test_cmd_line.py
--- a/Lib/test/test_cmd_line.py
+++ b/Lib/test/test_cmd_line.py
@@ -4,7 +4,6 @@
import test.support, unittest
import os
-import shutil
import sys
import subprocess
import tempfile
diff --git a/Lib/test/test_configparser.py b/Lib/test/test_configparser.py
--- a/Lib/test/test_configparser.py
+++ b/Lib/test/test_configparser.py
@@ -2,7 +2,6 @@
import configparser
import io
import os
-import sys
import textwrap
import unittest
import warnings
diff --git a/Lib/test/test_dbm_dumb.py b/Lib/test/test_dbm_dumb.py
--- a/Lib/test/test_dbm_dumb.py
+++ b/Lib/test/test_dbm_dumb.py
@@ -7,7 +7,6 @@
import os
import stat
import unittest
-import warnings
import dbm.dumb as dumbdbm
from test import support
from functools import partial
diff --git a/Lib/test/test_decimal.py b/Lib/test/test_decimal.py
--- a/Lib/test/test_decimal.py
+++ b/Lib/test/test_decimal.py
@@ -37,8 +37,6 @@
from test.support import (check_warnings, import_fresh_module, TestFailed,
run_with_locale, cpython_only)
import random
-import time
-import warnings
import inspect
try:
import threading
diff --git a/Lib/test/test_dis.py b/Lib/test/test_dis.py
--- a/Lib/test/test_dis.py
+++ b/Lib/test/test_dis.py
@@ -2,7 +2,6 @@
from test.support import captured_stdout
from test.bytecode_helper import BytecodeTestCase
-import difflib
import unittest
import sys
import dis
diff --git a/Lib/test/test_faulthandler.py b/Lib/test/test_faulthandler.py
--- a/Lib/test/test_faulthandler.py
+++ b/Lib/test/test_faulthandler.py
@@ -2,7 +2,6 @@
import datetime
import faulthandler
import os
-import re
import signal
import subprocess
import sys
diff --git a/Lib/test/test_frame.py b/Lib/test/test_frame.py
--- a/Lib/test/test_frame.py
+++ b/Lib/test/test_frame.py
@@ -1,5 +1,3 @@
-import gc
-import sys
import types
import unittest
import weakref
diff --git a/Lib/test/test_import/__init__.py b/Lib/test/test_import/__init__.py
--- a/Lib/test/test_import/__init__.py
+++ b/Lib/test/test_import/__init__.py
@@ -14,7 +14,6 @@
import unittest.mock as mock
import textwrap
import errno
-import shutil
import contextlib
import test.support
diff --git a/Lib/test/test_importlib/abc.py b/Lib/test/test_importlib/abc.py
--- a/Lib/test/test_importlib/abc.py
+++ b/Lib/test/test_importlib/abc.py
@@ -1,5 +1,4 @@
import abc
-import unittest
class FinderTests(metaclass=abc.ABCMeta):
diff --git a/Lib/test/test_importlib/test_abc.py b/Lib/test/test_importlib/test_abc.py
--- a/Lib/test/test_importlib/test_abc.py
+++ b/Lib/test/test_importlib/test_abc.py
@@ -1,5 +1,3 @@
-import contextlib
-import inspect
import io
import marshal
import os
diff --git a/Lib/test/test_inspect.py b/Lib/test/test_inspect.py
--- a/Lib/test/test_inspect.py
+++ b/Lib/test/test_inspect.py
@@ -10,7 +10,6 @@
from os.path import normcase
import _pickle
import pickle
-import re
import shutil
import sys
import types
@@ -56,8 +55,6 @@
def revise(filename, *args):
return (normcase(filename),) + args
-import builtins
-
git = mod.StupidGit()
class IsTestBase(unittest.TestCase):
diff --git a/Lib/test/test_os.py b/Lib/test/test_os.py
--- a/Lib/test/test_os.py
+++ b/Lib/test/test_os.py
@@ -15,7 +15,6 @@
import mmap
import os
import pickle
-import re
import shutil
import signal
import socket
diff --git a/Lib/test/test_peepholer.py b/Lib/test/test_peepholer.py
--- a/Lib/test/test_peepholer.py
+++ b/Lib/test/test_peepholer.py
@@ -1,7 +1,4 @@
import dis
-import re
-import sys
-import textwrap
import unittest
from test.bytecode_helper import BytecodeTestCase
diff --git a/Lib/test/test_raise.py b/Lib/test/test_raise.py
--- a/Lib/test/test_raise.py
+++ b/Lib/test/test_raise.py
@@ -4,7 +4,6 @@
"""Tests for the raise statement."""
from test import support
-import re
import sys
import types
import unittest
diff --git a/Lib/test/test_re.py b/Lib/test/test_re.py
--- a/Lib/test/test_re.py
+++ b/Lib/test/test_re.py
@@ -1,12 +1,9 @@
from test.support import verbose, run_unittest, gc_collect, bigmemtest, _2G, \
cpython_only, captured_stdout
-import io
import locale
import re
import sre_compile
import string
-import sys
-import traceback
import unittest
import warnings
from re import Scanner
diff --git a/Lib/test/test_set.py b/Lib/test/test_set.py
--- a/Lib/test/test_set.py
+++ b/Lib/test/test_set.py
@@ -10,7 +10,6 @@
import collections
import collections.abc
import itertools
-import string
class PassThru(Exception):
pass
diff --git a/Lib/test/test_shutil.py b/Lib/test/test_shutil.py
--- a/Lib/test/test_shutil.py
+++ b/Lib/test/test_shutil.py
@@ -20,7 +20,6 @@
SameFileError)
import tarfile
import zipfile
-import warnings
from test import support
from test.support import (TESTFN, check_warnings, captured_stdout,
diff --git a/Lib/test/test_signal.py b/Lib/test/test_signal.py
--- a/Lib/test/test_signal.py
+++ b/Lib/test/test_signal.py
@@ -1,15 +1,11 @@
import unittest
from test import support
from contextlib import closing
-import enum
-import gc
-import pickle
import select
import signal
import socket
import struct
import subprocess
-import traceback
import sys, os, time, errno
from test.support.script_helper import assert_python_ok, spawn_python
try:
diff --git a/Lib/test/test_ssl.py b/Lib/test/test_ssl.py
--- a/Lib/test/test_ssl.py
+++ b/Lib/test/test_ssl.py
@@ -11,7 +11,6 @@
import os
import errno
import pprint
-import tempfile
import urllib.request
import traceback
import asyncore
diff --git a/Lib/test/test_subclassinit.py b/Lib/test/test_subclassinit.py
--- a/Lib/test/test_subclassinit.py
+++ b/Lib/test/test_subclassinit.py
@@ -1,4 +1,3 @@
-import sys
import types
import unittest
diff --git a/Lib/test/test_super.py b/Lib/test/test_super.py
--- a/Lib/test/test_super.py
+++ b/Lib/test/test_super.py
@@ -1,6 +1,5 @@
"""Unit tests for zero-argument super() & related machinery."""
-import sys
import unittest
import warnings
from test.support import check_warnings
diff --git a/Lib/test/test_timeit.py b/Lib/test/test_timeit.py
--- a/Lib/test/test_timeit.py
+++ b/Lib/test/test_timeit.py
@@ -2,7 +2,6 @@
import unittest
import sys
import io
-import time
from textwrap import dedent
from test.support import captured_stdout
diff --git a/Lib/test/test_unicode_identifiers.py b/Lib/test/test_unicode_identifiers.py
--- a/Lib/test/test_unicode_identifiers.py
+++ b/Lib/test/test_unicode_identifiers.py
@@ -1,5 +1,4 @@
import unittest
-import sys
class PEP3131Test(unittest.TestCase):
diff --git a/Lib/test/test_winsound.py b/Lib/test/test_winsound.py
--- a/Lib/test/test_winsound.py
+++ b/Lib/test/test_winsound.py
@@ -1,8 +1,6 @@
# Ridiculously simple test of the winsound module for Windows.
import functools
-import os
-import subprocess
import time
import unittest
diff --git a/Lib/test/test_yield_from.py b/Lib/test/test_yield_from.py
--- a/Lib/test/test_yield_from.py
+++ b/Lib/test/test_yield_from.py
@@ -8,10 +8,7 @@
"""
import unittest
-import io
-import sys
import inspect
-import parser
from test.support import captured_stderr, disable_gc, gc_collect
diff --git a/Lib/urllib/request.py b/Lib/urllib/request.py
--- a/Lib/urllib/request.py
+++ b/Lib/urllib/request.py
@@ -94,7 +94,6 @@
import string
import sys
import time
-import collections
import tempfile
import contextlib
import warnings
diff --git a/Lib/zipfile.py b/Lib/zipfile.py
--- a/Lib/zipfile.py
+++ b/Lib/zipfile.py
@@ -5,7 +5,6 @@
"""
import io
import os
-import re
import importlib.util
import sys
import time
--
Repository URL: https://hg.python.org/cpython
More information about the Python-checkins
mailing list