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.

Author eryksun
Recipients eryksun, kbrazil
Date 2021-10-27.03:02:04
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1635303724.94.0.242298179474.issue45617@roundup.psfhosted.org>
In-reply-to
Content
> '\r' is not handled, though it is documented that it 
> should be supported.

Where is it documented that sys.stdin uses universal newlines mode? The newline behavior isn't documented in the sys module [1], though it should be. It's hard coded in create_stdio() in Python/pylifecycle.c [2]. In Windows it uses universal-translated mode. On all other platforms, it uses "\n", which includes "\r\n" but not "\r".

---
[1] https://docs.python.org/3/library/sys.html#sys.stdin
[2] https://github.com/python/cpython/blob/v3.10.0/Python/pylifecycle.c#L2216
History
Date User Action Args
2021-10-27 03:02:04eryksunsetrecipients: + eryksun, kbrazil
2021-10-27 03:02:04eryksunsetmessageid: <1635303724.94.0.242298179474.issue45617@roundup.psfhosted.org>
2021-10-27 03:02:04eryksunlinkissue45617 messages
2021-10-27 03:02:04eryksuncreate