gh-136087: Remove `\r` from documented `os.linesep` values
- Issue: gh-136087
Hi, I looked into this a bit.
The value \r used to exist when the variable was added in https://github.com/python/cpython/commit/e9387ea773cdffeac5aa8ca094471bfc38ff6d03.
It was removed in https://github.com/python/cpython/commit/eca20b611433fac88057da092efc0b6d6d2a7fb3. It was a merge from subversion, but I am 99% percent confident it was a part of this change:
r63158 | ronald.oussoren | 2008-05-12 07:24:33 -0400 (Mon, 12 May 2008) | 5 lines
Remove references to platform 'mac'
The 'mac' platform (that is, os.name == 'mac') was used for the MacOS 9 port,
which is no longer supported (as of Python 2.4 IIRC).
Wikipedia states that \r was used in Classic Mac OS to represent a newline [1]. The page for Classic Mac OS says Mac OS 9 was the last version. This matches with the subversion commit message.
Therefore, your patch is correct. Good catch!
[1] https://en.wikipedia.org/wiki/Newline#Representation [2] https://en.wikipedia.org/wiki/Classic_Mac_OS
Thanks @sobolevn for the PR 🌮🎉.. I'm working now to backport this PR to: 3.13, 3.14. 🐍🍒⛏🤖 I'm not a witch! I'm not a witch!
GH-136111 is a backport of this pull request to the 3.14 branch.
GH-136112 is a backport of this pull request to the 3.13 branch.