diff options
-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: |