[issue31775] Support unbuffered TextIOWrapper

2017-10-28 Thread Serhiy Storchaka
Change by Serhiy Storchaka : -- status: open -> pending ___ Python tracker ___

[issue31775] Support unbuffered TextIOWrapper

2017-10-12 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: What methods still require read1()? -- ___ Python tracker ___

[issue31775] Support unbuffered TextIOWrapper

2017-10-12 Thread STINNER Victor
STINNER Victor added the comment: Context: I created this issue as a follow-up of the discussion on the -u command line option, bpo-28647, which still leaves sys.stdin *buffered* in the current master branch. -- ___

[issue31775] Support unbuffered TextIOWrapper

2017-10-12 Thread STINNER Victor
STINNER Victor added the comment: > The falling back to read() was implemented in issue12591. What methods still > require read1()? I read the Python implementation of TextIOWrapper in _pyio: * seek() calls buffer.read() "if chars_to_skip:"... not sure that it can

[issue31775] Support unbuffered TextIOWrapper

2017-10-12 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: The falling back to read() was implemented in issue12591. What methods still require read1()? -- nosy: +serhiy.storchaka ___ Python tracker

[issue31775] Support unbuffered TextIOWrapper

2017-10-12 Thread STINNER Victor
STINNER Victor added the comment: Oh, currently it's not possible to create an unbuffered read-only TextIOWrapper object: haypo@selma$ python3 Python 3.6.2 (default, Oct 2 2017, 16:51:32) >>> open("/etc/issue", "r", 0) Traceback (most recent call last): File "",

[issue31775] Support unbuffered TextIOWrapper

2017-10-12 Thread STINNER Victor
STINNER Victor added the comment: I created this issue because of this comment in create_stdio() of Python/pylifecycle.c: --- /* stdin is always opened in buffered mode, first because it shouldn't make a difference in common use cases, second because

[issue31775] Support unbuffered TextIOWrapper

2017-10-12 Thread STINNER Victor
New submission from STINNER Victor : 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