[Python-checkins] bpo-35202: Remove unused imports in idlelib (GH-10438)

Miss Islington (bot) webhook-mailer at python.org
Sat Nov 10 02:08:08 EST 2018

commit: 2903b0fd38a65e16ddafae7754ed5d605fea68ff
branch: 3.6
author: Miss Islington (bot) <31488909+miss-islington at users.noreply.github.com>
committer: GitHub <noreply at github.com>
date: 2018-11-09T23:08:05-08:00

bpo-35202: Remove unused imports in idlelib (GH-10438)

(cherry picked from commit 43a74abb3a87092a7fd6c71042eafb977d70d8e0)

Co-authored-by: Srinivas  Thatiparthy (శ్రీనివాస్  తాటిపర్తి) <thatiparthysreenivas at gmail.com>

A Misc/NEWS.d/next/IDLE/2018-11-10-09-10-54.bpo-35202.TeJJrt.rst
M Lib/idlelib/codecontext.py
M Lib/idlelib/filelist.py
M Lib/idlelib/idle_test/test_config.py
M Lib/idlelib/idle_test/test_config_key.py
M Lib/idlelib/idle_test/test_rpc.py
M Lib/idlelib/pyparse.py

diff --git a/Lib/idlelib/codecontext.py b/Lib/idlelib/codecontext.py
index 7c88a4d015e3..ef8852852d1f 100644
--- a/Lib/idlelib/codecontext.py
+++ b/Lib/idlelib/codecontext.py
@@ -13,7 +13,7 @@
 from sys import maxsize as INFINITY
 import tkinter
-from tkinter.constants import TOP, LEFT, X, W, SUNKEN
+from tkinter.constants import TOP, X, SUNKEN
 from idlelib.config import idleConf
diff --git a/Lib/idlelib/filelist.py b/Lib/idlelib/filelist.py
index 52628392e617..0d200854ef00 100644
--- a/Lib/idlelib/filelist.py
+++ b/Lib/idlelib/filelist.py
@@ -115,7 +115,6 @@ def _test():  # TODO check and convert to htest
     from tkinter import Tk
     from idlelib.editor import fixwordbreaks
     from idlelib.run import fix_scaling
-    import sys
     root = Tk()
diff --git a/Lib/idlelib/idle_test/test_config.py b/Lib/idlelib/idle_test/test_config.py
index 8c9197284e07..169d054efd08 100644
--- a/Lib/idlelib/idle_test/test_config.py
+++ b/Lib/idlelib/idle_test/test_config.py
@@ -4,7 +4,6 @@
 Much of IdleConf is also exercised by ConfigDialog and test_configdialog.
 from idlelib import config
-import copy
 import sys
 import os
 import tempfile
diff --git a/Lib/idlelib/idle_test/test_config_key.py b/Lib/idlelib/idle_test/test_config_key.py
index 08471666a452..5031daadee0a 100644
--- a/Lib/idlelib/idle_test/test_config_key.py
+++ b/Lib/idlelib/idle_test/test_config_key.py
@@ -2,7 +2,6 @@
 from idlelib import config_key
 from test.support import requires
-import sys
 import unittest
 from tkinter import Tk
 from idlelib.idle_test.mock_idle import Func
diff --git a/Lib/idlelib/idle_test/test_rpc.py b/Lib/idlelib/idle_test/test_rpc.py
index 48be65ba10b9..81eff398c72f 100644
--- a/Lib/idlelib/idle_test/test_rpc.py
+++ b/Lib/idlelib/idle_test/test_rpc.py
@@ -3,7 +3,6 @@
 from idlelib import rpc
 import unittest
-import marshal
 class CodePicklerTest(unittest.TestCase):
diff --git a/Lib/idlelib/pyparse.py b/Lib/idlelib/pyparse.py
index 1eeb9154d906..81e7f539803c 100644
--- a/Lib/idlelib/pyparse.py
+++ b/Lib/idlelib/pyparse.py
@@ -11,7 +11,6 @@
 _chew_ordinaryre - non-special characters.
 import re
-import sys
 # Reason last statement is continued (or C_NONE if it's not).
diff --git a/Misc/NEWS.d/next/IDLE/2018-11-10-09-10-54.bpo-35202.TeJJrt.rst b/Misc/NEWS.d/next/IDLE/2018-11-10-09-10-54.bpo-35202.TeJJrt.rst
new file mode 100644
index 000000000000..1824536f3db1
--- /dev/null
+++ b/Misc/NEWS.d/next/IDLE/2018-11-10-09-10-54.bpo-35202.TeJJrt.rst
@@ -0,0 +1 @@
+Remove unused imports from lib/idlelib

More information about the Python-checkins mailing list