argcomplete 3.1.0__tar.gz → 3.1.2__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.
Files changed (57) hide show
  1. {argcomplete-3.1.0 → argcomplete-3.1.2}/Changes.rst +12 -0
  2. {argcomplete-3.1.0/argcomplete.egg-info → argcomplete-3.1.2}/PKG-INFO +9 -3
  3. {argcomplete-3.1.0 → argcomplete-3.1.2}/README.rst +1 -1
  4. {argcomplete-3.1.0 → argcomplete-3.1.2}/argcomplete/_check_console_script.py +2 -1
  5. {argcomplete-3.1.0 → argcomplete-3.1.2}/argcomplete/bash_completion.d/_python-argcomplete +7 -3
  6. {argcomplete-3.1.0 → argcomplete-3.1.2}/argcomplete/finders.py +7 -1
  7. {argcomplete-3.1.0 → argcomplete-3.1.2}/argcomplete/shell_integration.py +2 -3
  8. {argcomplete-3.1.0 → argcomplete-3.1.2/argcomplete.egg-info}/PKG-INFO +9 -3
  9. {argcomplete-3.1.0 → argcomplete-3.1.2}/pyproject.toml +1 -1
  10. {argcomplete-3.1.0 → argcomplete-3.1.2}/.github/FUNDING.yml +0 -0
  11. {argcomplete-3.1.0 → argcomplete-3.1.2}/.github/workflows/ci.yml +0 -0
  12. {argcomplete-3.1.0 → argcomplete-3.1.2}/.gitignore +0 -0
  13. {argcomplete-3.1.0 → argcomplete-3.1.2}/Authors.rst +0 -0
  14. {argcomplete-3.1.0 → argcomplete-3.1.2}/LICENSE.rst +0 -0
  15. {argcomplete-3.1.0 → argcomplete-3.1.2}/MANIFEST.in +0 -0
  16. {argcomplete-3.1.0 → argcomplete-3.1.2}/Makefile +0 -0
  17. {argcomplete-3.1.0 → argcomplete-3.1.2}/NOTICE +0 -0
  18. {argcomplete-3.1.0 → argcomplete-3.1.2}/SECURITY.md +0 -0
  19. {argcomplete-3.1.0 → argcomplete-3.1.2}/argcomplete/__init__.py +0 -0
  20. {argcomplete-3.1.0 → argcomplete-3.1.2}/argcomplete/_check_module.py +0 -0
  21. {argcomplete-3.1.0 → argcomplete-3.1.2}/argcomplete/completers.py +0 -0
  22. {argcomplete-3.1.0 → argcomplete-3.1.2}/argcomplete/exceptions.py +0 -0
  23. {argcomplete-3.1.0 → argcomplete-3.1.2}/argcomplete/io.py +0 -0
  24. {argcomplete-3.1.0 → argcomplete-3.1.2}/argcomplete/lexers.py +0 -0
  25. {argcomplete-3.1.0 → argcomplete-3.1.2}/argcomplete/packages/__init__.py +0 -0
  26. {argcomplete-3.1.0 → argcomplete-3.1.2}/argcomplete/packages/_argparse.py +0 -0
  27. {argcomplete-3.1.0 → argcomplete-3.1.2}/argcomplete/packages/_shlex.py +0 -0
  28. {argcomplete-3.1.0 → argcomplete-3.1.2}/argcomplete/py.typed +0 -0
  29. {argcomplete-3.1.0 → argcomplete-3.1.2}/argcomplete.egg-info/SOURCES.txt +0 -0
  30. {argcomplete-3.1.0 → argcomplete-3.1.2}/argcomplete.egg-info/dependency_links.txt +0 -0
  31. {argcomplete-3.1.0 → argcomplete-3.1.2}/argcomplete.egg-info/not-zip-safe +0 -0
  32. {argcomplete-3.1.0 → argcomplete-3.1.2}/argcomplete.egg-info/requires.txt +0 -0
  33. {argcomplete-3.1.0 → argcomplete-3.1.2}/argcomplete.egg-info/top_level.txt +0 -0
  34. {argcomplete-3.1.0 → argcomplete-3.1.2}/common.mk +0 -0
  35. {argcomplete-3.1.0 → argcomplete-3.1.2}/contrib/README.rst +0 -0
  36. {argcomplete-3.1.0 → argcomplete-3.1.2}/docs/changelog.rst +0 -0
  37. {argcomplete-3.1.0 → argcomplete-3.1.2}/docs/conf.py +0 -0
  38. {argcomplete-3.1.0 → argcomplete-3.1.2}/docs/examples/describe_github_user.py +0 -0
  39. {argcomplete-3.1.0 → argcomplete-3.1.2}/docs/fish_help_string.png +0 -0
  40. {argcomplete-3.1.0 → argcomplete-3.1.2}/docs/index.rst +0 -0
  41. {argcomplete-3.1.0 → argcomplete-3.1.2}/docs/toc.html +0 -0
  42. {argcomplete-3.1.0 → argcomplete-3.1.2}/scripts/activate-global-python-argcomplete +0 -0
  43. {argcomplete-3.1.0 → argcomplete-3.1.2}/scripts/python-argcomplete-check-easy-install-script +0 -0
  44. {argcomplete-3.1.0 → argcomplete-3.1.2}/scripts/register-python-argcomplete +0 -0
  45. {argcomplete-3.1.0 → argcomplete-3.1.2}/setup.cfg +0 -0
  46. {argcomplete-3.1.0 → argcomplete-3.1.2}/setup.py +0 -0
  47. {argcomplete-3.1.0 → argcomplete-3.1.2}/test/__init__.py +0 -0
  48. {argcomplete-3.1.0 → argcomplete-3.1.2}/test/__init__.pyc +0 -0
  49. {argcomplete-3.1.0 → argcomplete-3.1.2}/test/inputrc +0 -0
  50. {argcomplete-3.1.0 → argcomplete-3.1.2}/test/prog +0 -0
  51. {argcomplete-3.1.0 → argcomplete-3.1.2}/test/test.py +0 -0
  52. {argcomplete-3.1.0 → argcomplete-3.1.2}/test/test.pyc +0 -0
  53. {argcomplete-3.1.0 → argcomplete-3.1.2}/test/test_contrib_shells.py +0 -0
  54. {argcomplete-3.1.0 → argcomplete-3.1.2}/test/test_package/__init__.py +0 -0
  55. {argcomplete-3.1.0 → argcomplete-3.1.2}/test/test_package/setup.py +0 -0
  56. {argcomplete-3.1.0 → argcomplete-3.1.2}/test/test_package/test_module.py +0 -0
  57. {argcomplete-3.1.0 → argcomplete-3.1.2}/test/test_package/test_package/__init__.py +0 -0
