[Python-checkins] cpython: remove unused imports (closes #12432)

benjamin.peterson python-checkins at python.org
Tue Jun 28 17:25:03 CEST 2011


http://hg.python.org/cpython/rev/8c17e898e0e8
changeset:   71037:8c17e898e0e8
user:        Benjamin Peterson <benjamin at python.org>
date:        Tue Jun 28 10:25:04 2011 -0500
summary:
  remove unused imports (closes #12432)

A patch from Vincent Legoll.

files:
  Lib/binhex.py     |  1 -
  Lib/cgitb.py      |  1 -
  Lib/contextlib.py |  1 -
  Lib/glob.py       |  1 +
  Lib/inspect.py    |  1 -
  Lib/textwrap.py   |  2 +-
  Lib/turtle.py     |  1 -
  7 files changed, 2 insertions(+), 6 deletions(-)


diff --git a/Lib/binhex.py b/Lib/binhex.py
--- a/Lib/binhex.py
+++ b/Lib/binhex.py
@@ -23,7 +23,6 @@
 #
 import io
 import os
-import sys
 import struct
 import binascii
 
diff --git a/Lib/cgitb.py b/Lib/cgitb.py
--- a/Lib/cgitb.py
+++ b/Lib/cgitb.py
@@ -31,7 +31,6 @@
 import time
 import tokenize
 import traceback
-import types
 
 def reset():
     """Return a string that resets the CGI and browser to a known state."""
diff --git a/Lib/contextlib.py b/Lib/contextlib.py
--- a/Lib/contextlib.py
+++ b/Lib/contextlib.py
@@ -2,7 +2,6 @@
 
 import sys
 from functools import wraps
-from warnings import warn
 
 __all__ = ["contextmanager", "closing", "ContextDecorator"]
 
diff --git a/Lib/glob.py b/Lib/glob.py
--- a/Lib/glob.py
+++ b/Lib/glob.py
@@ -1,5 +1,6 @@
 """Filename globbing utility."""
 
+import sys
 import os
 import re
 import fnmatch
diff --git a/Lib/inspect.py b/Lib/inspect.py
--- a/Lib/inspect.py
+++ b/Lib/inspect.py
@@ -33,7 +33,6 @@
 import os
 import types
 import itertools
-import string
 import re
 import imp
 import tokenize
diff --git a/Lib/textwrap.py b/Lib/textwrap.py
--- a/Lib/textwrap.py
+++ b/Lib/textwrap.py
@@ -7,7 +7,7 @@
 
 __revision__ = "$Id$"
 
-import string, re
+import re
 
 __all__ = ['TextWrapper', 'wrap', 'fill', 'dedent']
 
diff --git a/Lib/turtle.py b/Lib/turtle.py
--- a/Lib/turtle.py
+++ b/Lib/turtle.py
@@ -108,7 +108,6 @@
 import types
 import math
 import time
-import os
 import inspect
 
 from os.path import isfile, split, join

-- 
Repository URL: http://hg.python.org/cpython


More information about the Python-checkins mailing list