argcomplete 3.3.0__tar.gz → 3.4.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.
Files changed (63) hide show
  1. {argcomplete-3.3.0 → argcomplete-3.4.0}/Changes.rst +20 -0
  2. {argcomplete-3.3.0/argcomplete.egg-info → argcomplete-3.4.0}/PKG-INFO +1 -1
  3. {argcomplete-3.3.0 → argcomplete-3.4.0}/argcomplete/bash_completion.d/_python-argcomplete +3 -2
  4. {argcomplete-3.3.0 → argcomplete-3.4.0}/argcomplete/shell_integration.py +2 -2
  5. {argcomplete-3.3.0 → argcomplete-3.4.0/argcomplete.egg-info}/PKG-INFO +1 -1
  6. {argcomplete-3.3.0 → argcomplete-3.4.0}/argcomplete.egg-info/SOURCES.txt +1 -0
  7. argcomplete-3.4.0/test/stuck +6 -0
  8. {argcomplete-3.3.0 → argcomplete-3.4.0}/test/test.py +5 -1
  9. {argcomplete-3.3.0 → argcomplete-3.4.0}/.github/FUNDING.yml +0 -0
  10. {argcomplete-3.3.0 → argcomplete-3.4.0}/.github/workflows/ci.yml +0 -0
  11. {argcomplete-3.3.0 → argcomplete-3.4.0}/.gitignore +0 -0
  12. {argcomplete-3.3.0 → argcomplete-3.4.0}/Authors.rst +0 -0
  13. {argcomplete-3.3.0 → argcomplete-3.4.0}/LICENSE.rst +0 -0
  14. {argcomplete-3.3.0 → argcomplete-3.4.0}/MANIFEST.in +0 -0
  15. {argcomplete-3.3.0 → argcomplete-3.4.0}/Makefile +0 -0
  16. {argcomplete-3.3.0 → argcomplete-3.4.0}/NOTICE +0 -0
  17. {argcomplete-3.3.0 → argcomplete-3.4.0}/README.rst +0 -0
  18. {argcomplete-3.3.0 → argcomplete-3.4.0}/SECURITY.md +0 -0
  19. {argcomplete-3.3.0 → argcomplete-3.4.0}/argcomplete/__init__.py +0 -0
  20. {argcomplete-3.3.0 → argcomplete-3.4.0}/argcomplete/_check_console_script.py +0 -0
  21. {argcomplete-3.3.0 → argcomplete-3.4.0}/argcomplete/_check_module.py +0 -0
  22. {argcomplete-3.3.0 → argcomplete-3.4.0}/argcomplete/completers.py +0 -0
  23. {argcomplete-3.3.0 → argcomplete-3.4.0}/argcomplete/exceptions.py +0 -0
  24. {argcomplete-3.3.0 → argcomplete-3.4.0}/argcomplete/finders.py +0 -0
  25. {argcomplete-3.3.0 → argcomplete-3.4.0}/argcomplete/io.py +0 -0
  26. {argcomplete-3.3.0 → argcomplete-3.4.0}/argcomplete/lexers.py +0 -0
  27. {argcomplete-3.3.0 → argcomplete-3.4.0}/argcomplete/packages/__init__.py +0 -0
  28. {argcomplete-3.3.0 → argcomplete-3.4.0}/argcomplete/packages/_argparse.py +0 -0
  29. {argcomplete-3.3.0 → argcomplete-3.4.0}/argcomplete/packages/_shlex.py +0 -0
  30. {argcomplete-3.3.0 → argcomplete-3.4.0}/argcomplete/py.typed +0 -0
  31. {argcomplete-3.3.0 → argcomplete-3.4.0}/argcomplete.egg-info/dependency_links.txt +0 -0
  32. {argcomplete-3.3.0 → argcomplete-3.4.0}/argcomplete.egg-info/not-zip-safe +0 -0
  33. {argcomplete-3.3.0 → argcomplete-3.4.0}/argcomplete.egg-info/requires.txt +0 -0
  34. {argcomplete-3.3.0 → argcomplete-3.4.0}/argcomplete.egg-info/top_level.txt +0 -0
  35. {argcomplete-3.3.0 → argcomplete-3.4.0}/common.mk +0 -0
  36. {argcomplete-3.3.0 → argcomplete-3.4.0}/contrib/README.rst +0 -0
  37. {argcomplete-3.3.0 → argcomplete-3.4.0}/docs/changelog.rst +0 -0
  38. {argcomplete-3.3.0 → argcomplete-3.4.0}/docs/conf.py +0 -0
  39. {argcomplete-3.3.0 → argcomplete-3.4.0}/docs/examples/describe_github_user.py +0 -0
  40. {argcomplete-3.3.0 → argcomplete-3.4.0}/docs/fish_help_string.png +0 -0
  41. {argcomplete-3.3.0 → argcomplete-3.4.0}/docs/index.rst +0 -0
  42. {argcomplete-3.3.0 → argcomplete-3.4.0}/docs/toc.html +0 -0
  43. {argcomplete-3.3.0 → argcomplete-3.4.0}/pyproject.toml +0 -0
  44. {argcomplete-3.3.0 → argcomplete-3.4.0}/scripts/activate-global-python-argcomplete +0 -0
  45. {argcomplete-3.3.0 → argcomplete-3.4.0}/scripts/python-argcomplete-check-easy-install-script +0 -0
  46. {argcomplete-3.3.0 → argcomplete-3.4.0}/scripts/register-python-argcomplete +0 -0
  47. {argcomplete-3.3.0 → argcomplete-3.4.0}/setup.cfg +0 -0
  48. {argcomplete-3.3.0 → argcomplete-3.4.0}/setup.py +0 -0
  49. {argcomplete-3.3.0 → argcomplete-3.4.0}/test/__init__.py +0 -0
  50. {argcomplete-3.3.0 → argcomplete-3.4.0}/test/inputrc +0 -0
  51. {argcomplete-3.3.0 → argcomplete-3.4.0}/test/prog +0 -0
  52. {argcomplete-3.3.0 → argcomplete-3.4.0}/test/test_contrib_shells.py +0 -0
  53. {argcomplete-3.3.0 → argcomplete-3.4.0}/test/test_package/__init__.py +0 -0
  54. {argcomplete-3.3.0 → argcomplete-3.4.0}/test/test_package/build/lib/test_module.py +0 -0
  55. {argcomplete-3.3.0 → argcomplete-3.4.0}/test/test_package/build/lib/test_package/__init__.py +0 -0
  56. {argcomplete-3.3.0 → argcomplete-3.4.0}/test/test_package/setup.py +0 -0
  57. {argcomplete-3.3.0 → argcomplete-3.4.0}/test/test_package/test_module.py +0 -0
  58. {argcomplete-3.3.0 → argcomplete-3.4.0}/test/test_package/test_package/__init__.py +0 -0
  59. {argcomplete-3.3.0 → argcomplete-3.4.0}/test/test_package/test_package.egg-info/PKG-INFO +0 -0
  60. {argcomplete-3.3.0 → argcomplete-3.4.0}/test/test_package/test_package.egg-info/SOURCES.txt +0 -0
  61. {argcomplete-3.3.0 → argcomplete-3.4.0}/test/test_package/test_package.egg-info/dependency_links.txt +0 -0
  62. {argcomplete-3.3.0 → argcomplete-3.4.0}/test/test_package/test_package.egg-info/entry_points.txt +0 -0
  63. {argcomplete-3.3.0 → argcomplete-3.4.0}/test/test_package/test_package.egg-info/top_level.txt +0 -0
