classification
Title: 2to3 deletes # comments before "from __future__ import with_statement"
Type: behavior Stage:
Components: 2to3 (2.x to 3.x conversion tool) Versions: Python 2.6
process
Status: closed Resolution:
Dependencies: Superseder:
Assigned To: wolever Nosy List: collinwinter, dangyogi, wolever
Priority: normal Keywords:

Created on 2008-03-19 21:00 by dangyogi, last changed 2008-03-20 03:32 by wolever. This issue is now closed.

Messages (2)
msg64098 - (view) Author: Bruce Frederiksen (dangyogi) Date: 2008-03-19 21:00
2to3, svn rev 61623.  To reproduce this error:

$ cat <<! > foobar.py
# line 1
# line 2

from __future__ import with_statement
import sys
!
$ 2to3 -w foobar.py
RefactoringTool: Skipping implicit fixer: buffer
RefactoringTool: Skipping implicit fixer: idioms
RefactoringTool: Skipping implicit fixer: ws_comma
--- foobar.py (original)
+++ foobar.py (refactored)
@@ -1,5 +1,2 @@
-# line 1
-# line 2
 
-from __future__ import with_statement
 import sys
RefactoringTool: Files that were modified:
RefactoringTool: foobar.py
$ cat foobar.py

import sys
$
msg64142 - (view) Author: David Wolever (wolever) * (Python committer) Date: 2008-03-20 03:32
Ok, fixed in r61664.
History
Date User Action Args
2008-03-20 03:32:56woleversetstatus: open -> closed
messages: + msg64142
2008-03-19 22:34:07woleversetassignee: collinwinter -> wolever
nosy: + wolever
2008-03-19 21:00:02dangyogicreate