From 6841d888a4441f1ec795a08e84085a054b2fa2e396bd1a2f87699d5bc4008499 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Adrian=20Schr=C3=B6ter?= Date: Fri, 13 Dec 2024 11:09:38 +0100 Subject: [PATCH] Sync from SUSE:SLFO:Main python-argcomplete revision 2f9f7c2470030f45c3fad1e742a5c974 --- argcomplete-3.3.0.tar.gz | 3 --- argcomplete-3.4.0.tar.gz | 3 +++ argparse-3_12_7.patch | 22 ++++++++++++++++++++++ bash-repl.patch | 13 ------------- python-argcomplete.changes | 38 ++++++++++++++++++++++++++++++++++++++ python-argcomplete.spec | 9 +++++---- 6 files changed, 68 insertions(+), 20 deletions(-) delete mode 100644 argcomplete-3.3.0.tar.gz create mode 100644 argcomplete-3.4.0.tar.gz create mode 100644 argparse-3_12_7.patch delete mode 100644 bash-repl.patch diff --git a/argcomplete-3.3.0.tar.gz b/argcomplete-3.3.0.tar.gz deleted file mode 100644 index 25a9dfa..0000000 --- a/argcomplete-3.3.0.tar.gz +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:fd03ff4a5b9e6580569d34b273f741e85cd9e072f3feeeee3eba4891c70eda62 -size 81832 diff --git a/argcomplete-3.4.0.tar.gz b/argcomplete-3.4.0.tar.gz new file mode 100644 index 0000000..23bb668 --- /dev/null +++ b/argcomplete-3.4.0.tar.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:c2abcdfe1be8ace47ba777d4fce319eb13bf8ad9dace8d085dcad6eded88057f +size 82275 diff --git a/argparse-3_12_7.patch b/argparse-3_12_7.patch new file mode 100644 index 0000000..c5b0775 --- /dev/null +++ b/argparse-3_12_7.patch @@ -0,0 +1,22 @@ +From 480d112ba488fa6825db877201577270053dacce Mon Sep 17 00:00:00 2001 +From: Eggry Ran +Date: Sun, 6 Oct 2024 16:16:49 +0800 +Subject: [PATCH] Fix issue #507 + +--- + argcomplete/packages/_argparse.py | 2 ++ + 1 file changed, 2 insertions(+) + +diff --git a/argcomplete/packages/_argparse.py b/argcomplete/packages/_argparse.py +index 2a064f9..d10cf01 100644 +--- a/argcomplete/packages/_argparse.py ++++ b/argcomplete/packages/_argparse.py +@@ -162,6 +162,8 @@ def take_action(action, argument_strings, option_string=None): + def consume_optional(start_index): + # get the optional identified at this index + option_tuple = option_string_indices[start_index] ++ if isinstance(option_tuple, list): # Python 3.12.7+ ++ option_tuple = option_tuple[0] + if len(option_tuple) == 3: + action, option_string, explicit_arg = option_tuple + else: # Python 3.11.9+, 3.12.3+, 3.13+ diff --git a/bash-repl.patch b/bash-repl.patch deleted file mode 100644 index 6cdbc2e..0000000 --- a/bash-repl.patch +++ /dev/null @@ -1,13 +0,0 @@ -Index: argcomplete-3.0.8/test/test.py -=================================================================== ---- argcomplete-3.0.8.orig/test/test.py -+++ argcomplete-3.0.8/test/test.py -@@ -65,7 +65,7 @@ def _repl_sh(command, args, non_printabl - - - def bash_repl(command="bash"): -- bashrc = os.path.join(os.path.dirname(pexpect.__file__), "replwrap", "bashrc.sh") -+ bashrc = os.path.join(os.path.dirname(pexpect.__file__), "bashrc.sh") - sh = _repl_sh(command, ["--rcfile", bashrc], non_printable_insert="\\[\\]") - return sh - diff --git a/python-argcomplete.changes b/python-argcomplete.changes index fb9dc29..cc53cf3 100644 --- a/python-argcomplete.changes +++ b/python-argcomplete.changes @@ -1,3 +1,41 @@ +------------------------------------------------------------------- +Sun Oct 6 21:27:22 UTC 2024 - Matej Cepl + +- Add argparse-3_12_7.patch which should actually fix + gh#kislyuk/argcomplete#507. +- Remove skip-failing-tests-3_12_7.patch, which is now + unnecessary. + +------------------------------------------------------------------- +Sat Oct 5 14:53:29 UTC 2024 - Matej Cepl + +- Add skip-failing-tests-3_12_7.patch as a temporary workaround, + skip failing tests (gh#kislyuk/argcomplete#507). + +------------------------------------------------------------------- +Tue Aug 13 20:18:47 UTC 2024 - Dirk Müller + +- require ca-certificates-mozilla for the pip >= 24.2 + +------------------------------------------------------------------- +Mon Jul 15 11:25:31 UTC 2024 - John Paul Adrian Glaubitz + +- Update to 3.4.0 + * No stdin for python calls from bash completion functions (#488) + - Prevents usage of stdin by (python) executables that are called + during completion generation. This prevents the completion locking up + the entire shell when the python script is broken i.e. it enters an + interactive mode (REPL) instead of generating the completions, as + expected. + * Localize shell variable REPLY to avoid overwriting users’ value (#489) + - The variable REPLY is used by default by the ``read`` shell builtin + to store the return value, and like all bash/zsh variables, is scoped + globally. This change allows this variable to be used for other needs + by appropriately scoping its internal use by an argcomplete utility + function that uses ``read``. +- Drop patches for issued fixed upstream + * bash-repl.patch + ------------------------------------------------------------------- Thu Apr 18 06:26:52 UTC 2024 - Daniel Garcia diff --git a/python-argcomplete.spec b/python-argcomplete.spec index 0d198fd..68e6bf7 100644 --- a/python-argcomplete.spec +++ b/python-argcomplete.spec @@ -19,22 +19,23 @@ %{?sle15_python_module_pythons} Name: python-argcomplete -Version: 3.3.0 +Version: 3.4.0 Release: 0 Summary: Bash tab completion for argparse License: Apache-2.0 Group: Development/Languages/Python URL: https://github.com/kislyuk/argcomplete Source: https://files.pythonhosted.org/packages/source/a/argcomplete/argcomplete-%{version}.tar.gz -# Use correct place for auxiliary bashrc.sh file from pexpect -Patch3: bash-repl.patch +# PATCH-FIX-OPENSUSE argparse-3_12_7.patch gh#kislyuk/argcomplete#507 mcepl@suse.com +# fix the incompatibility with Python 3.12.7+ +Patch0: argparse-3_12_7.patch BuildRequires: %{python_module base >= 3.8} BuildRequires: %{python_module pexpect} BuildRequires: %{python_module pip} BuildRequires: %{python_module setuptools >= 67.2} BuildRequires: %{python_module setuptools_scm >= 6.2} BuildRequires: %{python_module wheel} -BuildRequires: ca-certificates +BuildRequires: ca-certificates-mozilla BuildRequires: fdupes BuildRequires: python-rpm-macros BuildRequires: zsh