Skip to content
Myr

Fix #164

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

authored by Markus Unterwaditzer · committed by Armin Ronacher · parent 49e1f77 · Browse files · 1 file+6 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+6 added−2 removed

  • other:+6 added−2 removed

1 file+6 added−2 removed

modified:click/_compat.py+6 added-2 removed
39 unmodified lines
4041class _NonClosingTextIOWrapper(io.TextIOWrapper):4243 def __init__(self, stream, encoding, errors, **extra):44 io.TextIOWrapper.__init__(self, _FixupStream(stream),45 encoding, errors, **extra)44 self._stream = stream = _FixupStream(stream)45 io.TextIOWrapper.__init__(self, stream, encoding, errors, **extra)4647 # The io module is a place where the Python 3 text behavior48 # was forced upon Python 2, so we need to unbreak49 # it to look like Python 2.
16 unmodified lines
66 self.detach()67 except Exception:68 pass6970 def isatty(self):71 # https://bitbucket.org/pypy/pypy/issue/180372 return self._stream.isatty()737475class _FixupStream(object):76 """The new io interface needs more from streams than streams77 traditionally implement. As such, this fix-up code is necessary in78 some circumstances.
479 unmodified lines