Skip to content

Commit 60a5eaf

Browse files
committed
remove deprecated get_os_args
1 parent d88e771 commit 60a5eaf

3 files changed

Lines changed: 1 addition & 20 deletions

File tree

CHANGES.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ Unreleased
1313
``shell_complete``.
1414
- ``get_terminal_size`` is removed, use
1515
``shutil.get_terminal_size`` instead.
16+
- ``get_os_args`` is removed, use ``sys.argv[1:]`` instead.
1617

1718
- Single options boolean flags with ``show_default=True`` only show
1819
the default if it is ``True``. :issue:`1971`

src/click/__init__.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,6 @@
6767
from .utils import format_filename as format_filename
6868
from .utils import get_app_dir as get_app_dir
6969
from .utils import get_binary_stream as get_binary_stream
70-
from .utils import get_os_args as get_os_args
7170
from .utils import get_text_stream as get_text_stream
7271
from .utils import open_file as open_file
7372

src/click/utils.py

Lines changed: 0 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -379,25 +379,6 @@ def open_file(
379379
return f
380380

381381

382-
def get_os_args() -> t.Sequence[str]:
383-
"""Returns the argument part of ``sys.argv``, removing the first
384-
value which is the name of the script.
385-
386-
.. deprecated:: 8.0
387-
Will be removed in Click 8.1. Access ``sys.argv[1:]`` directly
388-
instead.
389-
"""
390-
import warnings
391-
392-
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:]
399-
400-
401382
def format_filename(
402383
filename: t.Union[str, bytes, os.PathLike], shorten: bool = False
403384
) -> str:

0 commit comments

Comments
 (0)