summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSrinivas Thatiparthy (శ్రీనివాస్ తాటిపర్తి) <thatiparthysreenivas@gmail.com>2018-11-10 06:45:31 (GMT)
committerTerry Jan Reedy <tjreedy@udel.edu>2018-11-10 06:45:31 (GMT)
commit43a74abb3a87092a7fd6c71042eafb977d70d8e0 (patch)
tree5a2368185a8c363914e4a3ef619c4a6facbb952f
parent2d1bc537fe8b15664bb3e648785ba3c12e93b232 (diff)
downloadcpython-43a74abb3a87092a7fd6c71042eafb977d70d8e0.zip
cpython-43a74abb3a87092a7fd6c71042eafb977d70d8e0.tar.gz
cpython-43a74abb3a87092a7fd6c71042eafb977d70d8e0.tar.bz2
bpo-35202: Remove unused imports in idlelib (GH-10438)
-rw-r--r--Lib/idlelib/codecontext.py2
-rw-r--r--Lib/idlelib/filelist.py1
-rw-r--r--Lib/idlelib/idle_test/test_config.py1
-rw-r--r--Lib/idlelib/idle_test/test_config_key.py1
-rw-r--r--Lib/idlelib/idle_test/test_rpc.py1
-rw-r--r--Lib/idlelib/pyparse.py1
-rw-r--r--Misc/NEWS.d/next/IDLE/2018-11-10-09-10-54.bpo-35202.TeJJrt.rst1
7 files changed, 2 insertions, 6 deletions
diff --git a/Lib/idlelib/codecontext.py b/Lib/idlelib/codecontext.py
index 7c88a4d..ef88528 100644
--- a/Lib/idlelib/codecontext.py
+++ b/Lib/idlelib/codecontext.py
@@ -13,7 +13,7 @@ import re
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 5262839..0d20085 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()
fix_scaling(root)
fixwordbreaks(root)
diff --git a/Lib/idlelib/idle_test/test_config.py b/Lib/idlelib/idle_test/test_config.py
index 8c91972..169d054 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 0847166..5031daa 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 48be65b..81eff39 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 1eeb915..81e7f53 100644
--- a/Lib/idlelib/pyparse.py
+++ b/Lib/idlelib/pyparse.py
@@ -11,7 +11,6 @@ _closere - line that must be followed by dedent.
_chew_ordinaryre - non-special characters.
"""
import re
-import sys
# Reason last statement is continued (or C_NONE if it's not).
(C_NONE, C_BACKSLASH, C_STRING_FIRST_LINE,
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 0000000..1824536
--- /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