diff options
author | David Lord <davidism@gmail.com> | 2021-11-10 16:46:13 -0800 |
---|---|---|
committer | David Lord <davidism@gmail.com> | 2021-11-10 16:46:13 -0800 |
commit | 60a5eafaf5f2a71b2a8a4f93ad1faefb2b8b0f76 (patch) | |
tree | af6a529b01ae6a9a24b60a52c4b458a3583eec14 | |
parent | d88e771a004c34e4b863123333a259b28a2bf8f4 (diff) | |
download | click-60a5eafaf5f2a71b2a8a4f93ad1faefb2b8b0f76.tar.gz |
remove deprecated get_os_args
-rw-r--r-- | CHANGES.rst | 1 | ||||
-rw-r--r-- | src/click/__init__.py | 1 | ||||
-rw-r--r-- | src/click/utils.py | 19 |
3 files changed, 1 insertions, 20 deletions
diff --git a/CHANGES.rst b/CHANGES.rst index af97e24..43f1f51 100644 --- a/CHANGES.rst +++ b/CHANGES.rst @@ -13,6 +13,7 @@ Unreleased ``shell_complete``. - ``get_terminal_size`` is removed, use ``shutil.get_terminal_size`` instead. + - ``get_os_args`` is removed, use ``sys.argv[1:]`` instead. - Single options boolean flags with ``show_default=True`` only show the default if it is ``True``. :issue:`1971` diff --git a/src/click/__init__.py b/src/click/__init__.py index 8c12e0f..33080c0 100644 --- a/src/click/__init__.py +++ b/src/click/__init__.py @@ -67,7 +67,6 @@ from .utils import echo as echo from .utils import format_filename as format_filename from .utils import get_app_dir as get_app_dir from .utils import get_binary_stream as get_binary_stream -from .utils import get_os_args as get_os_args from .utils import get_text_stream as get_text_stream from .utils import open_file as open_file diff --git a/src/click/utils.py b/src/click/utils.py index 051cf70..03fbaa7 100644 --- a/src/click/utils.py +++ b/src/click/utils.py @@ -379,25 +379,6 @@ def open_file( return f -def get_os_args() -> t.Sequence[str]: - """Returns the argument part of ``sys.argv``, removing the first - value which is the name of the script. - - .. deprecated:: 8.0 - Will be removed in Click 8.1. Access ``sys.argv[1:]`` directly - instead. - """ - import warnings - - warnings.warn( - "'get_os_args' is deprecated and will be removed in Click 8.1." - " Access 'sys.argv[1:]' directly instead.", - DeprecationWarning, - stacklevel=2, - ) - return sys.argv[1:] - - def format_filename( filename: t.Union[str, bytes, os.PathLike], shorten: bool = False ) -> str: |