[issue11594] 2to3 does not preserve line endings

2018-07-27 Thread Jason R. Coombs
Change by Jason R. Coombs : -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker ___

[issue11594] 2to3 does not preserve line endings

2018-07-27 Thread Jason R. Coombs
Jason R. Coombs added the comment: Slawomir, you're probably looking for issue34108. -- ___ Python tracker ___ ___

[issue11594] 2to3 does not preserve line endings

2018-07-26 Thread Slawomir Nowaczyk
Slawomir Nowaczyk added the comment: I've just tried 2to3 in 3.7.0, and it still breaks line endings for me... Seems like one also needs to fix line 517 in refactor.py fp = io.open(filename, "w", encoding=encoding, newline='') -- nosy: +Slawomir Nowaczyk

[issue11594] 2to3 does not preserve line endings

2018-04-17 Thread miss-islington
miss-islington added the comment: New changeset 3b3be1fe10f6c15e57360cac9d9dbc660666e655 by Miss Islington (bot) in branch '3.7': bpo-11594: Ensure line-endings are respected when using 2to3 (GH-6483)

[issue11594] 2to3 does not preserve line endings

2018-04-17 Thread miss-islington
Change by miss-islington : -- pull_requests: +6208 ___ Python tracker ___

[issue11594] 2to3 does not preserve line endings

2018-04-17 Thread Łukasz Langa
Łukasz Langa added the comment: New changeset c127a86e1862df88ec6f9d15b79c627fc616766e by Łukasz Langa (Aaron Ang) in branch 'master': bpo-11594: Ensure line-endings are respected when using 2to3 (GH-6483)

[issue11594] 2to3 does not preserve line endings

2018-04-15 Thread Aaron Ang
Aaron Ang 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

[issue11594] 2to3 does not preserve line endings

2018-04-15 Thread Aaron Ang
Change by Aaron Ang : -- keywords: +patch pull_requests: +6181 stage: test needed -> patch review ___ Python tracker ___

[issue11594] 2to3 does not preserve line endings

2018-04-15 Thread Jason R. Coombs
Jason R. Coombs added the comment: I do still see the issue on Python 3.7b3: $ python ~/Dropbox/bin/scripts/which-line-ending onefile.py Line ending is '\n' $ python ~/Dropbox/bin/scripts/which-line-ending otherfile.py Line ending is '\r\n' $ python -V Python 3.7.0b3 $

[issue11594] 2to3 does not preserve line endings

2018-04-15 Thread Aaron Ang
Aaron Ang 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:

[issue11594] 2to3 does not preserve line endings

2018-03-13 Thread Łukasz Langa
Change by Łukasz Langa : -- keywords: +easy -patch ___ Python tracker ___ ___

[issue11594] 2to3 does not preserve line endings

2017-12-08 Thread Jason R. Coombs
Jason R. Coombs added the comment: This issue affected me today. I'm editing a codebase that has mixed line endings in different files. I'd like to patch for Python 3 support without changing line endings. Even invoking a single fixer (print), the line endings mutate.

[issue11594] 2to3 does not preserve line endings

2011-06-09 Thread Éric Araujo
Éric Araujo mer...@netwok.org added the comment: I was surprised to see that the crlf.py file was not using CRLF in the new Mercurial repo. It is also not in the .hgeol file. I changed it locally, but it doesn’t change anything, the tests pass before and after the change. --

[issue11594] 2to3 does not preserve line endings

2011-03-21 Thread Éric Araujo
Éric Araujo mer...@netwok.org added the comment: Thanks. Would you like to work on a unit test or full patch? -- stage: - test needed title: 2to3 tool does not preserve line-endings - 2to3 does not preserve line endings ___ Python tracker

[issue11594] 2to3 does not preserve line endings

2011-03-21 Thread Alexander Belchenko
Alexander Belchenko bia...@ukr.net added the comment: Éric, thank you for the proposal, but I'm not familiar enough with the codebase to work on it. The short scan over the tests reveals that there is at least one test which tries to test CRLF behavior, in the file test_refactor.py, but I

[issue11594] 2to3 does not preserve line endings

2011-03-21 Thread Benjamin Peterson
Benjamin Peterson benja...@python.org added the comment: I can fix it. I just need to find time. :) -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue11594 ___