From: Gregory P. Smith ext:(%20%5BGoogle%20Inc.%5D) Date: Thu, 8 Sep 2016 20:47:41 +0000 (-0700) Subject: Remove legacy "from __future__ import with_statement" lines. X-Git-Tag: v3.6.0b1~250 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=a68c1bca7bd35571dd1bab736fd69452eca8394e;p=thirdparty%2FPython%2Fcpython.git Remove legacy "from __future__ import with_statement" lines. --- diff --git a/Doc/tools/rstlint.py b/Doc/tools/rstlint.py index de78041f77c9..2c1816eedf92 100755 --- a/Doc/tools/rstlint.py +++ b/Doc/tools/rstlint.py @@ -9,8 +9,6 @@ # TODO: - wrong versions in versionadded/changed # - wrong markup after versionchanged directive -from __future__ import with_statement - import os import re import sys diff --git a/Lib/lib2to3/refactor.py b/Lib/lib2to3/refactor.py index b60b9def4d07..c5a1aa2d0cc4 100644 --- a/Lib/lib2to3/refactor.py +++ b/Lib/lib2to3/refactor.py @@ -8,8 +8,6 @@ recursively descend down directories. Imported as a module, this provides infrastructure to write your own refactoring tool. """ -from __future__ import with_statement - __author__ = "Guido van Rossum " diff --git a/Lib/lib2to3/tests/test_parser.py b/Lib/lib2to3/tests/test_parser.py index 7fc5537edda9..9adb0317fae8 100644 --- a/Lib/lib2to3/tests/test_parser.py +++ b/Lib/lib2to3/tests/test_parser.py @@ -6,8 +6,6 @@ parts of the grammar we've changed, we also make sure we can parse the test_grammar.py files from both Python 2 and Python 3. """ -from __future__ import with_statement - # Testing imports from . import support from .support import driver diff --git a/Lib/lib2to3/tests/test_pytree.py b/Lib/lib2to3/tests/test_pytree.py index a611d1715ec1..177126d54529 100644 --- a/Lib/lib2to3/tests/test_pytree.py +++ b/Lib/lib2to3/tests/test_pytree.py @@ -9,8 +9,6 @@ more helpful than printing of (the first line of) the docstring, especially when debugging a test. """ -from __future__ import with_statement - # Testing imports from . import support diff --git a/Lib/lib2to3/tests/test_refactor.py b/Lib/lib2to3/tests/test_refactor.py index 94dc135fac23..e9bae5e45d01 100644 --- a/Lib/lib2to3/tests/test_refactor.py +++ b/Lib/lib2to3/tests/test_refactor.py @@ -2,8 +2,6 @@ Unit tests for refactor.py. """ -from __future__ import with_statement - import sys import os import codecs diff --git a/Tools/gdb/libpython.py b/Tools/gdb/libpython.py index 75f1ccbd442d..3e95b4441d8a 100755 --- a/Tools/gdb/libpython.py +++ b/Tools/gdb/libpython.py @@ -44,7 +44,7 @@ The module also extends gdb with some python-specific commands. # NOTE: some gdbs are linked with Python 3, so this file should be dual-syntax # compatible (2.6+ and 3.0+). See #19308. -from __future__ import print_function, with_statement +from __future__ import print_function import gdb import os import locale diff --git a/Tools/hg/hgtouch.py b/Tools/hg/hgtouch.py index 119d81214826..fbca469ba94c 100644 --- a/Tools/hg/hgtouch.py +++ b/Tools/hg/hgtouch.py @@ -7,7 +7,6 @@ syntax of make rules. In addition to the dependency syntax, #-comments are supported. """ -from __future__ import with_statement import errno import os import time diff --git a/Tools/pybench/With.py b/Tools/pybench/With.py index 5f59e8c05b67..30cd3c2c8a53 100644 --- a/Tools/pybench/With.py +++ b/Tools/pybench/With.py @@ -1,4 +1,3 @@ -from __future__ import with_statement from pybench import Test class WithFinally(Test): diff --git a/Tools/scripts/generate_opcode_h.py b/Tools/scripts/generate_opcode_h.py index c62f9a5b2301..948b56f9007e 100644 --- a/Tools/scripts/generate_opcode_h.py +++ b/Tools/scripts/generate_opcode_h.py @@ -1,7 +1,5 @@ # This script generates the opcode.h header file. -from __future__ import with_statement - import sys header = """/* Auto-generated by Tools/scripts/generate_opcode_h.py */ #ifndef Py_OPCODE_H