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
___
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
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
É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).
--
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
É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
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
É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:
É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
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.
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
___
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
É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
13 matches
Mail list logo