Skip to content

os.linesep can only be \n or \r\n #14351

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 3 commits into from
Jun 30, 2025
Merged

os.linesep can only be \n or \r\n #14351

merged 3 commits into from
Jun 30, 2025

Conversation

This comment has been minimized.

This comment has been minimized.

@srittau
Copy link
Collaborator

srittau commented Jun 30, 2025

The primer hit – while only in test cases – in my opinion shows why it's better not to distinguish this by platform: Code should be able to handle both \r\n and \n, but type checkers would not enforce that – unless you run the type checkers on multiple platforms.

Copy link
Contributor

According to mypy_primer, this change has no effect on the checked open source code. 🤖🎉

@srittau srittau merged commit 85a6440 into main Jun 30, 2025
64 checks passed
@srittau srittau deleted the sobolevn-patch-4 branch June 30, 2025 10:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants