]> granicus.if.org Git - python/commitdiff
Merged revisions 81479 via svnmerge from
authorBenjamin Peterson <benjamin@python.org>
Sat, 22 May 2010 18:59:38 +0000 (18:59 +0000)
committerBenjamin Peterson <benjamin@python.org>
Sat, 22 May 2010 18:59:38 +0000 (18:59 +0000)
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
  ........
................

Lib/lib2to3/fixes/fix_sys_exc.py
Lib/lib2to3/refactor.py

index 58bbabbc44e6f0b23d671e12905ca8c1dbc9f0cb..348929bb6ed959e9fec23db6031b645d37e70eb6 100644 (file)
@@ -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)
index 5982ed06c142f4afb208353cbdd47c0fedadd1d6..3e94699f3d550036028522d47f039c277226d644 100644 (file)
@@ -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."""