Skip to content
Myr

read1 calls into read now but line buffering gets enabled.

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

authored by Armin Ronacher · committed by Armin Ronacher · parent 660a54e · Browse files · 1 file+3 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+3 added−2 removed

  • other:+3 added−2 removed

1 file+3 added−2 removed

modified:click/_compat.py+3 added-2 removed
7 unmodified lines
8 if encoding is None:9 encoding = get_best_encoding(stream)10 if errors is None:11 errors = 'replace'12 return _NonClosingTextIOWrapper(stream, encoding, errors)12 return _NonClosingTextIOWrapper(stream, encoding, errors,13 line_buffering=True)141516def is_ascii_encoding(encoding):17 """Checks if a given encoding is ascii."""
39 unmodified lines
57 def read1(self, size):58 f = getattr(self._stream, 'read1', None)59 if f is not None:60 return f(size)60 return self._stream.readline(size)61 return self._stream.read(size)6263 def readable(self):64 x = getattr(self._stream, 'readable', None)65 if x is not None:
278 unmodified lines