Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Prevent TextIOWrapper from buffering echo stream
TextIOWrapper does buffered reads, so the first call to readline (or read) will read a large chunk from the underlying stream. When that stream is the EchoingStdin stream, it causes multiple lines of input to be echoed prematurely. The solution in this commit is not ideal because it relies on the undocumented internal _CHUNK_SIZE variable. I couldn't find any other way to disable read buffering without reimplementing TextIOWrapper.
- Loading branch information