@@ -1,3 +1,15 @@
1
+ Changes for v3.1.2 (2023-09-16)
2
+ ===============================
3
+
4
+ - Ensure Python 3.12+ compatibility in check_console_script (#448)
5
+
6
+ Changes for v3.1.1 (2023-06-11)
7
+ ===============================
8
+
9
+ - Search through asdf shims
10
+
11
+ - Use \` as escape character in PowerShell (#434)
12
+
1
13
  Changes for v3.1.0 (2023-06-10)
2
14
  ===============================
3
15
 
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: argcomplete
3
- Version: 3.1.0
3
+ Version: 3.1.2
4
4
  Summary: Bash tab completion for argparse
5
5
  Home-page: https://github.com/kislyuk/argcomplete
6
6
  Author: Andrey Kislyuk
@@ -33,9 +33,15 @@ Classifier: Topic :: System :: Shells
33
33
  Classifier: Topic :: Terminals
34
34
  Requires-Python: >=3.6
35
35
  Description-Content-Type: text/x-rst
36
- Provides-Extra: test
37
36
  License-File: LICENSE.rst
38
37
  License-File: NOTICE
38
+ Requires-Dist: importlib-metadata<7,>=0.23; python_version < "3.8"
39
+ 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"
39
45
 
40
46
  argcomplete - Bash/zsh tab completion for argparse
41
47
  ==================================================
@@ -268,7 +274,7 @@ multiple Python versions on the same system, the version being used to run the s
268
274
 
269
275
  If you choose not to use global completion, or ship a completion module that depends on argcomplete, you must register
270
276
  your script explicitly using ``eval "$(register-python-argcomplete my-python-app)"``. Standard completion module
271
- registration roules apply: namely, the script name is passed directly to ``complete``, meaning it is only tab completed
277
+ registration rules apply: namely, the script name is passed directly to ``complete``, meaning it is only tab completed
272
278
  when invoked exactly as it was registered. In the above example, ``my-python-app`` must be on the path, and the user
273
279
  must be attempting to complete it by that name. The above line alone would **not** allow you to complete
274
280
  ``./my-python-app``, or ``/path/to/my-python-app``.
@@ -229,7 +229,7 @@ multiple Python versions on the same system, the version being used to run the s
229
229
 
230
230
  If you choose not to use global completion, or ship a completion module that depends on argcomplete, you must register
231
231
  your script explicitly using ``eval "$(register-python-argcomplete my-python-app)"``. Standard completion module
232
- registration roules apply: namely, the script name is passed directly to ``complete``, meaning it is only tab completed
232
+ registration rules apply: namely, the script name is passed directly to ``complete``, meaning it is only tab completed
233
233
  when invoked exactly as it was registered. In the above example, ``my-python-app`` must be on the path, and the user
234
234
  must be attempting to complete it by that name. The above line alone would **not** allow you to complete
235
235
  ``./my-python-app``, or ``/path/to/my-python-app``.
@@ -39,7 +39,8 @@ def main():
39
39
 
40
40
  # The importlib_metadata backport returns a tuple of entry point objects
41
41
  # whereas the official library returns a SelectableGroups object
42
- if not use_entry_points_backport:
42
+ # Python 3.12+ behaves like the importlib_metadata backport
43
+ if not use_entry_points_backport and sys.version_info < (3, 12):
43
44
  entry_points = entry_points["console_scripts"] # type:ignore
44
45
 
45
46
  entry_points = [ep for ep in entry_points \
@@ -57,12 +57,12 @@ __python_argcomplete_upshift_bash_rematch() {
57
57
 
58
58
  # This function scans the beginning of an executable file provided as the first
59
59
  # argument ($1) for certain indicators, specified by the second argument ($2),
60
- # or the "target". There are three possible targets: "interpreter",
60
+ # or the "target". There are three possible targets: "interpreter",
61
61
  # "magic_string", and "easy_install". If the target is "interpreter", the
62
62
  # function matches the interpreter line, alongside any optional interpreter
63
63
  # arguments. If the target is "magic_string", a match is attempted for the
64
- # "PYTHON_ARGCOMPLETE_OK" magic string, indicating that the file should be
65
- # searched. If the target is "easy_install", the function matches either
64
+ # "PYTHON_ARGCOMPLETE_OK" magic string, indicating that the file should be run
65
+ # to get completions. If the target is "easy_install", the function matches either
66
66
  # "PBR Generated" or any of the "EASY-INSTALL" scripts (either SCRIPT,
67
67
  # ENTRY-SCRIPT, or DEV-SCRIPT). In all cases, only the first kilobyte of
68
68
  # the file is searched. The regex matches are returned in BASH_REMATCH,
@@ -88,6 +88,7 @@ __python_argcomplete_scan_head() {
88
88
  case "$target" in
89
89
  magic_string) regex='PYTHON_ARGCOMPLETE_OK' ;;
90
90
  easy_install) regex="(PBR Generated)|(EASY-INSTALL-(SCRIPT|ENTRY-SCRIPT|DEV-SCRIPT))" ;;
91
+ asdf) regex="asdf exec " ;;
91
92
  interpreter) regex='^#!(.*)$' ;;
92
93
  esac
93
94
 
@@ -170,6 +171,9 @@ _python_argcomplete_global() {
170
171
  if (__python_argcomplete_which pyenv && [[ "$SCRIPT_NAME" = $(pyenv root)/shims/* ]]) >/dev/null 2>&1; then
171
172
  local SCRIPT_NAME=$(pyenv which "$executable")
172
173
  fi
174
+ if (__python_argcomplete_which asdf && __python_argcomplete_scan_head_noerr "$SCRIPT_NAME" asdf) >/dev/null 2>&1; then
175
+ local SCRIPT_NAME=$(asdf which "$executable")
176
+ fi
173
177
  if __python_argcomplete_scan_head_noerr "$SCRIPT_NAME" magic_string; then
174
178
  ARGCOMPLETE=1
175
179
  elif __python_argcomplete_scan_head_noerr "$SCRIPT_NAME" interpreter; then
@@ -519,8 +519,14 @@ class CompletionFinder(object):
519
519
  special_chars = ""
520
520
  completions = [c.replace("'", r"'\''") for c in completions]
521
521
 
522
+ # PowerShell uses ` as escape character.
523
+ if os.environ.get("_ARGCOMPLETE_SHELL") == "powershell":
524
+ escape_char = '`'
525
+ special_chars = special_chars.replace('`', '')
526
+ else:
527
+ escape_char = "\\"
522
528
  for char in special_chars:
523
- completions = [c.replace(char, "\\" + char) for c in completions]
529
+ completions = [c.replace(char, escape_char + char) for c in completions]
524
530
 
525
531
  if self.append_space:
526
532
  # Similar functionality in bash was previously turned off by supplying the "-o nospace" option to complete.
@@ -1,4 +1,3 @@
1
- #!/usr/bin/env python
2
1
  # Copyright 2012-2023, Andrey Kislyuk and argcomplete contributors. Licensed under the terms of the
3
2
  # `Apache License, Version 2.0 <http://www.apache.org/licenses/LICENSE-2.0>`_. Distribution of the LICENSE and NOTICE
4
3
  # files with source copies of this package and derivative works is **REQUIRED** as specified by the Apache License.
@@ -105,13 +104,13 @@ Register-ArgumentCompleter -Native -CommandName %(executable)s -ScriptBlock {
105
104
  $env:_ARGCOMPLETE = 1
106
105
  $env:_ARGCOMPLETE_SUPPRESS_SPACE = 0
107
106
  $env:_ARGCOMPLETE_IFS = "`n"
107
+ $env:_ARGCOMPLETE_SHELL = "powershell"
108
108
  %(argcomplete_script)s 2>&1 | Out-Null
109
109
 
110
110
  Get-Content $completion_file | ForEach-Object {
111
111
  [System.Management.Automation.CompletionResult]::new($_, $_, "ParameterValue", $_)
112
112
  }
113
- rm $completion_file
114
- Remove-Item Env:\_ARGCOMPLETE_STDOUT_FILENAME, Env:\ARGCOMPLETE_USE_TEMPFILES, Env:\COMP_LINE, Env:\COMP_POINT, Env:\_ARGCOMPLETE, Env:\_ARGCOMPLETE_SUPPRESS_SPACE, Env:\_ARGCOMPLETE_IFS
113
+ Remove-Item $completion_file, Env:\_ARGCOMPLETE_STDOUT_FILENAME, Env:\ARGCOMPLETE_USE_TEMPFILES, Env:\COMP_LINE, Env:\COMP_POINT, Env:\_ARGCOMPLETE, Env:\_ARGCOMPLETE_SUPPRESS_SPACE, Env:\_ARGCOMPLETE_IFS, Env:\_ARGCOMPLETE_SHELL
115
114
  }
116
115
  """ # noqa: E501
117
116
 
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: argcomplete
3
- Version: 3.1.0
3
+ Version: 3.1.2
4
4
  Summary: Bash tab completion for argparse
5
5
  Home-page: https://github.com/kislyuk/argcomplete
6
6
  Author: Andrey Kislyuk
@@ -33,9 +33,15 @@ Classifier: Topic :: System :: Shells
33
33
  Classifier: Topic :: Terminals
34
34
  Requires-Python: >=3.6
35
35
  Description-Content-Type: text/x-rst
36
- Provides-Extra: test
37
36
  License-File: LICENSE.rst
38
37
  License-File: NOTICE
38
+ Requires-Dist: importlib-metadata<7,>=0.23; python_version < "3.8"
39
+ 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"
39
45
 
40
46
  argcomplete - Bash/zsh tab completion for argparse
41
47
  ==================================================
@@ -268,7 +274,7 @@ multiple Python versions on the same system, the version being used to run the s
268
274
 
269
275
  If you choose not to use global completion, or ship a completion module that depends on argcomplete, you must register
270
276
  your script explicitly using ``eval "$(register-python-argcomplete my-python-app)"``. Standard completion module
271
- registration roules apply: namely, the script name is passed directly to ``complete``, meaning it is only tab completed
277
+ registration rules apply: namely, the script name is passed directly to ``complete``, meaning it is only tab completed
272
278
  when invoked exactly as it was registered. In the above example, ``my-python-app`` must be on the path, and the user
273
279
  must be attempting to complete it by that name. The above line alone would **not** allow you to complete
274
280
  ``./my-python-app``, or ``/path/to/my-python-app``.
@@ -1,5 +1,5 @@
1
1
  [build-system]
2
- requires = ["setuptools>=67.7.2", "wheel", "setuptools_scm[toml]>=6.2"]
2
+ requires = ["setuptools>=67.7.2", "setuptools_scm[toml]>=6.2"]
3
3
  build-backend = "setuptools.build_meta"
4
4
 
5
5
  [project]
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