@@ -1,3 +1,23 @@
1
+ Changes for v3.4.0 (2024-06-16)
2
+ ===============================
3
+
4
+ - No stdin for python calls from bash completion functions (#488)
5
+
6
+ Prevents usage of stdin by (python) executables that are called
7
+ during completion generation. This prevents the completion locking up
8
+ the entire shell when the python script is broken i.e. it enters an
9
+ interactive mode (REPL) instead of generating the completions, as
10
+ expected.
11
+
12
+ - Localize shell variable REPLY to avoid overwriting users’ value
13
+ (#489)
14
+
15
+ The variable REPLY is used by default by the ``read`` shell builtin
16
+ to store the return value, and like all bash/zsh variables, is scoped
17
+ globally. This change allows this variable to be used for other needs
18
+ by appropriately scoping its internal use by an argcomplete utility
19
+ function that uses ``read``.
20
+
1
21
  Changes for v3.3.0 (2024-04-14)
2
22
  ===============================
3
23
 
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: argcomplete
3
- Version: 3.3.0
3
+ Version: 3.4.0
4
4
  Summary: Bash tab completion for argparse
5
5
  Home-page: https://github.com/kislyuk/argcomplete
6
6
  Author: Andrey Kislyuk
@@ -46,9 +46,9 @@ __python_argcomplete_run() {
46
46
 
47
47
  __python_argcomplete_run_inner() {
48
48
  if [[ -z "${_ARC_DEBUG-}" ]]; then
49
- "$@" 8>&1 9>&2 1>/dev/null 2>&1
49
+ "$@" 8>&1 9>&2 1>/dev/null 2>&1 </dev/null
50
50
  else
51
- "$@" 8>&1 9>&2 1>&9 2>&1
51
+ "$@" 8>&1 9>&2 1>&9 2>&1 </dev/null
52
52
  fi
53
53
  }
54
54
 
@@ -76,6 +76,7 @@ __python_argcomplete_scan_head() {
76
76
  local file="$1"
77
77
  local target="$2"
78
78
 
79
+ local REPLY
79
80
  if [[ -n "${ZSH_VERSION-}" ]]; then
80
81
  read -r -k 1024 -u 0 < "$file";
81
82
  else
@@ -24,9 +24,9 @@ __python_argcomplete_run() {
24
24
 
25
25
  __python_argcomplete_run_inner() {
26
26
  if [[ -z "${_ARC_DEBUG-}" ]]; then
27
- "$@" 8>&1 9>&2 1>/dev/null 2>&1
27
+ "$@" 8>&1 9>&2 1>/dev/null 2>&1 </dev/null
28
28
  else
29
- "$@" 8>&1 9>&2 1>&9 2>&1
29
+ "$@" 8>&1 9>&2 1>&9 2>&1 </dev/null
30
30
  fi
31
31
  }
32
32
 
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: argcomplete
3
- Version: 3.3.0
3
+ Version: 3.4.0
4
4
  Summary: Bash tab completion for argparse
5
5
  Home-page: https://github.com/kislyuk/argcomplete
6
6
  Author: Andrey Kislyuk
@@ -46,6 +46,7 @@ scripts/register-python-argcomplete
46
46
  test/__init__.py
47
47
  test/inputrc
48
48
  test/prog
49
+ test/stuck
49
50
  test/test.py
50
51
  test/test_contrib_shells.py
51
52
  test/test_package/__init__.py
@@ -0,0 +1,6 @@
1
+ #!/usr/bin/env python
2
+ # PYTHON_ARGCOMPLETE_OK
3
+ from sys import argv
4
+
5
+ if argv[1:] != ["no-input"]:
6
+ input()
@@ -73,7 +73,7 @@ def _repl_sh(command, args, non_printable_insert):
73
73
 
74
74
 
75
75
  def bash_repl(command="bash"):
76
- bashrc = os.path.join(os.path.dirname(pexpect.__file__), "replwrap", "bashrc.sh")
76
+ bashrc = os.path.join(os.path.dirname(pexpect.__file__), "bashrc.sh")
77
77
  sh = _repl_sh(command, ["--rcfile", bashrc], non_printable_insert="\\[\\]")
78
78
  return sh
79
79
 
@@ -1348,6 +1348,10 @@ class TestBashZshGlobalBase(TestBashZshBase):
1348
1348
  self.sh.run_command("cd " + TEST_DIR)
1349
1349
  self.assertEqual(self.sh.run_command("python3 ./pro\tbasic f\t"), "foo\r\n")
1350
1350
 
1351
+ def test_python_stuck(self):
1352
+ self.sh.run_command("cd " + TEST_DIR)
1353
+ self.sh.run_command("python3 ./stuck no\t-input")
1354
+
1351
1355
  def test_python_not_executable(self):
1352
1356
  """Test completing a script that cannot be run directly."""
1353
1357
  prog = os.path.join(TEST_DIR, "prog")
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