[Python-checkins] cpython: Remove legacy "from __future__ import with_statement" lines.
gregory.p.smith
python-checkins at python.org
Thu Sep 8 16:49:09 EDT 2016
https://hg.python.org/cpython/rev/7eaaac5ad4e8
changeset: 103355:7eaaac5ad4e8
user: Gregory P. Smith <greg at krypto.org> [Google Inc.]
date: Thu Sep 08 13:47:41 2016 -0700
summary:
Remove legacy "from __future__ import with_statement" lines.
files:
Doc/tools/rstlint.py | 2 --
Lib/lib2to3/refactor.py | 2 --
Lib/lib2to3/tests/test_parser.py | 2 --
Lib/lib2to3/tests/test_pytree.py | 2 --
Lib/lib2to3/tests/test_refactor.py | 2 --
Tools/gdb/libpython.py | 2 +-
Tools/hg/hgtouch.py | 1 -
Tools/pybench/With.py | 1 -
Tools/scripts/generate_opcode_h.py | 2 --
9 files changed, 1 insertions(+), 15 deletions(-)
diff --git a/Doc/tools/rstlint.py b/Doc/tools/rstlint.py
--- 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
--- a/Lib/lib2to3/refactor.py
+++ b/Lib/lib2to3/refactor.py
@@ -8,8 +8,6 @@
provides infrastructure to write your own refactoring tool.
"""
-from __future__ import with_statement
-
__author__ = "Guido van Rossum <guido at python.org>"
diff --git a/Lib/lib2to3/tests/test_parser.py b/Lib/lib2to3/tests/test_parser.py
--- a/Lib/lib2to3/tests/test_parser.py
+++ b/Lib/lib2to3/tests/test_parser.py
@@ -6,8 +6,6 @@
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
--- a/Lib/lib2to3/tests/test_pytree.py
+++ b/Lib/lib2to3/tests/test_pytree.py
@@ -9,8 +9,6 @@
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
--- 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
--- a/Tools/gdb/libpython.py
+++ b/Tools/gdb/libpython.py
@@ -44,7 +44,7 @@
# 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
--- a/Tools/hg/hgtouch.py
+++ b/Tools/hg/hgtouch.py
@@ -7,7 +7,6 @@
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
--- 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
--- 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
--
Repository URL: https://hg.python.org/cpython
More information about the Python-checkins
mailing list