diff options
author | robot-piglet <robot-piglet@yandex-team.com> | 2025-01-15 23:36:22 +0300 |
---|---|---|
committer | robot-piglet <robot-piglet@yandex-team.com> | 2025-01-15 23:51:50 +0300 |
commit | ca6fbaf1e911f8348d218b2d7f8448447d641e3e (patch) | |
tree | 55ce64918b29fafbd23072eb4262e995f3e26c48 /contrib/python | |
parent | 183b86950af6daa68f57eb29b6b8ef252d5b3a15 (diff) | |
download | ydb-ca6fbaf1e911f8348d218b2d7f8448447d641e3e.tar.gz |
Intermediate changes
commit_hash:1b87b2a6f000ceacee7f53a836db07357c429e18
Diffstat (limited to 'contrib/python')
-rw-r--r-- | contrib/python/argcomplete/py3/.dist-info/METADATA | 39 | ||||
-rw-r--r-- | contrib/python/argcomplete/py3/README.rst | 7 | ||||
-rw-r--r-- | contrib/python/argcomplete/py3/argcomplete/completers.py | 12 | ||||
-rw-r--r-- | contrib/python/argcomplete/py3/ya.make | 2 |
4 files changed, 34 insertions, 26 deletions
diff --git a/contrib/python/argcomplete/py3/.dist-info/METADATA b/contrib/python/argcomplete/py3/.dist-info/METADATA index 5298d4a927..fe74af8ae5 100644 --- a/contrib/python/argcomplete/py3/.dist-info/METADATA +++ b/contrib/python/argcomplete/py3/.dist-info/METADATA @@ -1,17 +1,18 @@ -Metadata-Version: 2.1 +Metadata-Version: 2.4 Name: argcomplete -Version: 3.5.2 +Version: 3.5.3 Summary: Bash tab completion for argparse -Home-page: https://github.com/kislyuk/argcomplete -Author: Andrey Kislyuk -Author-email: kislyuk@gmail.com -License: Apache Software License +Project-URL: Homepage, https://github.com/kislyuk/argcomplete Project-URL: Documentation, https://kislyuk.github.io/argcomplete Project-URL: Source Code, https://github.com/kislyuk/argcomplete Project-URL: Issue Tracker, https://github.com/kislyuk/argcomplete/issues Project-URL: Change Log, https://github.com/kislyuk/argcomplete/blob/develop/Changes.rst -Platform: MacOS X -Platform: Posix +Author: Andrey Kislyuk +Author-email: kislyuk@gmail.com +License: Apache Software License +License-File: LICENSE.rst +License-File: NOTICE +Classifier: Development Status :: 5 - Production/Stable Classifier: Environment :: Console Classifier: Intended Audience :: Developers Classifier: License :: OSI Approved :: Apache Software License @@ -27,21 +28,18 @@ 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 Classifier: Topic :: Software Development Classifier: Topic :: Software Development :: Libraries :: Python Modules Classifier: Topic :: System :: Shells Classifier: Topic :: Terminals Requires-Python: >=3.8 -Description-Content-Type: text/x-rst -License-File: LICENSE.rst -License-File: NOTICE Provides-Extra: test -Requires-Dist: coverage; extra == "test" -Requires-Dist: pexpect; extra == "test" -Requires-Dist: wheel; extra == "test" -Requires-Dist: ruff; extra == "test" -Requires-Dist: mypy; extra == "test" +Requires-Dist: coverage; extra == 'test' +Requires-Dist: mypy; extra == 'test' +Requires-Dist: pexpect; extra == 'test' +Requires-Dist: ruff; extra == 'test' +Requires-Dist: wheel; extra == 'test' +Description-Content-Type: text/x-rst argcomplete - Bash/zsh tab completion for argparse ================================================== @@ -85,6 +83,9 @@ follows: args = parser.parse_args() ... +If using ``pyproject.toml`` ``[project.scripts]`` entry points, the ``PYTHON_ARGCOMPLETE_OK`` marker should appear +at the beginning of the file that contains the entry point. + Register your Python application with your shell's completion framework by running ``register-python-argcomplete``:: eval "$(register-python-argcomplete my-python-app)" @@ -268,9 +269,9 @@ multiple Python versions on the same system, the version being used to run the s ``/etc/shells``, and run ``chsh`` to change your shell). You can check the version of the running copy of bash with ``echo $BASH_VERSION``. -.. note:: If you use setuptools/distribute ``scripts`` or ``entry_points`` directives to package your module, +.. note:: If you use ``project.scripts`` directives to provide command line entry points to your package, argcomplete will follow the wrapper scripts to their destination and look for ``PYTHON_ARGCOMPLETE_OK`` in the - destination code. + first kilobyte of the file containing the destination code. If you choose not to use global completion, or ship a completion module that depends on argcomplete, you must register your script explicitly using ``eval "$(register-python-argcomplete my-python-app)"``. Standard completion module diff --git a/contrib/python/argcomplete/py3/README.rst b/contrib/python/argcomplete/py3/README.rst index c134a566e6..13f0fa7ae3 100644 --- a/contrib/python/argcomplete/py3/README.rst +++ b/contrib/python/argcomplete/py3/README.rst @@ -40,6 +40,9 @@ follows: args = parser.parse_args() ... +If using ``pyproject.toml`` ``[project.scripts]`` entry points, the ``PYTHON_ARGCOMPLETE_OK`` marker should appear +at the beginning of the file that contains the entry point. + Register your Python application with your shell's completion framework by running ``register-python-argcomplete``:: eval "$(register-python-argcomplete my-python-app)" @@ -223,9 +226,9 @@ multiple Python versions on the same system, the version being used to run the s ``/etc/shells``, and run ``chsh`` to change your shell). You can check the version of the running copy of bash with ``echo $BASH_VERSION``. -.. note:: If you use setuptools/distribute ``scripts`` or ``entry_points`` directives to package your module, +.. note:: If you use ``project.scripts`` directives to provide command line entry points to your package, argcomplete will follow the wrapper scripts to their destination and look for ``PYTHON_ARGCOMPLETE_OK`` in the - destination code. + first kilobyte of the file containing the destination code. If you choose not to use global completion, or ship a completion module that depends on argcomplete, you must register your script explicitly using ``eval "$(register-python-argcomplete my-python-app)"``. Standard completion module diff --git a/contrib/python/argcomplete/py3/argcomplete/completers.py b/contrib/python/argcomplete/py3/argcomplete/completers.py index b62c593d64..610349f652 100644 --- a/contrib/python/argcomplete/py3/argcomplete/completers.py +++ b/contrib/python/argcomplete/py3/argcomplete/completers.py @@ -59,13 +59,17 @@ class FilesCompleter(BaseCompleter): completion = [] if self.allowednames: if self.directories: - files = _call(["bash", "-c", "compgen -A directory -- '{p}'".format(p=prefix)]) + # Using 'bind' in this and the following commands is a workaround to a bug in bash + # that was fixed in bash 5.3 but affects older versions. Environment variables are not treated + # correctly in older versions and calling bind makes them available. For details, see + # https://savannah.gnu.org/support/index.php?111125 + files = _call(["bash", "-c", "bind; compgen -A directory -- '{p}'".format(p=prefix)], stderr=subprocess.DEVNULL) completion += [f + "/" for f in files] for x in self.allowednames: - completion += _call(["bash", "-c", "compgen -A file -X '!*.{0}' -- '{p}'".format(x, p=prefix)]) + completion += _call(["bash", "-c", "bind; compgen -A file -X '!*.{0}' -- '{p}'".format(x, p=prefix)], stderr=subprocess.DEVNULL) else: - completion += _call(["bash", "-c", "compgen -A file -- '{p}'".format(p=prefix)]) - anticomp = _call(["bash", "-c", "compgen -A directory -- '{p}'".format(p=prefix)]) + completion += _call(["bash", "-c", "bind; compgen -A file -- '{p}'".format(p=prefix)], stderr=subprocess.DEVNULL) + anticomp = _call(["bash", "-c", "bind; compgen -A directory -- '{p}'".format(p=prefix)], stderr=subprocess.DEVNULL) completion = list(set(completion) - set(anticomp)) if self.directories: diff --git a/contrib/python/argcomplete/py3/ya.make b/contrib/python/argcomplete/py3/ya.make index e54ca26a82..dfa97494a9 100644 --- a/contrib/python/argcomplete/py3/ya.make +++ b/contrib/python/argcomplete/py3/ya.make @@ -2,7 +2,7 @@ PY3_LIBRARY() -VERSION(3.5.2) +VERSION(3.5.3) LICENSE(Apache-2.0) |