io.StringIO does not report newline types through its newlines attribute.
import io
stream = io.StringIO(newline=None)
stream.write("a\nb\r\nc\rd")
print(stream.newlines)
CPython returns:
RustPython currently inherits _TextIOBase.newlines, which returns None.
The same behavior is covered by the existing expected-failure tests in Lib/test/test_memoryio.py.
AI assistance: Codex:gpt-5.6-sol (research and drafting; reviewed and edited by the contributor).
io.StringIOdoes not report newline types through itsnewlinesattribute.CPython returns:
RustPython currently inherits
_TextIOBase.newlines, which returnsNone.The same behavior is covered by the existing expected-failure tests in
Lib/test/test_memoryio.py.AI assistance: Codex:gpt-5.6-sol (research and drafting; reviewed and edited by the contributor).