[issue7955] TextIOWrapper Buffering Inconsistent Between _io and _pyio

2020-11-16 Thread Irit Katriel
Change by Irit Katriel : -- versions: +Python 3.10, Python 3.8, Python 3.9 -Python 2.6, Python 2.7, Python 3.1, Python 3.2 ___ Python tracker ___

[issue7955] TextIOWrapper Buffering Inconsistent Between _io and _pyio

2010-02-18 Thread Andrew McNabb
Andrew McNabb amcn...@mcnabbs.org added the comment: This seems like a common need (particularly for stdout and stderr), and setting `stdout._CHUNK_SIZE = 1` is relying on an implementation detail. 1) Can the documentation for TextIOWrapper be updated to clearly describe this extra buffering

[issue7955] TextIOWrapper Buffering Inconsistent Between _io and _pyio

2010-02-18 Thread Antoine Pitrou
Antoine Pitrou pit...@free.fr added the comment: I agree this deserves documentation. I'm not convinced it's a common need, though. Usually you either use stdin/stdout in binary mode or in text mode, but you don't interleave both quite frequently. -- assignee: - georg.brandl

[issue7955] TextIOWrapper Buffering Inconsistent Between _io and _pyio

2010-02-18 Thread Andrew McNabb
Andrew McNabb amcn...@mcnabbs.org added the comment: I would imagine that this would come up in most programs that read data from a pipe or from a socket (which are binary data) and then output to stdout or stderr. I ran across the problem in my first non-trivial port to Python 3, and it

[issue7955] TextIOWrapper Buffering Inconsistent Between _io and _pyio

2010-02-17 Thread Andrew McNabb
New submission from Andrew McNabb amcn...@mcnabbs.org: The following snippet behaves differently in the C IO implementation than in the Python IO implementation: import sys sys.stdout.write('unicode ') sys.stdout.buffer.write(b'bytes ') To test this, I have created two scripts,