diff options
author | robot-piglet <robot-piglet@yandex-team.com> | 2023-11-16 11:48:27 +0300 |
---|---|---|
committer | robot-piglet <robot-piglet@yandex-team.com> | 2023-11-16 12:01:08 +0300 |
commit | 7cf07089bea73f988af6389f056842aff9284d11 (patch) | |
tree | 3aee128e94d66d06f65a29c3586243a0d22c5ae6 | |
parent | 0189677704e6b4969cc08a9a824ca1b7fa46701c (diff) | |
download | ydb-7cf07089bea73f988af6389f056842aff9284d11.tar.gz |
Intermediate changes
6 files changed, 16 insertions, 22 deletions
diff --git a/contrib/python/argcomplete/py3/.dist-info/METADATA b/contrib/python/argcomplete/py3/.dist-info/METADATA index 7d995caedb..f398fefb39 100644 --- a/contrib/python/argcomplete/py3/.dist-info/METADATA +++ b/contrib/python/argcomplete/py3/.dist-info/METADATA @@ -1,6 +1,6 @@ Metadata-Version: 2.1 Name: argcomplete -Version: 3.1.2 +Version: 3.1.3 Summary: Bash tab completion for argparse Home-page: https://github.com/kislyuk/argcomplete Author: Andrey Kislyuk @@ -24,6 +24,7 @@ Classifier: Programming Language :: Python :: 3.8 Classifier: Programming Language :: Python :: 3.9 Classifier: Programming Language :: Python :: 3.10 Classifier: Programming Language :: Python :: 3.11 +Classifier: Programming Language :: Python :: 3.12 Classifier: Programming Language :: Python :: Implementation :: CPython Classifier: Programming Language :: Python :: Implementation :: PyPy Classifier: Development Status :: 5 - Production/Stable @@ -31,11 +32,10 @@ Classifier: Topic :: Software Development Classifier: Topic :: Software Development :: Libraries :: Python Modules Classifier: Topic :: System :: Shells Classifier: Topic :: Terminals -Requires-Python: >=3.6 +Requires-Python: >=3.8 Description-Content-Type: text/x-rst License-File: LICENSE.rst License-File: NOTICE -Requires-Dist: importlib-metadata <7,>=0.23 ; python_version < "3.8" Provides-Extra: test Requires-Dist: coverage ; extra == 'test' Requires-Dist: pexpect ; extra == 'test' @@ -264,7 +264,7 @@ multiple Python versions on the same system, the version being used to run the s When using bash, global completion requires bash support for ``complete -D``, which was introduced in bash 4.2. Since Mac OS ships with an outdated version of Bash (3.2), you can either use zsh or install a newer version of bash using - `Homebrew <http://brew.sh/>`_ (``brew install bash`` - you will also need to add ``/usr/local/bin/bash`` to + `Homebrew <http://brew.sh/>`_ (``brew install bash`` - you will also need to add ``/opt/homebrew/bin/bash`` to ``/etc/shells``, and run ``chsh`` to change your shell). You can check the version of the running copy of bash with ``echo $BASH_VERSION``. diff --git a/contrib/python/argcomplete/py3/README.rst b/contrib/python/argcomplete/py3/README.rst index aaf9e1a122..c134a566e6 100644 --- a/contrib/python/argcomplete/py3/README.rst +++ b/contrib/python/argcomplete/py3/README.rst @@ -219,7 +219,7 @@ multiple Python versions on the same system, the version being used to run the s When using bash, global completion requires bash support for ``complete -D``, which was introduced in bash 4.2. Since Mac OS ships with an outdated version of Bash (3.2), you can either use zsh or install a newer version of bash using - `Homebrew <http://brew.sh/>`_ (``brew install bash`` - you will also need to add ``/usr/local/bin/bash`` to + `Homebrew <http://brew.sh/>`_ (``brew install bash`` - you will also need to add ``/opt/homebrew/bin/bash`` to ``/etc/shells``, and run ``chsh`` to change your shell). You can check the version of the running copy of bash with ``echo $BASH_VERSION``. diff --git a/contrib/python/argcomplete/py3/argcomplete/_check_console_script.py b/contrib/python/argcomplete/py3/argcomplete/_check_console_script.py index ed1e3b34f4..bd324b4e71 100644 --- a/contrib/python/argcomplete/py3/argcomplete/_check_console_script.py +++ b/contrib/python/argcomplete/py3/argcomplete/_check_console_script.py @@ -14,14 +14,8 @@ Intended to be invoked by argcomplete's global completion function. import os import sys -try: - from importlib.metadata import entry_points as importlib_entry_points - from importlib.metadata import EntryPoint - use_entry_points_backport = False -except ImportError: - from importlib_metadata import entry_points as importlib_entry_points # type:ignore - from importlib_metadata import EntryPoint # type:ignore - use_entry_points_backport = True +from importlib.metadata import entry_points as importlib_entry_points +from importlib.metadata import EntryPoint from ._check_module import ArgcompleteMarkerNotFound, find from typing import Iterable @@ -37,10 +31,9 @@ def main(): entry_points : Iterable[EntryPoint] = importlib_entry_points() # type:ignore - # The importlib_metadata backport returns a tuple of entry point objects - # whereas the official library returns a SelectableGroups object - # Python 3.12+ behaves like the importlib_metadata backport - if not use_entry_points_backport and sys.version_info < (3, 12): + # Python 3.12+ returns a tuple of entry point objects + # whereas <=3.11 returns a SelectableGroups object + if sys.version_info < (3, 12): entry_points = entry_points["console_scripts"] # type:ignore entry_points = [ep for ep in entry_points \ diff --git a/contrib/python/argcomplete/py3/argcomplete/_check_module.py b/contrib/python/argcomplete/py3/argcomplete/_check_module.py index 4958f0267f..0d9fb8f444 100644 --- a/contrib/python/argcomplete/py3/argcomplete/_check_module.py +++ b/contrib/python/argcomplete/py3/argcomplete/_check_module.py @@ -15,7 +15,7 @@ try: except ImportError: import typing as t from collections import namedtuple - from imp import find_module + from imp import find_module # type:ignore ModuleSpec = namedtuple("ModuleSpec", ["origin", "has_location", "submodule_search_locations"]) diff --git a/contrib/python/argcomplete/py3/argcomplete/shell_integration.py b/contrib/python/argcomplete/py3/argcomplete/shell_integration.py index 74bede645a..53b8e18234 100644 --- a/contrib/python/argcomplete/py3/argcomplete/shell_integration.py +++ b/contrib/python/argcomplete/py3/argcomplete/shell_integration.py @@ -32,6 +32,7 @@ __python_argcomplete_run_inner() { _python_argcomplete%(function_suffix)s() { local IFS=$'\013' + local script="%(argcomplete_script)s" if [[ -n "${ZSH_VERSION-}" ]]; then local completions completions=($(IFS="$IFS" \ @@ -40,7 +41,7 @@ _python_argcomplete%(function_suffix)s() { _ARGCOMPLETE=1 \ _ARGCOMPLETE_SHELL="zsh" \ _ARGCOMPLETE_SUPPRESS_SPACE=1 \ - __python_argcomplete_run "${words[1]}") ) + __python_argcomplete_run ${script:-${words[1]}})) _describe "${words[1]}" completions -o nosort else local SUPPRESS_SPACE=0 @@ -55,7 +56,7 @@ _python_argcomplete%(function_suffix)s() { _ARGCOMPLETE=1 \ _ARGCOMPLETE_SHELL="bash" \ _ARGCOMPLETE_SUPPRESS_SPACE=$SUPPRESS_SPACE \ - __python_argcomplete_run "%(argcomplete_script)s")) + __python_argcomplete_run ${script:-$1})) if [[ $? != 0 ]]; then unset COMPREPLY elif [[ $SUPPRESS_SPACE == 1 ]] && [[ "${COMPREPLY-}" =~ [=/:]$ ]]; then @@ -144,7 +145,7 @@ def shellcode(executables, use_defaults=True, shell="bash", complete_arguments=N if script: function_suffix = "_" + script else: - script = "$1" + script = "" function_suffix = "" code = bashcode % dict( complete_opts=complete_options, diff --git a/contrib/python/argcomplete/py3/ya.make b/contrib/python/argcomplete/py3/ya.make index eebc255d35..9f84819376 100644 --- a/contrib/python/argcomplete/py3/ya.make +++ b/contrib/python/argcomplete/py3/ya.make @@ -2,7 +2,7 @@ PY3_LIBRARY() -VERSION(3.1.2) +VERSION(3.1.3) LICENSE(Apache-2.0) |