-
-
Notifications
You must be signed in to change notification settings - Fork 29.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
2to3 truncates files at formfeed character #55459
Comments
Running Tools/Scripts/2to3.py on Python 3.2rc3 or 2.7.1 for Windows on a file that contains a formfeed character (0x0C, <FF>) results in a truncated file. E.g. a file (attached) with the content print 1 is incorrectly refactored: @@ -1,4 +1,1 @@
-print 1
-
-
-print 2
+print(1) Python 2.6.6 and 3.1.3 correctly refactor the file: -print 1
+print(1)
<FF>
-print 2
+print(2) |
r88661 |
Was this patch ever folded into Python 3.2? Looking at the hg repository, I think the answer is "no". It does appear to have made it into Python 2.7 and trunk though (afaict). In point of fact, this bug is hitting me now with 3.2.2. |
I also noticed that test_parser.py isn't being run in either 3.2 or 3.3. I'll fix that at the same time I port this patch to 3.2. |
Okay, re-enabling test_parser.py introduces a number of test failures in test_all_project_files(). Because I don't want to continue to shave the yak on this one, I'm going to wrap this test in @expectedfailure and open a separate bug for it. |
New changeset 6e0e9237d8e8 by Barry Warsaw in branch '3.2':
|
Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.
Show more details
GitHub fields:
bugs.python.org fields:
The text was updated successfully, but these errors were encountered: