[New-bugs-announce] [issue31775] Support unbuffered TextIOWrapper

STINNER Victor report at bugs.python.org
Thu Oct 12 11:09:32 EDT 2017


New submission from STINNER Victor <victor.stinner at gmail.com>:

It seems like that some methods of the io.TextIOWrapper class requires that its buffer object has the read1() method, whereas the constructor checks if the buffer has a read1() method and the TextIOWrapper _read_chunk() method is able to call buffer.read() if buffer doesn't have read1().

This issue may help to get fully unbuffered sys.stdin, at least when replaced manually:

stdin = sys.stdin
sys.stdin = open(0, "r", buffering=0, encoding=stdin.encoding, errors=stdin.errors, newline=stdin.newline)

----------
components: IO
messages: 304250
nosy: haypo
priority: normal
severity: normal
status: open
title: Support unbuffered TextIOWrapper
versions: Python 3.7

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue31775>
_______________________________________


More information about the New-bugs-announce mailing list