Skip to content
Myr

Merge branch '2.x-maintenance'

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 · parents 5792627, 4fd91c2 · Browse files · 3 files+8 added−7 removed
This commit

State

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

Diff stats

3 files+8 added−7 removed

  • other:+8 added−7 removed

3 files+8 added−7 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
modified:click/_termui_impl.py+1 added-5 removed
83 unmodified lines
84 self.finished = False85 self.max_width = None86 self.entered = False87 self.current_item = None88 self.is_hidden = not isatty(self.file)8989 try:90 self.is_hidden = not self.file.isatty()91 except Exception:92 self.is_hidden = True9390 def __enter__(self):91 self.entered = True92 return self93
412 unmodified lines
modified:CHANGES+1 added
31 unmodified lines
32 dimensions of a windows terminal.33- fixed an issue with custom function types on Python 3.34- fixed an issue with unknown options being incorrectly reported35 in error messages.36- fixed tty detection on PyPy.3738Version 2.039-----------40
53 unmodified lines