summaryrefslogtreecommitdiffstats
path: root/Lib/lib2to3
diff options
context:
space:
mode:
authorBenjamin Peterson <benjamin@python.org>2010-05-22 18:59:38 (GMT)
committerBenjamin Peterson <benjamin@python.org>2010-05-22 18:59:38 (GMT)
commit4f7329693a2f5a1438c4bb8342ffc6ecc1c49813 (patch)
treeafbf577755f05a3b9d53dfc45cfac34cdf318a51 /Lib/lib2to3
parent83afa3648312f927628bd7d20c57074e2e4d421a (diff)
downloadcpython-4f7329693a2f5a1438c4bb8342ffc6ecc1c49813.zip
cpython-4f7329693a2f5a1438c4bb8342ffc6ecc1c49813.tar.gz
cpython-4f7329693a2f5a1438c4bb8342ffc6ecc1c49813.tar.bz2
Merged revisions 81479 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/trunk ................ r81479 | benjamin.peterson | 2010-05-22 13:52:21 -0500 (Sat, 22 May 2010) | 13 lines Merged revisions 80937,81478 via svnmerge from svn+ssh://pythondev@svn.python.org/sandbox/trunk/2to3/lib2to3 ........ r80937 | benjamin.peterson | 2010-05-07 14:10:58 -0500 (Fri, 07 May 2010) | 1 line remove redundant unicode call ........ r81478 | benjamin.peterson | 2010-05-22 13:47:39 -0500 (Sat, 22 May 2010) | 1 line ensure doctests have some future_features ........ ................
Diffstat (limited to 'Lib/lib2to3')
-rw-r--r--Lib/lib2to3/fixes/fix_sys_exc.py2
-rw-r--r--Lib/lib2to3/refactor.py4
2 files changed, 4 insertions, 2 deletions
diff --git a/Lib/lib2to3/fixes/fix_sys_exc.py b/Lib/lib2to3/fixes/fix_sys_exc.py
index 58bbabb..348929b 100644
--- a/Lib/lib2to3/fixes/fix_sys_exc.py
+++ b/Lib/lib2to3/fixes/fix_sys_exc.py
@@ -20,7 +20,7 @@ class FixSysExc(fixer_base.BaseFix):
def transform(self, node, results):
sys_attr = results["attribute"][0]
- index = Number(unicode(self.exc_info.index(sys_attr.value)))
+ index = Number(self.exc_info.index(sys_attr.value))
call = Call(Name(u"exc_info"), prefix=sys_attr.prefix)
attr = Attr(Name(u"sys"), call)
diff --git a/Lib/lib2to3/refactor.py b/Lib/lib2to3/refactor.py
index 5982ed0..3e94699 100644
--- a/Lib/lib2to3/refactor.py
+++ b/Lib/lib2to3/refactor.py
@@ -564,7 +564,9 @@ class RefactoringTool(object):
This is necessary to get correct line number / offset information
in the parser diagnostics and embedded into the parse tree.
"""
- return self.driver.parse_tokens(self.wrap_toks(block, lineno, indent))
+ tree = self.driver.parse_tokens(self.wrap_toks(block, lineno, indent))
+ tree.future_features = frozenset()
+ return tree
def wrap_toks(self, block, lineno, indent):
"""Wraps a tokenize stream to systematically modify start/end."""