[issue11594] 2to3 does not preserve line endings
Aaron Ang <awz@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 <rep...@bugs.python.org> <https://bugs.python.org/issue11594> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue11594] 2to3 does not preserve line endings
Change by Aaron Ang <awz@gmail.com>: -- keywords: +patch pull_requests: +6181 stage: test needed -> patch review ___ Python tracker <rep...@bugs.python.org> <https://bugs.python.org/issue11594> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue11594] 2to3 does not preserve line endings
Aaron Ang <awz@gmail.com> added the comment: I couldn't reproduce this issue. I tried reproducing this problem by extending the TestRefactoringTool class and creating two files: one file with LF line-endings and one file with CRLF line-endings. The changes that I made can be found here: https://github.com/aaronang/cpython/commit/55e8bd317f37923e6e23780e6ae41858493e98d8. The output of the tests: Before: b'print("hi")\n\nprint("Like bad Windows newlines?")\n' After: b'print("hi")\n\nprint("Like bad Windows newlines?")\n' Before: b'print("hi")\r\n\r\nprint("Like bad Windows newlines?")\r\n' After: b'print("hi")\r\n\r\nprint("Like bad Windows newlines?")\r\n' Maybe this problem has been resolved? -- nosy: +Aaron Ang ___ Python tracker <rep...@bugs.python.org> <https://bugs.python.org/issue11594> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue31201] make test: module test that failed doesn't exist
Change by Aaron Ang <awz@gmail.com>: -- keywords: +patch pull_requests: +6119 stage: needs patch -> patch review ___ Python tracker <rep...@bugs.python.org> <https://bugs.python.org/issue31201> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue28677] difficult to parse sentence structure in "When an instance attribute is referenced that isn't a data attribute"
Change by Aaron Ang <awz@gmail.com>: -- keywords: +patch pull_requests: +5952 stage: needs patch -> patch review ___ Python tracker <rep...@bugs.python.org> <https://bugs.python.org/issue28677> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com