Skip to content

Commit ca6fbaf

Browse files
committed
Intermediate changes
commit_hash:1b87b2a6f000ceacee7f53a836db07357c429e18
1 parent 183b869 commit ca6fbaf

File tree

4 files changed

+34
-26
lines changed

4 files changed

+34
-26
lines changed

contrib/python/argcomplete/py3/.dist-info/METADATA

Lines changed: 20 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,18 @@
1-
Metadata-Version: 2.1
1+
Metadata-Version: 2.4
22
Name: argcomplete
3-
Version: 3.5.2
3+
Version: 3.5.3
44
Summary: Bash tab completion for argparse
5-
Home-page: https://github.com/kislyuk/argcomplete
6-
Author: Andrey Kislyuk
7-
Author-email: kislyuk@gmail.com
8-
License: Apache Software License
5+
Project-URL: Homepage, https://github.com/kislyuk/argcomplete
96
Project-URL: Documentation, https://kislyuk.github.io/argcomplete
107
Project-URL: Source Code, https://github.com/kislyuk/argcomplete
118
Project-URL: Issue Tracker, https://github.com/kislyuk/argcomplete/issues
129
Project-URL: Change Log, https://github.com/kislyuk/argcomplete/blob/develop/Changes.rst
13-
Platform: MacOS X
14-
Platform: Posix
10+
Author: Andrey Kislyuk
11+
Author-email: kislyuk@gmail.com
12+
License: Apache Software License
13+
License-File: LICENSE.rst
14+
License-File: NOTICE
15+
Classifier: Development Status :: 5 - Production/Stable
1516
Classifier: Environment :: Console
1617
Classifier: Intended Audience :: Developers
1718
Classifier: License :: OSI Approved :: Apache Software License
@@ -27,21 +28,18 @@ Classifier: Programming Language :: Python :: 3.11
2728
Classifier: Programming Language :: Python :: 3.12
2829
Classifier: Programming Language :: Python :: Implementation :: CPython
2930
Classifier: Programming Language :: Python :: Implementation :: PyPy
30-
Classifier: Development Status :: 5 - Production/Stable
3131
Classifier: Topic :: Software Development
3232
Classifier: Topic :: Software Development :: Libraries :: Python Modules
3333
Classifier: Topic :: System :: Shells
3434
Classifier: Topic :: Terminals
3535
Requires-Python: >=3.8
36-
Description-Content-Type: text/x-rst
37-
License-File: LICENSE.rst
38-
License-File: NOTICE
3936
Provides-Extra: test
40-
Requires-Dist: coverage; extra == "test"
41-
Requires-Dist: pexpect; extra == "test"
42-
Requires-Dist: wheel; extra == "test"
43-
Requires-Dist: ruff; extra == "test"
44-
Requires-Dist: mypy; extra == "test"
37+
Requires-Dist: coverage; extra == 'test'
38+
Requires-Dist: mypy; extra == 'test'
39+
Requires-Dist: pexpect; extra == 'test'
40+
Requires-Dist: ruff; extra == 'test'
41+
Requires-Dist: wheel; extra == 'test'
42+
Description-Content-Type: text/x-rst
4543

4644
argcomplete - Bash/zsh tab completion for argparse
4745
==================================================
@@ -85,6 +83,9 @@ follows:
8583
args = parser.parse_args()
8684
...
8785

86+
If using ``pyproject.toml`` ``[project.scripts]`` entry points, the ``PYTHON_ARGCOMPLETE_OK`` marker should appear
87+
at the beginning of the file that contains the entry point.
88+
8889
Register your Python application with your shell's completion framework by running ``register-python-argcomplete``::
8990

9091
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
268269
``/etc/shells``, and run ``chsh`` to change your shell). You can check the version of the running copy of bash with
269270
``echo $BASH_VERSION``.
270271

271-
.. note:: If you use setuptools/distribute ``scripts`` or ``entry_points`` directives to package your module,
272+
.. note:: If you use ``project.scripts`` directives to provide command line entry points to your package,
272273
argcomplete will follow the wrapper scripts to their destination and look for ``PYTHON_ARGCOMPLETE_OK`` in the
273-
destination code.
274+
first kilobyte of the file containing the destination code.
274275

275276
If you choose not to use global completion, or ship a completion module that depends on argcomplete, you must register
276277
your script explicitly using ``eval "$(register-python-argcomplete my-python-app)"``. Standard completion module

contrib/python/argcomplete/py3/README.rst

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,9 @@ follows:
4040
args = parser.parse_args()
4141
...
4242
43+
If using ``pyproject.toml`` ``[project.scripts]`` entry points, the ``PYTHON_ARGCOMPLETE_OK`` marker should appear
44+
at the beginning of the file that contains the entry point.
45+
4346
Register your Python application with your shell's completion framework by running ``register-python-argcomplete``::
4447

4548
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
223226
``/etc/shells``, and run ``chsh`` to change your shell). You can check the version of the running copy of bash with
224227
``echo $BASH_VERSION``.
225228

226-
.. note:: If you use setuptools/distribute ``scripts`` or ``entry_points`` directives to package your module,
229+
.. note:: If you use ``project.scripts`` directives to provide command line entry points to your package,
227230
argcomplete will follow the wrapper scripts to their destination and look for ``PYTHON_ARGCOMPLETE_OK`` in the
228-
destination code.
231+
first kilobyte of the file containing the destination code.
229232

230233
If you choose not to use global completion, or ship a completion module that depends on argcomplete, you must register
231234
your script explicitly using ``eval "$(register-python-argcomplete my-python-app)"``. Standard completion module

contrib/python/argcomplete/py3/argcomplete/completers.py

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -59,13 +59,17 @@ def __call__(self, prefix, **kwargs):
5959
completion = []
6060
if self.allowednames:
6161
if self.directories:
62-
files = _call(["bash", "-c", "compgen -A directory -- '{p}'".format(p=prefix)])
62+
# Using 'bind' in this and the following commands is a workaround to a bug in bash
63+
# that was fixed in bash 5.3 but affects older versions. Environment variables are not treated
64+
# correctly in older versions and calling bind makes them available. For details, see
65+
# https://savannah.gnu.org/support/index.php?111125
66+
files = _call(["bash", "-c", "bind; compgen -A directory -- '{p}'".format(p=prefix)], stderr=subprocess.DEVNULL)
6367
completion += [f + "/" for f in files]
6468
for x in self.allowednames:
65-
completion += _call(["bash", "-c", "compgen -A file -X '!*.{0}' -- '{p}'".format(x, p=prefix)])
69+
completion += _call(["bash", "-c", "bind; compgen -A file -X '!*.{0}' -- '{p}'".format(x, p=prefix)], stderr=subprocess.DEVNULL)
6670
else:
67-
completion += _call(["bash", "-c", "compgen -A file -- '{p}'".format(p=prefix)])
68-
anticomp = _call(["bash", "-c", "compgen -A directory -- '{p}'".format(p=prefix)])
71+
completion += _call(["bash", "-c", "bind; compgen -A file -- '{p}'".format(p=prefix)], stderr=subprocess.DEVNULL)
72+
anticomp = _call(["bash", "-c", "bind; compgen -A directory -- '{p}'".format(p=prefix)], stderr=subprocess.DEVNULL)
6973
completion = list(set(completion) - set(anticomp))
7074

7175
if self.directories:

contrib/python/argcomplete/py3/ya.make

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
PY3_LIBRARY()
44

5-
VERSION(3.5.2)
5+
VERSION(3.5.3)
66

77
LICENSE(Apache-2.0)
88

0 commit comments

Comments
 (0)