[issue14282] lib2to3.fixer_util.touch_import('__future__', ...) can lead to SyntaxError in code

2012-03-13 Thread Luke Macken
Luke Macken added the comment: Yep, that seems like the right solution. Thanks, Martin. -- ___ Python tracker <http://bugs.python.org/issue14282> ___ ___ Pytho

[issue14282] lib2to3.fixer_util.touch_import('__future__', ...) can lead to SyntaxError in code

2012-03-12 Thread Luke Macken
Changes by Luke Macken : -- keywords: +patch Added file: http://bugs.python.org/file24814/python-lib2to3-touch-future-import.patch ___ Python tracker <http://bugs.python.org/issue14

[issue14282] lib2to3.fixer_util.touch_import('__future__', ...) can lead to SyntaxError in code

2012-03-12 Thread Luke Macken
New submission from Luke Macken : Problem: lib2to3.fixer_util.touch_import('__future__', ...) will insert the import statement below all other imports. This will then trigger the following error: SyntaxError: from __future__ imports must occur at the beginning of the fil