This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

classification
Title: IDE defaults to Mac linefeeds
Type: Stage:
Components: macOS Versions:
process
Status: closed Resolution: fixed
Dependencies: Superseder:
Assigned To: jvr Nosy List: jackjansen, jvr
Priority: normal Keywords:

Created on 2003-08-04 08:34 by jackjansen, last changed 2022-04-10 16:10 by admin. This issue is now closed.

Messages (4)
msg17598 - (view) Author: Jack Jansen (jackjansen) * (Python committer) Date: 2003-08-04 08:34
The IDE defaults to Mac linefeeds for new files, also in 
MacPython-OSX. In PyEdit.Editor.__init__ the logic for 
initializing self._eoln is  fishy, and also incorrect. It should 
probably use "rU" for reading the files and use f.newlines to 
initialize it.
msg17599 - (view) Author: Just van Rossum (jvr) * (Python triager) Date: 2003-08-13 14:36
Logged In: YES 
user_id=92689

Can you elaborate on the "incorrect" bit? I agree with the need to 
switch to "rU".
msg17600 - (view) Author: Jack Jansen (jackjansen) * (Python committer) Date: 2003-08-15 12:58
Logged In: YES 
user_id=45365

Look at where _eoln is set in __init__: in the "if not path" leg it's 
set to os.linesep, in the other leg of the if it isn't set.

Then just below that it's overwritten in the if '\n' in text.

I think the second block should go, and the else part of the if not 
path should use open("rU") and inspect f.newlines (defaulting to 
os.linesep if f.newlines is None or a tuple).
msg17601 - (view) Author: Just van Rossum (jvr) * (Python triager) Date: 2003-11-18 22:41
Logged In: YES 
user_id=92689

Fixed without moving to "U", should be good enough for now. 
Rev. 1.44, will backport to the 2.3 maintainance branch.
History
Date User Action Args
2022-04-10 16:10:27adminsetgithub: 39002
2003-08-04 08:34:52jackjansencreate