Skip to content
Myr

Merge pull request #819 from segevfiner/winconsole-writer-bug-2

Before adoption: this commit came in with the history the project adopted, so no landing records it.

A TextIOWrapper that wraps _winconsole._WindowsConsoleWriter expects a buffered stream

authored by David Lord · committed by GitHub · parents 2cd71bf, dbd13dc · Browse files · 1 file+2 added−2 removed
This commit

State

Before adoption: this commit came in with the history the project adopted, so no landing records it.

Diff stats

1 file+2 added−2 removed

  • other:+2 added−2 removed

1 file+2 added−2 removed

modified:click/_winconsole.py+2 added-2 removed
208 unmodified lines
209210211def _get_text_stdout(buffer_stream):212 text_stream = _NonClosingTextIOWrapper(213 _WindowsConsoleWriter(STDOUT_HANDLE),213 io.BufferedWriter(_WindowsConsoleWriter(STDOUT_HANDLE)),214 'utf-16-le', 'strict', line_buffering=True)215 return ConsoleStream(text_stream, buffer_stream)216217218def _get_text_stderr(buffer_stream):219 text_stream = _NonClosingTextIOWrapper(220 _WindowsConsoleWriter(STDERR_HANDLE),220 io.BufferedWriter(_WindowsConsoleWriter(STDERR_HANDLE)),221 'utf-16-le', 'strict', line_buffering=True)222 return ConsoleStream(text_stream, buffer_stream)223224
49 unmodified lines