Skip to content
Myr

remove deprecated get_os_args

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 d88e771 · Browse files · 3 files+1 added−20 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+1 added−20 removed

  • other:+1 added−20 removed

3 files+1 added−20 removed

modified:src/click/__init__.py-1 removed
65 unmodified lines
66from .utils import echo as echo67from .utils import format_filename as format_filename68from .utils import get_app_dir as get_app_dir69from .utils import get_binary_stream as get_binary_stream70from .utils import get_os_args as get_os_args70from .utils import get_text_stream as get_text_stream71from .utils import open_file as open_file7273__version__ = "8.1.0.dev0"
modified:src/click/utils.py-19 removed
377 unmodified lines
378379 return f380381382def get_os_args() -> t.Sequence[str]:383 """Returns the argument part of ``sys.argv``, removing the first384 value which is the name of the script.385386 .. deprecated:: 8.0387 Will be removed in Click 8.1. Access ``sys.argv[1:]`` directly388 instead.389 """390 import warnings391392 warnings.warn(393 "'get_os_args' is deprecated and will be removed in Click 8.1."394 " Access 'sys.argv[1:]' directly instead.",395 DeprecationWarning,396 stacklevel=2,397 )398 return sys.argv[1:]399400382def format_filename(383 filename: t.Union[str, bytes, os.PathLike], shorten: bool = False384) -> str:385 """Formats a filename for user display. The main purpose of this
184 unmodified lines
modified:CHANGES.rst+1 added
11 unmodified lines
12 - ``autocompletion`` parameter to ``Command`` is renamed to13 ``shell_complete``.14 - ``get_terminal_size`` is removed, use15 ``shutil.get_terminal_size`` instead.16 - ``get_os_args`` is removed, use ``sys.argv[1:]`` instead.1718- Single options boolean flags with ``show_default=True`` only show19 the default if it is ``True``. :issue:`1971`20
942 unmodified lines