[issue11594] 2to3 does not preserve line endings

Aaron Ang report at bugs.python.org
Sun Apr 15 22:45:47 EDT 2018


Aaron Ang <awz.ang at gmail.com> added the comment:

@Jason R. Coombs
You are right. I managed to reproduce the problem with a test. It only occurs when a fix is applied.

Also, I figured out that the refactoring reads in the file using `open(file, 'r')`, which basically transforms all line-endings to LF regardless the used line-endings. I think I fixed the problem, looking forward to receiving feedback 😬

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue11594>
_______________________________________


More information about the Python-bugs-list mailing list