[issue10639] reindent.py converts newlines to platform default

2011-07-26 Thread Éric Araujo
Changes by Éric Araujo mer...@netwok.org: Added file: http://bugs.python.org/file22765/900df5732f93.diff ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue10639 ___

[issue10639] reindent.py converts newlines to platform default

2011-07-25 Thread Jason R. Coombs
Jason R. Coombs jar...@jaraco.com added the comment: I looked into the possibility of retaining newline characters even for files with mixed newlines, but I've decided that's too intrusive an approach. The current implementation specifically takes measures to strip whitespaces from the ends

[issue10639] reindent.py converts newlines to platform default

2011-05-15 Thread Jason R. Coombs
Jason R. Coombs jar...@jaraco.com added the comment: Re msg125818, I agree that the mixed EOLs is also a potential problem, though the proposed solution behaves better than the status quo, where the EOLs get converted without warning. It would be desirable for the patch to be more robust in

[issue10639] reindent.py converts newlines to platform default

2011-01-29 Thread Éric Araujo
Éric Araujo mer...@netwok.org added the comment: I’m not opposed to reindent normalizing EOLs, given that our VCS hooks will translate them to the right thing (for example, making sure that files specific to the Windows build use CRLF, not LF, even if edited on POSIX). --

[issue10639] reindent.py converts newlines to platform default

2011-01-29 Thread Jason R. Coombs
Jason R. Coombs jar...@jaraco.com added the comment: That's great that reindent works in your environment, but that's no help in my environment. Here's the use case: We have a software package developed in Unix and with Unix LF line endings. The code base may also contain files with CRLF line

[issue10639] reindent.py converts newlines to platform default

2011-01-29 Thread Éric Araujo
Éric Araujo mer...@netwok.org added the comment: That is a valid use case, so +1 on not changing behavior and adding a new option in 3.3 (in another bug report). What is your reply to msg125818? -- ___ Python tracker rep...@bugs.python.org

[issue10639] reindent.py converts newlines to platform default

2011-01-23 Thread Senthil Kumaran
Senthil Kumaran orsent...@gmail.com added the comment: Why is reindent.py translating the whole file to platform default newline such a bad thing? Could not it be considered as helpful behavior, especially in the case where the user has mixed EOLs by mistake? -- nosy: +orsenthil

[issue10639] reindent.py converts newlines to platform default

2011-01-08 Thread Éric Araujo
Éric Araujo mer...@netwok.org added the comment: I did a bit of testing on demo files. The first one I tested with had mixed EOLs, in which case the newlines attribute will be a tuple and open(..., newline=r.newlines) will fail. For reference:

[issue10639] reindent.py converts newlines to platform default

2010-12-19 Thread Éric Araujo
Éric Araujo mer...@netwok.org added the comment: If nobody objects, I will commit this when py3k is unfrozen. -- assignee: - eric.araujo status: open - pending ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue10639

[issue10639] reindent.py converts newlines to platform default

2010-12-06 Thread Jason R. Coombs
New submission from Jason R. Coombs jar...@jaraco.com: When reindent.py runs, it will convert the line endings for each file it converts to the default line ending for the platform on which reindent.py runs. It would be better if reindent.py would retain line endings of the source file.

[issue10639] reindent.py converts newlines to platform default

2010-12-06 Thread Jason R. Coombs
Changes by Jason R. Coombs jar...@jaraco.com: Removed file: http://bugs.python.org/file19955/reindent-autonewline.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue10639 ___

[issue10639] reindent.py converts newlines to platform default

2010-12-06 Thread Jason R. Coombs
Jason R. Coombs jar...@jaraco.com added the comment: Merged the patch with the latest trunk. -- Added file: http://bugs.python.org/file19956/reindent-autonewline.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue10639

[issue10639] reindent.py converts newlines to platform default

2010-12-06 Thread Éric Araujo
Éric Araujo mer...@netwok.org added the comment: Looks good. -- nosy: +eric.araujo stage: - patch review type: - behavior versions: +Python 2.7 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue10639