argcomplete 3.2.2__tar.gz → 3.3.0__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {argcomplete-3.2.2 → argcomplete-3.3.0}/Changes.rst +15 -0
- {argcomplete-3.2.2/argcomplete.egg-info → argcomplete-3.3.0}/PKG-INFO +1 -1
- {argcomplete-3.2.2 → argcomplete-3.3.0}/argcomplete/_check_console_script.py +1 -0
- {argcomplete-3.2.2 → argcomplete-3.3.0}/argcomplete/_check_module.py +1 -0
- {argcomplete-3.2.2 → argcomplete-3.3.0}/argcomplete/finders.py +14 -5
- {argcomplete-3.2.2 → argcomplete-3.3.0}/argcomplete/packages/_argparse.py +4 -1
- {argcomplete-3.2.2 → argcomplete-3.3.0}/argcomplete/shell_integration.py +10 -2
- {argcomplete-3.2.2 → argcomplete-3.3.0/argcomplete.egg-info}/PKG-INFO +1 -1
- {argcomplete-3.2.2 → argcomplete-3.3.0}/argcomplete.egg-info/SOURCES.txt +8 -1
- {argcomplete-3.2.2 → argcomplete-3.3.0}/pyproject.toml +3 -0
- argcomplete-3.3.0/test/test_package/test_module.py +6 -0
- argcomplete-3.3.0/test/test_package/test_package/__init__.py +16 -0
- argcomplete-3.3.0/test/test_package/test_package.egg-info/PKG-INFO +3 -0
- argcomplete-3.3.0/test/test_package/test_package.egg-info/SOURCES.txt +8 -0
- argcomplete-3.3.0/test/test_package/test_package.egg-info/dependency_links.txt +1 -0
- argcomplete-3.3.0/test/test_package/test_package.egg-info/entry_points.txt +3 -0
- argcomplete-3.3.0/test/test_package/test_package.egg-info/top_level.txt +2 -0
- {argcomplete-3.2.2 → argcomplete-3.3.0}/.github/FUNDING.yml +0 -0
- {argcomplete-3.2.2 → argcomplete-3.3.0}/.github/workflows/ci.yml +0 -0
- {argcomplete-3.2.2 → argcomplete-3.3.0}/.gitignore +0 -0
- {argcomplete-3.2.2 → argcomplete-3.3.0}/Authors.rst +0 -0
- {argcomplete-3.2.2 → argcomplete-3.3.0}/LICENSE.rst +0 -0
- {argcomplete-3.2.2 → argcomplete-3.3.0}/MANIFEST.in +0 -0
- {argcomplete-3.2.2 → argcomplete-3.3.0}/Makefile +0 -0
- {argcomplete-3.2.2 → argcomplete-3.3.0}/NOTICE +0 -0
- {argcomplete-3.2.2 → argcomplete-3.3.0}/README.rst +0 -0
- {argcomplete-3.2.2 → argcomplete-3.3.0}/SECURITY.md +0 -0
- {argcomplete-3.2.2 → argcomplete-3.3.0}/argcomplete/__init__.py +0 -0
- {argcomplete-3.2.2 → argcomplete-3.3.0}/argcomplete/bash_completion.d/_python-argcomplete +0 -0
- {argcomplete-3.2.2 → argcomplete-3.3.0}/argcomplete/completers.py +0 -0
- {argcomplete-3.2.2 → argcomplete-3.3.0}/argcomplete/exceptions.py +0 -0
- {argcomplete-3.2.2 → argcomplete-3.3.0}/argcomplete/io.py +0 -0
- {argcomplete-3.2.2 → argcomplete-3.3.0}/argcomplete/lexers.py +0 -0
- {argcomplete-3.2.2 → argcomplete-3.3.0}/argcomplete/packages/__init__.py +0 -0
- {argcomplete-3.2.2 → argcomplete-3.3.0}/argcomplete/packages/_shlex.py +0 -0
- {argcomplete-3.2.2 → argcomplete-3.3.0}/argcomplete/py.typed +0 -0
- {argcomplete-3.2.2 → argcomplete-3.3.0}/argcomplete.egg-info/dependency_links.txt +0 -0
- {argcomplete-3.2.2 → argcomplete-3.3.0}/argcomplete.egg-info/not-zip-safe +0 -0
- {argcomplete-3.2.2 → argcomplete-3.3.0}/argcomplete.egg-info/requires.txt +0 -0
- {argcomplete-3.2.2 → argcomplete-3.3.0}/argcomplete.egg-info/top_level.txt +0 -0
- {argcomplete-3.2.2 → argcomplete-3.3.0}/common.mk +0 -0
- {argcomplete-3.2.2 → argcomplete-3.3.0}/contrib/README.rst +0 -0
- {argcomplete-3.2.2 → argcomplete-3.3.0}/docs/changelog.rst +0 -0
- {argcomplete-3.2.2 → argcomplete-3.3.0}/docs/conf.py +0 -0
- {argcomplete-3.2.2 → argcomplete-3.3.0}/docs/examples/describe_github_user.py +0 -0
- {argcomplete-3.2.2 → argcomplete-3.3.0}/docs/fish_help_string.png +0 -0
- {argcomplete-3.2.2 → argcomplete-3.3.0}/docs/index.rst +0 -0
- {argcomplete-3.2.2 → argcomplete-3.3.0}/docs/toc.html +0 -0
- {argcomplete-3.2.2 → argcomplete-3.3.0}/scripts/activate-global-python-argcomplete +0 -0
- {argcomplete-3.2.2 → argcomplete-3.3.0}/scripts/python-argcomplete-check-easy-install-script +0 -0
- {argcomplete-3.2.2 → argcomplete-3.3.0}/scripts/register-python-argcomplete +0 -0
- {argcomplete-3.2.2 → argcomplete-3.3.0}/setup.cfg +0 -0
- {argcomplete-3.2.2 → argcomplete-3.3.0}/setup.py +0 -0
- {argcomplete-3.2.2 → argcomplete-3.3.0}/test/__init__.py +0 -0
- {argcomplete-3.2.2 → argcomplete-3.3.0}/test/inputrc +0 -0
- {argcomplete-3.2.2 → argcomplete-3.3.0}/test/prog +0 -0
- {argcomplete-3.2.2 → argcomplete-3.3.0}/test/test.py +0 -0
- {argcomplete-3.2.2 → argcomplete-3.3.0}/test/test_contrib_shells.py +0 -0
- {argcomplete-3.2.2 → argcomplete-3.3.0}/test/test_package/__init__.py +0 -0
- {argcomplete-3.2.2/test/test_package → argcomplete-3.3.0/test/test_package/build/lib}/test_module.py +0 -0
- {argcomplete-3.2.2/test/test_package → argcomplete-3.3.0/test/test_package/build/lib}/test_package/__init__.py +0 -0
- {argcomplete-3.2.2 → argcomplete-3.3.0}/test/test_package/setup.py +0 -0
|
@@ -1,3 +1,18 @@
|
|
|
1
|
+
Changes for v3.3.0 (2024-04-14)
|
|
2
|
+
===============================
|
|
3
|
+
|
|
4
|
+
- Preserve compatibility with argparse option tuples of length 4. This
|
|
5
|
+
update is required to use argcomplete on Python 3.11.9+ or 3.12.3+.
|
|
6
|
+
|
|
7
|
+
Changes for v3.2.3 (2024-03-07)
|
|
8
|
+
===============================
|
|
9
|
+
|
|
10
|
+
- Allow register-python-argcomplete output to be used as lazy-loaded
|
|
11
|
+
zsh completion module (#475)
|
|
12
|
+
|
|
13
|
+
- Move debug_stream initialization to helper method to allow fd 9
|
|
14
|
+
behavior to be overridden in subclasses (#471)
|
|
15
|
+
|
|
1
16
|
Changes for v3.2.2 (2024-01-23)
|
|
2
17
|
===============================
|
|
3
18
|
|
|
@@ -117,11 +117,7 @@ class CompletionFinder(object):
|
|
|
117
117
|
# not an argument completion invocation
|
|
118
118
|
return
|
|
119
119
|
|
|
120
|
-
|
|
121
|
-
_io.debug_stream = os.fdopen(9, "w")
|
|
122
|
-
except Exception:
|
|
123
|
-
_io.debug_stream = sys.stderr
|
|
124
|
-
debug()
|
|
120
|
+
self._init_debug_stream()
|
|
125
121
|
|
|
126
122
|
if output_stream is None:
|
|
127
123
|
filename = os.environ.get("_ARGCOMPLETE_STDOUT_FILENAME")
|
|
@@ -190,6 +186,19 @@ class CompletionFinder(object):
|
|
|
190
186
|
_io.debug_stream.flush()
|
|
191
187
|
exit_method(0)
|
|
192
188
|
|
|
189
|
+
def _init_debug_stream(self):
|
|
190
|
+
"""Initialize debug output stream
|
|
191
|
+
|
|
192
|
+
By default, writes to file descriptor 9, or stderr if that fails.
|
|
193
|
+
This can be overridden by derived classes, for example to avoid
|
|
194
|
+
clashes with file descriptors being used elsewhere (such as in pytest).
|
|
195
|
+
"""
|
|
196
|
+
try:
|
|
197
|
+
_io.debug_stream = os.fdopen(9, "w")
|
|
198
|
+
except Exception:
|
|
199
|
+
_io.debug_stream = sys.stderr
|
|
200
|
+
debug()
|
|
201
|
+
|
|
193
202
|
def _get_completions(self, comp_words, cword_prefix, cword_prequote, last_wordbreak_pos):
|
|
194
203
|
active_parsers = self._patch_argument_parser()
|
|
195
204
|
|
|
@@ -162,7 +162,10 @@ class IntrospectiveArgumentParser(ArgumentParser):
|
|
|
162
162
|
def consume_optional(start_index):
|
|
163
163
|
# get the optional identified at this index
|
|
164
164
|
option_tuple = option_string_indices[start_index]
|
|
165
|
-
|
|
165
|
+
if len(option_tuple) == 3:
|
|
166
|
+
action, option_string, explicit_arg = option_tuple
|
|
167
|
+
else: # Python 3.11.9+, 3.12.3+, 3.13+
|
|
168
|
+
action, option_string, _, explicit_arg = option_tuple
|
|
166
169
|
|
|
167
170
|
# identify additional optionals in the same arg string
|
|
168
171
|
# (e.g. -xyz is the same as -x -y -z if no args are required)
|
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
|
|
6
6
|
from shlex import quote
|
|
7
7
|
|
|
8
|
-
bashcode = r"""
|
|
8
|
+
bashcode = r"""#compdef %(executables)s
|
|
9
9
|
# Run something, muting output or redirecting it to the debug stream
|
|
10
10
|
# depending on the value of _ARC_DEBUG.
|
|
11
11
|
# If ARGCOMPLETE_USE_TEMPFILES is set, use tempfiles for IPC.
|
|
@@ -75,8 +75,16 @@ _python_argcomplete%(function_suffix)s() {
|
|
|
75
75
|
if [[ -z "${ZSH_VERSION-}" ]]; then
|
|
76
76
|
complete %(complete_opts)s -F _python_argcomplete%(function_suffix)s %(executables)s
|
|
77
77
|
else
|
|
78
|
+
# When called by the Zsh completion system, this will end with
|
|
79
|
+
# "loadautofunc" when initially autoloaded and "shfunc" later on, otherwise,
|
|
80
|
+
# the script was "eval"-ed so use "compdef" to register it with the
|
|
81
|
+
# completion system
|
|
78
82
|
autoload is-at-least
|
|
79
|
-
|
|
83
|
+
if [[ $zsh_eval_context == *func ]]; then
|
|
84
|
+
_python_argcomplete%(function_suffix)s "$@"
|
|
85
|
+
else
|
|
86
|
+
compdef _python_argcomplete%(function_suffix)s %(executables)s
|
|
87
|
+
fi
|
|
80
88
|
fi
|
|
81
89
|
"""
|
|
82
90
|
|
|
@@ -51,4 +51,11 @@ test/test_contrib_shells.py
|
|
|
51
51
|
test/test_package/__init__.py
|
|
52
52
|
test/test_package/setup.py
|
|
53
53
|
test/test_package/test_module.py
|
|
54
|
-
test/test_package/
|
|
54
|
+
test/test_package/build/lib/test_module.py
|
|
55
|
+
test/test_package/build/lib/test_package/__init__.py
|
|
56
|
+
test/test_package/test_package/__init__.py
|
|
57
|
+
test/test_package/test_package.egg-info/PKG-INFO
|
|
58
|
+
test/test_package/test_package.egg-info/SOURCES.txt
|
|
59
|
+
test/test_package/test_package.egg-info/dependency_links.txt
|
|
60
|
+
test/test_package/test_package.egg-info/entry_points.txt
|
|
61
|
+
test/test_package/test_package.egg-info/top_level.txt
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
# PYTHON_ARGCOMPLETE_OK
|
|
2
|
+
import argparse
|
|
3
|
+
|
|
4
|
+
import argcomplete
|
|
5
|
+
|
|
6
|
+
|
|
7
|
+
def main():
|
|
8
|
+
parser = argparse.ArgumentParser()
|
|
9
|
+
parser.add_argument("arg", choices=["arg"])
|
|
10
|
+
argcomplete.autocomplete(parser)
|
|
11
|
+
args = parser.parse_args()
|
|
12
|
+
print(args.arg)
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
if __name__ == "__main__":
|
|
16
|
+
main()
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{argcomplete-3.2.2 → argcomplete-3.3.0}/scripts/python-argcomplete-check-easy-install-script
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{argcomplete-3.2.2/test/test_package → argcomplete-3.3.0/test/test_package/build/lib}/test_module.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|