Skip to content

gh-136087: Remove \r from documented os.linesep values #136088

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jun 30, 2025

Conversation

sobolevn
Copy link
Member

@sobolevn sobolevn commented Jun 29, 2025

@collinfunk
Copy link
Contributor

Hi, I looked into this a bit.

The value \r used to exist when the variable was added in e9387ea.

It was removed in eca20b6. 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

@picnixz picnixz added needs backport to 3.13 bugs and security fixes needs backport to 3.14 bugs and security fixes labels Jun 29, 2025
@sobolevn sobolevn merged commit 980a568 into python:main Jun 30, 2025
51 checks passed
@miss-islington-app
Copy link

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!

miss-islington pushed a commit to miss-islington/cpython that referenced this pull request Jun 30, 2025
…honGH-136088)

(cherry picked from commit 980a56843bf631ea80c1486a367d41031dec6a7e)

Co-authored-by: sobolevn <[email protected]>
miss-islington pushed a commit to miss-islington/cpython that referenced this pull request Jun 30, 2025
@bedevere-app
Copy link

bedevere-app bot commented Jun 30, 2025

GH-136111 is a backport of this pull request to the 3.14 branch.

@bedevere-app bedevere-app bot removed the needs backport to 3.14 bugs and security fixes label Jun 30, 2025
@bedevere-app
Copy link

bedevere-app bot commented Jun 30, 2025

GH-136112 is a backport of this pull request to the 3.13 branch.

@bedevere-app bedevere-app bot removed the needs backport to 3.13 bugs and security fixes label Jun 30, 2025
sobolevn added a commit that referenced this pull request Jun 30, 2025
…-136088) (#136111)

gh-136087: Remove `\r` from documented `os.linesep` values (GH-136088)
(cherry picked from commit 980a568)

Co-authored-by: sobolevn <[email protected]>
sobolevn added a commit that referenced this pull request Jun 30, 2025
…-136088) (#136112)

gh-136087: Remove `\r` from documented `os.linesep` values (GH-136088)
(cherry picked from commit 980a568)

Co-authored-by: sobolevn <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants