Skip to content
Myr

remove deprecated get_terminal_size

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

authored by David Lord · committed by David Lord · parent 51736b9 · Browse files · 4 files+2 added−23 removed
This commit

State

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

Diff stats

4 files+2 added−23 removed

  • other:+2 added−23 removed

4 files+2 added−23 removed

modified:docs/api.rst-2 removed
61 unmodified lines
62.. autofunction:: getchar6364.. autofunction:: pause6566.. autofunction:: get_terminal_size6766.. autofunction:: get_binary_stream6768.. autofunction:: get_text_stream69
140 unmodified lines
modified:src/click/__init__.py-1 removed
39 unmodified lines
40from .termui import clear as clear41from .termui import confirm as confirm42from .termui import echo_via_pager as echo_via_pager43from .termui import edit as edit44from .termui import get_terminal_size as get_terminal_size44from .termui import getchar as getchar45from .termui import launch as launch46from .termui import pause as pause47from .termui import progressbar as progressbar
27 unmodified lines
modified:src/click/termui.py-20 removed
250 unmodified lines
251 raise Abort()252 return rv253254255def get_terminal_size() -> os.terminal_size:256 """Returns the current size of the terminal as tuple in the form257 ``(width, height)`` in columns and rows.258259 .. deprecated:: 8.0260 Will be removed in Click 8.1. Use261 :func:`shutil.get_terminal_size` instead.262 """263 import shutil264 import warnings265266 warnings.warn(267 "'click.get_terminal_size()' is deprecated and will be removed"268 " in Click 8.1. Use 'shutil.get_terminal_size()' instead.",269 DeprecationWarning,270 stacklevel=2,271 )272 return shutil.get_terminal_size()273274255def echo_via_pager(256 text_or_generator: t.Union[t.Iterable[str], t.Callable[[], t.Iterable[str]], str],257 color: t.Optional[bool] = None,258) -> None:
531 unmodified lines
modified:CHANGES.rst+2 added
9 unmodified lines
1011 - ``Group.resultcallback`` is renamed to ``result_callback``.12 - ``autocompletion`` parameter to ``Command`` is renamed to13 ``shell_complete``.14 - ``get_terminal_size`` is removed, use15 ``shutil.get_terminal_size`` instead.1617- Single options boolean flags with ``show_default=True`` only show18 the default if it is ``True``. :issue:`1971`19
942 unmodified lines