[Python-checkins] bpo-35202: Remove unused imports in Lib directory. (GH-10446)

Serhiy Storchaka webhook-mailer at python.org
Sat Nov 10 02:22:05 EST 2018


https://github.com/python/cpython/commit/b9498e2367f21205ed2b9c172665ea6f0a218d27
commit: b9498e2367f21205ed2b9c172665ea6f0a218d27
branch: master
author: Srinivas  Thatiparthy (శ్రీనివాస్  తాటిపర్తి) <thatiparthysreenivas at gmail.com>
committer: Serhiy Storchaka <storchaka at gmail.com>
date: 2018-11-10T09:22:02+02:00
summary:

bpo-35202: Remove unused imports in Lib directory. (GH-10446)

files:
M Lib/lib2to3/pgen2/driver.py
M Lib/lib2to3/pgen2/grammar.py
M Lib/multiprocessing/popen_fork.py
M Lib/test/test_collections.py
M Lib/test/test_queue.py
M Lib/test/test_sys.py
M Lib/test/test_thread.py

diff --git a/Lib/lib2to3/pgen2/driver.py b/Lib/lib2to3/pgen2/driver.py
index cbc58e759d53..6471635a3192 100644
--- a/Lib/lib2to3/pgen2/driver.py
+++ b/Lib/lib2to3/pgen2/driver.py
@@ -16,7 +16,6 @@
 __all__ = ["Driver", "load_grammar"]
 
 # Python imports
-import codecs
 import io
 import os
 import logging
diff --git a/Lib/lib2to3/pgen2/grammar.py b/Lib/lib2to3/pgen2/grammar.py
index c00cb2248d56..a1da546eee20 100644
--- a/Lib/lib2to3/pgen2/grammar.py
+++ b/Lib/lib2to3/pgen2/grammar.py
@@ -13,7 +13,6 @@
 """
 
 # Python imports
-import collections
 import pickle
 
 # Local imports
diff --git a/Lib/multiprocessing/popen_fork.py b/Lib/multiprocessing/popen_fork.py
index 008b97b36628..685e8daf77ca 100644
--- a/Lib/multiprocessing/popen_fork.py
+++ b/Lib/multiprocessing/popen_fork.py
@@ -1,5 +1,4 @@
 import os
-import sys
 import signal
 
 from . import util
diff --git a/Lib/test/test_collections.py b/Lib/test/test_collections.py
index 200e0273c33e..e2ffaaafd454 100644
--- a/Lib/test/test_collections.py
+++ b/Lib/test/test_collections.py
@@ -3,11 +3,9 @@
 import collections
 import copy
 import doctest
-import keyword
 import operator
 import pickle
 from random import choice, randrange
-import re
 import string
 import sys
 from test import support
diff --git a/Lib/test/test_queue.py b/Lib/test/test_queue.py
index 1a8d5f8856c5..c8528f97741d 100644
--- a/Lib/test/test_queue.py
+++ b/Lib/test/test_queue.py
@@ -1,10 +1,8 @@
 # Some simple queue module tests, plus some failure conditions
 # to ensure the Queue locks remain stable.
-import collections
 import itertools
 import queue
 import random
-import sys
 import threading
 import time
 import unittest
diff --git a/Lib/test/test_sys.py b/Lib/test/test_sys.py
index b90366d81445..92aefd8d7af4 100644
--- a/Lib/test/test_sys.py
+++ b/Lib/test/test_sys.py
@@ -10,7 +10,6 @@
 import gc
 import sysconfig
 import locale
-import threading
 
 # count the number of test runs, used to create unique
 # strings to intern in test_intern()
diff --git a/Lib/test/test_thread.py b/Lib/test/test_thread.py
index 64ffe4605298..f4eb830cf6d7 100644
--- a/Lib/test/test_thread.py
+++ b/Lib/test/test_thread.py
@@ -4,7 +4,6 @@
 from test import support
 import _thread as thread
 import time
-import sys
 import weakref
 
 from test import lock_tests



More information about the Python-checkins mailing list