From 1c3ab90d82e48de763d47352a0802837d285899b7f88029b0f00b2f73a2e7f97 Mon Sep 17 00:00:00 2001 From: Dirk Mueller Date: Sat, 12 Jul 2025 17:20:29 +0000 Subject: [PATCH] =?UTF-8?q?-=20update=20to=203.6.2:=20=20=20*=20Revert=20?= =?UTF-8?q?=E2=80=9Czsh:=20skip=20repeat=20Python=20runs=20in=20the=20same?= =?UTF-8?q?=20completion=20=20=20=20=20run=E2=80=9D=20This=20reverts=20a?= =?UTF-8?q?=20regression=20introduced=20in=20zsh=20tab=20=20=20=20=20compl?= =?UTF-8?q?etion=20configurations=20utilizing=20multiple=20matchers.=20=20?= =?UTF-8?q?=20*=20zsh:=20add=20global=20completion=20system=20install=20di?= =?UTF-8?q?r=20to=20user=20fpath=20=20=20=20=20if=20not=20present=20=20=20?= =?UTF-8?q?*=20Update=20shell=5Fintegration.py=20to=20support=20spaces=20i?= =?UTF-8?q?n=20script=20file=20=20=20=20=20path.=20=20=20*=20Fix=20complet?= =?UTF-8?q?ion=20when=20wordbreak=20is=20first=20character=20=20=20*=20Sup?= =?UTF-8?q?port=20namespace=20package=20traversal=20when=20completing=20Py?= =?UTF-8?q?thon=20=20=20=20=20entry=20points=20=20=20*=20zsh:=20skip=20rep?= =?UTF-8?q?eat=20Python=20runs=20in=20the=20same=20completion=20run=20=20?= =?UTF-8?q?=20*=20Make=20=5Fparse=5Fknown=5Fargs=20signature=20more=20gene?= =?UTF-8?q?ral=20for=20future=20API=20=20=20=20=20changes=20=20=20*=20Use?= =?UTF-8?q?=20interactive=20shells=20and=20bind=20to=20make=20environment?= =?UTF-8?q?=20variable=20=20=20=20=20name=20completions=20work=20in=20olde?= =?UTF-8?q?r=20Bash=20versions=20=20=20*=20Fix=20=5Fparse=5Fknown=5Fargs?= =?UTF-8?q?=20monkeypatching=20Note:=20This=20fix=20is=20=20=20=20=20requi?= =?UTF-8?q?red=20to=20restore=20compatibility=20with=20Python=203.12.8=20a?= =?UTF-8?q?nd=20=20=20=20=203.13.1.=20=20=20*=20Note:=20This=20fix=20is=20?= =?UTF-8?q?required=20to=20restore=20compatibility=20with=20=20=20=20=20Py?= =?UTF-8?q?thon=203.12.8=20and=203.13.1.=20=20=20*=20CI=20improvements=20?= =?UTF-8?q?=20=20*=20Restore=20compatibility=20with=20argparse=20in=20Pyth?= =?UTF-8?q?on=203.12.7+=20=20=20*=20Use=20project.scripts=20instead=20of?= =?UTF-8?q?=20setuptools=20scripts=20=20=20*=20Test=20infrastructure=20imp?= =?UTF-8?q?rovements=20=20=20*=20No=20stdin=20for=20python=20calls=20from?= =?UTF-8?q?=20bash=20completion=20functions=20=20=20=20=20(#488)=20Prevent?= =?UTF-8?q?s=20usage=20of=20stdin=20by=20(python)=20executables=20that=20?= =?UTF-8?q?=20=20=20=20are=20called=20during=20completion=20generation.=20?= =?UTF-8?q?This=20prevents=20the=20=20=20=20=20completion=20locking=20up?= =?UTF-8?q?=20the=20entire=20shell=20when=20the=20python=20script=20=20=20?= =?UTF-8?q?=20=20is=20broken=20i.e.=C2=A0it=20enters=20an=20interactive=20?= =?UTF-8?q?mode=20(REPL)=20instead?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-argcomplete?expand=0&rev=94 --- .gitattributes | 23 ++ .gitignore | 1 + _multibuild | 3 + argcomplete-3.3.0.tar.gz | 3 + argcomplete-3.4.0.tar.gz | 3 + argcomplete-3.5.1.tar.gz | 3 + argcomplete-3.5.2.tar.gz | 3 + argcomplete-3.5.3.tar.gz | 3 + argcomplete-3.6.2.tar.gz | 3 + bash-repl.patch | 13 + python-argcomplete.changes | 706 ++++++++++++++++++++++++++++++++ python-argcomplete.spec | 118 ++++++ skip-failing-tests-3_12_7.patch | 126 ++++++ 13 files changed, 1008 insertions(+) create mode 100644 .gitattributes create mode 100644 .gitignore create mode 100644 _multibuild create mode 100644 argcomplete-3.3.0.tar.gz create mode 100644 argcomplete-3.4.0.tar.gz create mode 100644 argcomplete-3.5.1.tar.gz create mode 100644 argcomplete-3.5.2.tar.gz create mode 100644 argcomplete-3.5.3.tar.gz create mode 100644 argcomplete-3.6.2.tar.gz create mode 100644 bash-repl.patch create mode 100644 python-argcomplete.changes create mode 100644 python-argcomplete.spec create mode 100644 skip-failing-tests-3_12_7.patch diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 0000000..9b03811 --- /dev/null +++ b/.gitattributes @@ -0,0 +1,23 @@ +## Default LFS +*.7z filter=lfs diff=lfs merge=lfs -text +*.bsp filter=lfs diff=lfs merge=lfs -text +*.bz2 filter=lfs diff=lfs merge=lfs -text +*.gem filter=lfs diff=lfs merge=lfs -text +*.gz filter=lfs diff=lfs merge=lfs -text +*.jar filter=lfs diff=lfs merge=lfs -text +*.lz filter=lfs diff=lfs merge=lfs -text +*.lzma filter=lfs diff=lfs merge=lfs -text +*.obscpio filter=lfs diff=lfs merge=lfs -text +*.oxt filter=lfs diff=lfs merge=lfs -text +*.pdf filter=lfs diff=lfs merge=lfs -text +*.png filter=lfs diff=lfs merge=lfs -text +*.rpm filter=lfs diff=lfs merge=lfs -text +*.tbz filter=lfs diff=lfs merge=lfs -text +*.tbz2 filter=lfs diff=lfs merge=lfs -text +*.tgz filter=lfs diff=lfs merge=lfs -text +*.ttf filter=lfs diff=lfs merge=lfs -text +*.txz filter=lfs diff=lfs merge=lfs -text +*.whl filter=lfs diff=lfs merge=lfs -text +*.xz filter=lfs diff=lfs merge=lfs -text +*.zip filter=lfs diff=lfs merge=lfs -text +*.zst filter=lfs diff=lfs merge=lfs -text diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..57affb6 --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +.osc diff --git a/_multibuild b/_multibuild new file mode 100644 index 0000000..fcc7b97 --- /dev/null +++ b/_multibuild @@ -0,0 +1,3 @@ + + test + diff --git a/argcomplete-3.3.0.tar.gz b/argcomplete-3.3.0.tar.gz new file mode 100644 index 0000000..25a9dfa --- /dev/null +++ b/argcomplete-3.3.0.tar.gz @@ -0,0 +1,3 @@ +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/argcomplete-3.5.1.tar.gz b/argcomplete-3.5.1.tar.gz new file mode 100644 index 0000000..208bc17 --- /dev/null +++ b/argcomplete-3.5.1.tar.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:eb1ee355aa2557bd3d0145de7b06b2a45b0ce461e1e7813f5d066039ab4177b4 +size 82280 diff --git a/argcomplete-3.5.2.tar.gz b/argcomplete-3.5.2.tar.gz new file mode 100644 index 0000000..875af7e --- /dev/null +++ b/argcomplete-3.5.2.tar.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:23146ed7ac4403b70bd6026402468942ceba34a6732255b9edf5b7354f68a6bb +size 82341 diff --git a/argcomplete-3.5.3.tar.gz b/argcomplete-3.5.3.tar.gz new file mode 100644 index 0000000..97d9d72 --- /dev/null +++ b/argcomplete-3.5.3.tar.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:c12bf50eded8aebb298c7b7da7a5ff3ee24dffd9f5281867dfe1424b58c55392 +size 72999 diff --git a/argcomplete-3.6.2.tar.gz b/argcomplete-3.6.2.tar.gz new file mode 100644 index 0000000..13abcbb --- /dev/null +++ b/argcomplete-3.6.2.tar.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:d0519b1bc867f5f4f4713c41ad0aba73a4a5f007449716b16f385f2166dc6adf +size 73403 diff --git a/bash-repl.patch b/bash-repl.patch new file mode 100644 index 0000000..6cdbc2e --- /dev/null +++ b/bash-repl.patch @@ -0,0 +1,13 @@ +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 new file mode 100644 index 0000000..d5df612 --- /dev/null +++ b/python-argcomplete.changes @@ -0,0 +1,706 @@ +------------------------------------------------------------------- +Sat Jul 12 17:20:18 UTC 2025 - Dirk Müller + +- update to 3.6.2: + * Revert “zsh: skip repeat Python runs in the same completion + run” This reverts a regression introduced in zsh tab + completion configurations utilizing multiple matchers. + * zsh: add global completion system install dir to user fpath + if not present + * Update shell_integration.py to support spaces in script file + path. + * Fix completion when wordbreak is first character + * Support namespace package traversal when completing Python + entry points + * zsh: skip repeat Python runs in the same completion run + * Make _parse_known_args signature more general for future API + changes + * Use interactive shells and bind to make environment variable + name completions work in older Bash versions + * Fix _parse_known_args monkeypatching Note: This fix is + required to restore compatibility with Python 3.12.8 and + 3.13.1. + * Note: This fix is required to restore compatibility with + Python 3.12.8 and 3.13.1. + * CI improvements + * Restore compatibility with argparse in Python 3.12.7+ + * Use project.scripts instead of setuptools scripts + * Test infrastructure improvements + * 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. + * Preserve compatibility with argparse option tuples of length + 4. This update is required to use argcomplete on Python + 3.11.9+ or 3.12.3+. + * Allow register-python-argcomplete output to be used as lazy- + loaded zsh completion module + * Move debug_stream initialization to helper method to allow fd + 9 behavior to be overridden in subclasses + * Allow explicit zsh global completion activation + * Fix and test global completion in zsh + * Add –yes option to activate-global-python-argcomplete + * Test suite improvements + * Respect user choice in activate-global-python-argcomplete + * Escape colon in zsh completions. Fixes #456 + * Call _default as a fallback in zsh global completion + * Use homebrew prefix by default + * zsh: Allow to use external script + * Add support for Python 3.12 and drop EOL 3.6 and 3.7 + * Use homebrew prefix by default + * zsh: Allow to use external script + * Add support for Python 3.12 and drop EOL 3.6 and 3.7 + * Ensure Python 3.12+ compatibility in check_console_script + * Search through asdf shims + * Use ` as escape character in PowerShell + * setup.py -> pyproject.toml migration start + * Improve user install logic in activate-global-python- + argcomplete + * Ensure Python 3.7 compatibility in check_console_script + * ZSH implementation fixes + * Documentation improvements + * Test suite shell wrapper: Accept OSError on exit + * Test suite: Use general regex to cut zsh reset ANSI sequences + * Allow importlib-metadata 6.x; skip test failures on Python + 3.7 + * Note completers can return iterables of strings, not just + lists + * Documentation and test improvements + * Call _default as fallback in zsh global completion hook + * Begin support for mapping-emitting completers + * activate-global-python-argcomplete: do not overwrite existing + dotfile in user directory + * Add NOTICE file + * Establish long term name for split_line as + argcomplete.lexers.split_line + * Re-add split_line to API + * Fix zsh autoload issues + * Fully support zsh. Argcomplete now supports completion + descriptions and global completion in zsh. + * Clean up top level namespace. + * Documentation and test improvements. + * Test infrastructure improvements + * Indicate that there is no support commitment for fish and + tcsh shells + * Documentation and test improvements + * Remove scripts for contrib-supported shells from global + namespace + * setup.py: exclude test.* subpackages from find_packages + * Support PowerShell + * CI updates + * Revert “Support powershell (#392)” + * Fix interrupted release (v2.0.1) + * Fix interrupted release (v2.0.1) + * Fix interrupted release (v2.0.1) + * Support powershell + * Update importlib-metadata dependency to include versions 5.x + * Test and documentation improvements + * Truncate input after cursor. Fixes #351 + * Support of path completion in fish #327 + * Drop support for Python 2.7 and 3.5 + * Add support for Python 3.10 + * Test, documentation, and release infrastructure improvements + * Update importlib-metadata version pin + * Display script debug output in tcsh + * Fish support improvements + * Print warn() message from beginning of line + * Test infrastructure improvements + * Update importlib-metadata dependency pin + * Add change log project URL + * Replace Travis CI with GitHub Actions + * Update importlib-metadata dependency version range + * Bash nounset mode fixes + * Add -o bashdefault to register-python-argcomplete’s output + command + * Use shell builtins where possible + * Switch from pkg_resources to importlib + * Remove .sh extension by bash-completion convention + * Catch exceptions in _check_module + * Documentation and test improvements + * Do not suggest options after – (end-of-options delimiter) + * Include all test directory contents in source distribution + * Trigger completers on –optional=PARTIAL_VALUE + * Complete console scripts installed from wheels + * Fish support #68 (#260), thanks to @volkov + * check_module: Don’t crash, exit with error instead + * Register completion for multiple commands + * Use the correct interpreter when checking wrappers + * Provide shellcode as a module function + * Fix handling of COMP_POINT + * Fix crash when writing unicode to debug_stream in Python 2 + * Fix release + * Fix release + * Add SuppressCompleter to skip completion for specific + arguments while allowing help text + * Redirect all output to debug stream in debug mode + * Complete python -m module + * Fix bug introduced in v0.7.1 where completers would not + receive the parser keyword argument. + * Documentation improvements. + * Fix completion after tokens with wordbreak chars + * Simplify nospace handling in global completion + * Specially handle all characters in COMP_WORDBREAKS + * Use setuptools tests-require directive, fixes #186 + * Complete files using the specified interpreter + * Fix completion for scripts run via python + * Clarify argument to register-python-argcomplete + * Fix handling of commas and other special chars (#172); handle + more special characters + * Fix handling of special characters in tcsh + * Update my_shlex to Python 3.6 version + * Fix additional trailing space in exact matches + * Adjust tests to handle development environments + * Fix tcsh tests on OSX (#177); Update bash on OSX (#176); + Check output of test setup command + * Optionally disable duplicated flags + * Add default_completer option to CompletionFinder.call + * Let bash add or suppress trailing space + * Restore parser to its original state to allow reuse after + completion (#150). + * Expose COMP_TYPE environment variable (#157). Thanks to Matt + Clay (@mattclay). + * Test infrastructure and documentation improvements. + * Add support for tcsh + * Fix handling of unquoted completions containing $ + * Don't insert unnecessary leading quote char in completions + * Fix parser reuse with positional arguments + * Tests: Add simple pexpect tests for bash (#153); Add test + case to verify #20 is fixed + * Thanks to @davvid and @evanunderscore for their work on this + release. + * Packaging fix + * Do not suggest options from mutually exclusive groups (#145). + * activate-global-python-argcomplete runs on Homebrew out of + the box + * Correctly handle suggestions for positionals with variable- + length nargs. Thanks to @evanunderscore (#132, #133). + * Correctly handle suggestions with custom nargs for optionals. + Thanks to @evanunderscore (#131). + * Fix propagation of partially parsed subparser namespace into + parent parser namespace upon subparser failure due to partial + args. This allows completers to access partial parse results + for subparser optionals in parsed_args (#114). + * The default completer can now be specified when manually + instantiating CompletionFinder. Thanks to @avylove (#130). + * Use FilesCompleter as default completer fallback (#120). + * Recognize subclasses of argparse._SubParsersAction. Thanks to + Stephen Koo (#118). + * Support parsed_args in custom completers with missing args. + Thanks to Dan Kilman (#124). + * Non-ASCII support in FilesCompleter. + * Automatically enable FilesCompleter for argparse.FileType + arguments. + * Don't print args with suppressed help by default; add + argcomplete.autocomplete(print_suppressed=True) to control + this behavior (#113). + * Fix always_complete_options=False support (#115). + * Correct doc filename in setup.cfg (fixes bdist_rpm failure, + Issue 111). + * Make context managers exception-safe. Thanks to Mikołaj + Siedlarek (pull request #110). + * Build and upload universal wheel packages in release. + * Fix issue with non-string choices for arguments. Thanks to + @neizod (pull request #107). + * Improve non-ascii argparse argument support on Python 2.7. + * register-python-argcomplete: add option to avoid default + readline completion. Thanks to @drmalex07 (pull request #99). + * Expand tilde in script name, allowing argcomplete to work + when invoking scripts from one's home directory. Thanks to + @VorpalBlade (Issue 104). + * Fix issues related to using argcomplete in a REPL + environment. + * New helper method for custom completion display. + * Expand test suite; formatting cleanup. + * Fix issue related to using argcomplete in a REPL environment. + Thanks to @wapiflapi (pull request #91). + * Fix multiple issues related to using argcomplete in a REPL + environment. Thanks to @wapiflapi (pull request #90). + * Don't strip colon prefix in completion results if + COMP_WORDBREAKS does not contain a colon. Thanks to @berezv + (pull request #88). + * Use complete --nospace to avoid issues with directory + completion. + * Refactor main body of code into a class to enable subclassing + and overriding of functionality (Issue #78). + * New keyword option "argcomplete.autocomplete(validator=...)" + to supply a custom validator or bypass default validation. + Thanks to @thijsdezoete (Issue #77). + * Document debug options. + * New keyword option "argcomplete.autocomplete(exclude=[...])" + to suppress options (Issue #74). + * More speedups to code path for global completion hook + negative result. + * Fix handling of development mode script wrappers. Thanks to + @jmlopez-rod and @dcosson (Issue #69). + * Speed up code path for global completion hook negative result + by loading pkg_resources on demand. + * Begin tracking changes in changelog. + * Add completion support for PBR installed scripts (PR #71). + * Detect easy-install shims with shebang lines that contain Py + instead of py (Issue #69). + +------------------------------------------------------------------- +Mon Jun 16 12:11:26 UTC 2025 - Markéta Machová + +- Convert to libalternatives + +------------------------------------------------------------------- +Wed Jun 11 08:32:32 UTC 2025 - Steve Kowalik + +- Remove executable bit on files installed outside of the path. (bsc#1244435) + +------------------------------------------------------------------- +Sat Jun 7 08:06:26 UTC 2025 - Johannes Kastl + +- Update to version 3.5.3 + * Use interactive shells and bind to make environment variable + name completions work in older Bash versions (#506) + +------------------------------------------------------------------- +Tue Dec 10 11:12:48 UTC 2024 - Markéta Machová + +- Update to version 3.5.2 + * Fix _parse_known_args monkeypatching. This fix is required to restore + compatibility with Python 3.12.8 and 3.13.1. + +------------------------------------------------------------------- +Tue Oct 29 17:07:05 UTC 2024 - Matej Cepl + +- Update to the version 3.5.1: + - Restore compatibility with argparse in Python 3.12.7+ + - Use project.scripts instead of setuptools scripts + - Test infrastructure improvements +- Remove upstreamed patches: + - argparse-3_12_7.patch +- Add _multibuild (to make testing against fully installed package) + +------------------------------------------------------------------- +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 + +- Update to 3.3.0 (bsc#1222880): + * Preserve compatibility with argparse option tuples of length 4. + This update is required to use argcomplete on Python 3.11.9+ or + 3.12.3+. +- update to 3.2.3: + * Allow register-python-argcomplete output to be used as lazy-loaded + zsh completion module (#475) + - Move debug_stream initialization to helper method to allow fd 9 + behavior to be overridden in subclasses (#471) + +------------------------------------------------------------------- +Tue Jan 30 12:07:05 UTC 2024 - Dirk Müller + +- update to 3.2.2: + * Expand tilde in zsh + +------------------------------------------------------------------- +Wed Jan 3 10:54:17 UTC 2024 - Ben Greiner + +- Remove coverage check +- Fix zsh test failures: avoid coloring terminal + +------------------------------------------------------------------- +Fri Dec 29 18:27:06 UTC 2023 - Dirk Müller + +- update to 3.2.1: + * Allow explicit zsh global completion activation (#467) + * Fix and test global completion in zsh (#463, #466) + * Add –yes option to activate-global-python-argcomplete (#461) + * Test suite improvements +- drop without_zsh.patch: obsolete + +------------------------------------------------------------------- +Mon Nov 27 15:26:30 UTC 2023 - Dirk Müller + +- update to 3.1.6: + * Respect user choice in activate-global-python-argcomplete + * Escape colon in zsh completions. Fixes #456 + * Call \_default as a fallback in zsh global completion + +------------------------------------------------------------------- +Fri Nov 10 12:26:40 UTC 2023 - Dirk Müller + +- update to 3.1.4: + * Call \_default as a fallback in zsh global completion + * zsh: Allow to use external script (#453) + * Add support for Python 3.12 and drop EOL 3.6 and 3.7 (#449) + * Use homebrew prefix by default + * zsh: Allow to use external script (#453) + +------------------------------------------------------------------- +Tue Oct 24 12:01:08 UTC 2023 - Dirk Müller + +- add setuptools_scm for proper version detection + +------------------------------------------------------------------- +Thu Oct 5 08:46:50 UTC 2023 - Dirk Müller + +- update to 3.1.2: + *Ensure Python 3.12+ compatibility in check_console_script + +------------------------------------------------------------------- +Tue Jul 4 11:24:40 UTC 2023 - John Paul Adrian Glaubitz + +- Update to version 3.1.1 + * Search through asdf shims + * Use \` as escape character in PowerShell (#434) +- from version 3.1.0 + * setup.py -> pyproject.toml migration start (#427) + * Improve user install logic in activate-global-python-argcomplete (#437) + * Ensure Python 3.7 compatibility in check_console_script (#436) + * ZSH implementation fixes (#431, #433) + * Documentation improvements +- Drop obsolete patch + * trim-test-deps.patch + +------------------------------------------------------------------- +Tue May 30 16:02:49 UTC 2023 - Andreas Schwab + +- bash-repl.patch: Use correct place for auxiliary bashrc.sh file from pexpect + +------------------------------------------------------------------- +Fri May 5 11:23:29 UTC 2023 - Daniel Garcia + +- Add without_zsh.patch +- Delete skip_tcsh_tests.patch +- Delete without_fish.patch +- Update to 3.0.8: + * Test suite shell wrapper: Accept OSError on exit +- 3.0.7: + * Test suite: Use general regex to cut zsh reset ANSI sequences (#425) +- 3.0.6: + * Allow importlib-metadata 6.x; skip test failures on Python 3.7 (#420, #424) + * Note completers can return iterables of strings, not just lists (#422) + * Documentation and test improvements +- 3.0.5: + * Call _default as fallback in zsh global completion hook + * Begin support for mapping-emitting completers +- 3.0.4: + * activate-global-python-argcomplete: do not overwrite existing dotfile in user directory + * Add NOTICE file + * Establish long term name for split_line as argcomplete.lexers.split_line +- 3.0.3: + * Re-add split_line to API (#419) +- 3.0.2: + * Fix zsh default completion issues +- 3.0.1: + * Fix zsh autoload issues +- 3.0.0: + * Fully support zsh. Argcomplete now supports completion + descriptions and global completion in zsh. + * Clean up top level namespace. + * Documentation and test improvements. +- 2.1.2: + * Test infrastructure improvements + * Indicate that there is no support commitment for fish and tcsh shells +- 2.1.1: + * Documentation and test improvements +- 2.1.0: + * Remove scripts for contrib-supported shells from global namespace +- 2.0.6: + * setup.py: exclude test.* subpackages from find_packages (#406) + * Support PowerShell (#405) + * CI updates +- 2.0.5: + * Revert "Support powershell (#392)" + +------------------------------------------------------------------- +Fri Apr 21 12:21:56 UTC 2023 - Dirk Müller + +- add sle15_python_module_pythons (jsc#PED-68) + +------------------------------------------------------------------- +Thu Apr 13 22:39:57 UTC 2023 - Matej Cepl + +- Make calling of %{sle15modernpython} optional. + +------------------------------------------------------------------- +Fri Mar 24 10:47:53 UTC 2023 - Daniel Garcia + +- Remove importlib-metadata requirement, it's not needed for python > 3.7 + +------------------------------------------------------------------- +Thu Mar 16 09:32:50 UTC 2023 - Matej Cepl + +- Add without_fish.patch which makes fish only optional + BuildRequires (gh#kislyuk/argcomplete!410). + +------------------------------------------------------------------- +Tue Jan 31 23:49:21 UTC 2023 - Dirk Müller + +- fix substitution on tests/test.py to test the current python flavor + +------------------------------------------------------------------- +Wed Jul 6 10:04:40 UTC 2022 - Dirk Müller + +- update to 2.0.0: + * Truncate input after cursor. + * Support of path completion in fish + * Drop support for Python 2.7 and 3.5 + * Add support for Python 3.10 + * Test, documentation, and release infrastructure improvements + +------------------------------------------------------------------- +Sun Jun 6 11:43:24 UTC 2021 - Dirk Müller + +- update to 1.12.3: + * Update importlib-metadata version pin + * Display script debug output in tcsh + * Fish support improvements + * Print ``warn()`` message from beginning of line + * Test infrastructure improvements + +------------------------------------------------------------------- +Sun Dec 20 09:17:00 UTC 2020 - Dirk Müller + +- update to 1.12.2: + - Update importlib-metadata dependency pin (#332) + - Add change log project URL (#312) + - Replace Travis CI with GitHub Actions (#323) + - Update importlib-metadata dependency version range + - Bash nounset mode fixes (#313) +- remove 0001-Remove-expected-test-failure-for-new-versions-of-fish.patch (upstream) + +------------------------------------------------------------------- +Wed May 27 13:01:18 UTC 2020 - Petr Gajdos + +- %python3_only -> %python_alternative + +------------------------------------------------------------------- +Thu Apr 30 06:05:59 UTC 2020 - Tomáš Chvátal + +- Fix test execution without /usr/bin/python + +------------------------------------------------------------------- +Thu Mar 26 09:44:38 UTC 2020 - Antonio Larrosa + +- Add patch from upstream to fix tests with latest fish version: + * 0001-Remove-expected-test-failure-for-new-versions-of-fish.patch + +------------------------------------------------------------------- +Fri Jan 17 10:42:58 UTC 2020 - Marketa Calabkova + +- update to 1.11.1 + * Add -o bashdefault to register-python-argcomplete’s output command + * Use shell builtins where possible + * Switch from pkg_resources to importlib + * Remove .sh extension by bash-completion convention + * Do not suggest options after – + * Include all test directory contents in source distribution + * Trigger completers on –optional=PARTIAL_VALUE + * Documentation and test improvements + +------------------------------------------------------------------- +Fri Sep 13 12:45:13 UTC 2019 - Tomáš Chvátal + +- Update to 1.10.0: + * fish support +- Refresh patch skip_tcsh_tests.patch + +------------------------------------------------------------------- +Fri Apr 5 11:02:52 UTC 2019 - Tomáš Chvátal + +- Update to 1.9.5: + * check_module: Don’t crash, exit with error instead (#261) + * Register completion for multiple commands (#246) + +------------------------------------------------------------------- +Mon Feb 25 05:52:03 UTC 2019 - John Vandenberg + +- Trim unnecessary build dependencies using trim-test-deps.patch +- Simplify skip_tcsh_tests.patch so it is easier to read and update +- Update to v1.9.4 + * Use the correct interpreter when checking wrappers + * Provide shellcode as a module function (#237) +- from v1.9.3 + * Fix handling of COMP\_POINT + * Fix crash when writing unicode to debug\_stream in Python 2 + +------------------------------------------------------------------- +Tue Dec 4 12:45:38 UTC 2018 - Matej Cepl + +- Remove superfluous devel dependency for noarch package + +------------------------------------------------------------------- +Fri Sep 15 13:49:08 UTC 2017 - adrian.glaubitz@suse.com + +- New upstream release + + Version 1.9.2 +- Update patch to skip broken tcsh tests + + skip_tcsh_tests.patch +- Fix issues with singlespec auto-conversion + + Install %{python_sitelib}/bash_completion.d/python-argcomplete.sh + into %{_sysconfdir}/bash_completion.d/ + + Use %python_clone to create both Python 2 and Python 3 versions + of all scripts below /usr/bin and /etc/bash_completion.d + with the %{python_version} suffix; also install the Python 3 + versions without the suffix + +------------------------------------------------------------------- +Thu Aug 24 13:32:49 UTC 2017 - jmatejek@suse.com + +- singlespec auto-conversion + +------------------------------------------------------------------- +Thu Jul 20 09:48:53 UTC 2017 - sebix+novell.com@sebix.at + +- update to 1.8.2 +- add patch skip_tcsh_tests.patch to skip broken tcsh tests + +------------------------------------------------------------------- +Tue Nov 02 20:50:53 UTC 2016 - achim.herwig@wodca.de + +- ported back from python3 package including + introduced update-alternatives to coexist with corresponding python3 package + +------------------------------------------------------------------- +Sat Dec 12 17:49:43 UTC 2015 - mimi.vx@gmail.com + +- update to 1.0.0 +* Don't print args with suppressed help by default; add + argcomplete.autocomplete(print_suppressed=True) to control this behavior +* Fix always_complete_options=False support. +* Correct doc filename in setup.cfg +* Make context managers exception-safe. +* Fix issue with non-string choices for arguments. +* Improve non-ascii argparse argument support on Python 2.7. + +------------------------------------------------------------------- +Sun Apr 19 16:08:50 UTC 2015 - benoit.monin@gmx.fr + +- update to 0.8.7: + * register-python-argcomplete: add option to avoid default + readline completion. Thanks to @drmalex07 (pull request #99). +- additional changes from 0.8.6: + * Expand tilde in script name, allowing argcomplete to work + when invoking scripts from one's home directory. Thanks to + @VorpalBlade (Issue 104). +- additional changes from 0.8.5: + * Fix issues related to using argcomplete in a REPL + environement. + * New helper method for custom completion display. + * Expand test suite; formatting cleanup. +- additional changes from 0.8.4: + * Fix issue related to using argcomplete in a REPL + environement. Thanks to @wapiflapi (pull request #91). +- additional changes from 0.8.3: + * Fix multiple issues related to using argcomplete in a REPL + environement. Thanks to @wapiflapi (pull request #90). +- additional changes from 0.8.2: + * Don't strip colon prefix in completion results if + COMP_WORDBREAKS does not contain a colon. Thanks to @berezv + (pull request #88). +- additional changes from 0.8.1: + * Use complete --nospace to avoid issues with directory + completion. +- additional changes from 0.8.0: + * Refactor main body of code into a class to enable + subclassing and overriding of functionality (Issue #78). +- additional changes from 0.7.1: + * New keyword option "argcomplete.autocomplete(validator=...)" + to supply a custom validator or bypass default validation. + Thanks to @thijsdezoete (Issue #77). + * Document debug options. +- additional changes from 0.7.0: + * New keyword option "argcomplete.autocomplete(exclude=[...])" + to suppress options (Issue #74). + * More speedups to code path for global completion hook negative + result. +- additional changes from 0.6.9: + * Fix handling of development mode script wrappers. Thanks to + @jmlopez-rod and @dcosson (Issue #69). + * Speed up code path for global completion hook negative + result by loading pkg_resources on demand. +- additional changes from 0.6.8: + * Begin tracking changes in changelog. + * Add completion support for PBR installed scripts (PR #71). + * Detect easy-install shims with shebang lines that contain + Py instead of py (Issue #69). + +------------------------------------------------------------------- +Fri Jan 17 15:50:53 UTC 2014 - speilicke@suse.com + +- Update to version 0.6.7: + + Upstream provides no changelog +- Don't install testsuite globally + +------------------------------------------------------------------- +Mon Nov 18 11:18:02 UTC 2013 - speilicke@suse.com + +- Update to version 0.6.3: + + No changelog + +------------------------------------------------------------------- +Thu Oct 24 10:58:50 UTC 2013 - speilicke@suse.com + +- Require python-setuptools instead of distribute (upstreams merged) + +------------------------------------------------------------------- +Thu May 2 14:04:51 UTC 2013 - speilicke@suse.com + +- Fix SLE builds +- Add LICENSE.rst and README.rst +- Run testsuite + +------------------------------------------------------------------- +Mon Apr 29 11:10:08 UTC 2013 - darin@darins.net + +- fixed license, set noarch for build + +------------------------------------------------------------------- +Fri Apr 26 20:49:09 UTC 2013 - darin@darins.net + +- add files in _bindir +- add python-distribute + +------------------------------------------------------------------- +Fri Apr 26 20:44:08 UTC 2013 - darin@darins.net + +- Initial packaging diff --git a/python-argcomplete.spec b/python-argcomplete.spec new file mode 100644 index 0000000..28ff89a --- /dev/null +++ b/python-argcomplete.spec @@ -0,0 +1,118 @@ +# +# spec file for package python-argcomplete +# +# Copyright (c) 2025 SUSE LLC +# Copyright (c) 2013 Darin Perusich. +# +# All modifications and additions to the file contributed by third parties +# remain the property of their copyright owners, unless otherwise agreed +# upon. The license for this file, and modifications and additions to the +# file, is the same license as for the pristine package itself (unless the +# license for the pristine package is not an Open Source License, in which +# case the license is the MIT License). An "Open Source License" is a +# license that conforms to the Open Source Definition (Version 1.9) +# published by the Open Source Initiative. + +# Please submit bugfixes or comments via https://bugs.opensuse.org/ +# + + +%global flavor @BUILD_FLAVOR@%{nil} +%if "%{flavor}" == "test" +%define psuffix -test +%bcond_without test +%else +%define psuffix %{nil} +%bcond_with test +%endif +%bcond_without libalternatives +%{?sle15_python_module_pythons} +Name: python-argcomplete%{psuffix} +Version: 3.6.2 +Release: 0 +Summary: Bash tab completion for argparse +License: Apache-2.0 +URL: https://github.com/kislyuk/argcomplete +Source: https://files.pythonhosted.org/packages/source/a/argcomplete/argcomplete-%{version}.tar.gz +BuildRequires: %{python_module base >= 3.8} +BuildRequires: %{python_module hatchling} +BuildRequires: %{python_module pip} +BuildRequires: %{python_module setuptools >= 67.2} +BuildRequires: %{python_module setuptools_scm >= 6.2} +BuildRequires: %{python_module wheel} +BuildRequires: alts +BuildRequires: fdupes +BuildRequires: python-rpm-macros +Requires: alts +BuildArch: noarch +%if %{with test} +BuildRequires: %{python_module argcomplete == %{version}} +BuildRequires: %{python_module pexpect} +BuildRequires: ca-certificates-mozilla +BuildRequires: fish +BuildRequires: zsh +%endif +%python_subpackages + +%description +Argcomplete provides easy, extensible command line tab completion of +arguments for your Python script. + +It makes two assumptions: + +* You're using bash as your shell +* You're using argparse to manage your command line arguments/options + +Argcomplete is particularly useful if your program has lots of options +or subparsers, and if your program can dynamically suggest completions +for your argument/option values (for example, if the user is browsing +resources over the network). + +%prep +%autosetup -p1 -n argcomplete-%{version} + +%build +%if %{without test} +%pyproject_wheel +%endif + +%install +%if %{without test} +%pyproject_install +%python_clone -a %{buildroot}%{_bindir}/activate-global-python-argcomplete +%python_clone -a %{buildroot}%{_bindir}/register-python-argcomplete +%python_clone -a %{buildroot}%{_bindir}/python-argcomplete-check-easy-install-script +%python_expand %fdupes %{buildroot}%{$python_sitelib} +%python_expand chmod -x %{buildroot}%{$python_sitelib}/argcomplete/scripts/*.py +%endif + +%check +%if %{with test} +export LANG=en_US.UTF-8 +export TERM=xterm-mono +%{python_expand \ + # https://github.com/kislyuk/argcomplete/issues/255 + # https://github.com/kislyuk/argcomplete/issues/299 + sed -i -e "1s|#!.*python.*|#!%{__$python}|" test/prog test/*.py + sed -i -e "s|python3 |$python |g" test/test.py + $python ./test/test.py -v +} +%endif + +%if %{without test} +%pre +%python_libalternatives_reset_alternative activate-global-python-argcomplete +%python_libalternatives_reset_alternative register-python-argcomplete +%python_libalternatives_reset_alternative python-argcomplete-check-easy-install-script + +%files %{python_files} +%doc README.rst +%license LICENSE.rst +%{python_sitelib}/argcomplete-%{version}.dist-info +%{python_sitelib}/argcomplete +%python_alternative %{_bindir}/activate-global-python-argcomplete +%python_alternative %{_bindir}/python-argcomplete-check-easy-install-script +%python_alternative %{_bindir}/register-python-argcomplete +%endif + +%changelog diff --git a/skip-failing-tests-3_12_7.patch b/skip-failing-tests-3_12_7.patch new file mode 100644 index 0000000..b485e20 --- /dev/null +++ b/skip-failing-tests-3_12_7.patch @@ -0,0 +1,126 @@ +--- + test/test.py | 15 +++++++++++++++ + 1 file changed, 15 insertions(+) + +--- a/test/test.py ++++ b/test/test.py +@@ -43,6 +43,7 @@ COMP_WORDBREAKS = " \t\n\"'><=;|&(:" + BASH_VERSION = subprocess.check_output(["bash", "-c", "echo $BASH_VERSION"]).decode() + BASH_MAJOR_VERSION = int(BASH_VERSION.split(".")[0]) + ++is_3_12_7 = sys.version_info[:2] == (3, 12) and sys.version_info[:3] >= (3, 12, 7) + + class ArgcompleteREPLWrapper(REPLWrapper): + def run_command(self, command, **kwargs): +@@ -158,6 +159,7 @@ class TestArgcomplete(unittest.TestCase) + completions = self.run_completer(p, "prog -", always_complete_options=False) + self.assertEqual(set(completions), set(["-h", "--help", "--foo", "--bar"])) + ++ @unittest.skipIf(is_3_12_7, "Doesn't work with Python 3.12.7") + def test_choices(self): + def make_parser(): + parser = ArgumentParser() +@@ -274,6 +276,7 @@ class TestArgcomplete(unittest.TestCase) + for cmd, output in expected_outputs: + self.assertEqual(set(self.run_completer(make_parser(), cmd)), set(output)) + ++ @unittest.skipIf(is_3_12_7, "Doesn't work with Python 3.12.7") + def test_completers(self): + self.completions = ["http://url1", "http://url2"] + +@@ -317,6 +320,7 @@ class TestArgcomplete(unittest.TestCase) + for cmd, output in zsh_expected_outputs: + self.assertEqual(set(self.run_completer(make_parser(), cmd, shell="zsh")), set(output)) + ++ @unittest.skipIf(is_3_12_7, "Doesn't work with Python 3.12.7") + def test_subparser_completers(self): + def c_depends_on_positional_arg1(prefix, parsed_args, **kwargs): + return [parsed_args.arg1] +@@ -355,6 +359,7 @@ class TestArgcomplete(unittest.TestCase) + fp.write("test") + self.assertEqual(set(fc("a")), set(["abcdefж/", "abcaha/", "abcxyz"])) + ++ @unittest.skipIf(is_3_12_7, "Doesn't work with Python 3.12.7") + def test_filescompleter_filetype_integration(self): + def make_parser(): + parser = ArgumentParser() +@@ -404,6 +409,7 @@ class TestArgcomplete(unittest.TestCase) + self.assertEqual(c("def/k"), set([])) + return + ++ @unittest.skipIf(is_3_12_7, "Doesn't work with Python 3.12.7") + def test_default_completer(self): + def make_parser(): + parser = ArgumentParser(add_help=False) +@@ -423,6 +429,7 @@ class TestArgcomplete(unittest.TestCase) + for cmd, output in expected_outputs: + self.assertEqual(set(self.run_completer(make_parser(), cmd)), set(output)) + ++ @unittest.skipIf(is_3_12_7, "Doesn't work with Python 3.12.7") + def test_subparsers(self): + def make_parser(): + parser = ArgumentParser() +@@ -455,6 +462,7 @@ class TestArgcomplete(unittest.TestCase) + set(output) - set(["-h", "--help"]), + ) + ++ @unittest.skipIf(is_3_12_7, "Doesn't work with Python 3.12.7") + def test_non_ascii(self): + def make_parser(): + parser = ArgumentParser() +@@ -664,6 +672,7 @@ class TestArgcomplete(unittest.TestCase) + for cmd, output in expected_outputs: + self.assertEqual(set(self.run_completer(make_parser(), cmd)), set(output)) + ++ @unittest.skipIf(is_3_12_7, "Doesn't work with Python 3.12.7") + def test_optional_nargs(self): + def make_parser(): + parser = ArgumentParser() +@@ -696,6 +705,7 @@ class TestArgcomplete(unittest.TestCase) + for cmd, output in expected_outputs: + self.assertEqual(set(self.run_completer(make_parser(), cmd)), set(output)) + ++ @unittest.skipIf(is_3_12_7, "Doesn't work with Python 3.12.7") + def test_positional_remainder(self): + def make_parser(): + parser = ArgumentParser() +@@ -753,6 +763,7 @@ class TestArgcomplete(unittest.TestCase) + result = self.run_completer(make_parser(), cmd, always_complete_options=always_complete_options) + self.assertEqual(set(result), set(output)) + ++ @unittest.skipIf(is_3_12_7, "Doesn't work with Python 3.12.7") + def test_exclusive(self): + def make_parser(): + parser = ArgumentParser(add_help=False) +@@ -772,6 +783,7 @@ class TestArgcomplete(unittest.TestCase) + for cmd, output in expected_outputs: + self.assertEqual(set(self.run_completer(make_parser(), cmd)), set(output)) + ++ @unittest.skipIf(is_3_12_7, "Doesn't work with Python 3.12.7") + def test_mixed_optional_positional(self): + def make_parser(): + parser = ArgumentParser(add_help=False) +@@ -801,6 +813,7 @@ class TestArgcomplete(unittest.TestCase) + self.assertEqual(self.run_completer(make_parser(), "prog "), ["bar "]) + self.assertEqual(self.run_completer(make_parser(), "prog ", append_space=False), ["bar"]) + ++ @unittest.skipIf(is_3_12_7, "Doesn't work with Python 3.12.7") + def test_exclusive_class(self): + parser = ArgumentParser(add_help=False) + parser.add_argument("--foo", dest="types", action="append_const", const=str) +@@ -821,6 +834,7 @@ class TestArgcomplete(unittest.TestCase) + for cmd, output in expected_outputs: + self.assertEqual(set(self.run_completer(parser, cmd, completer=completer)), set(output)) + ++ @unittest.skipIf(is_3_12_7, "Doesn't work with Python 3.12.7") + def test_escape_special_chars(self): + def make_parser(): + parser = ArgumentParser(add_help=False) +@@ -921,6 +935,7 @@ class TestArgcompleteREPL(unittest.TestC + completions = self.run_completer(p, c, "prog --") + assert set(completions) == set(["--help", "--foo", "--bar"]) + ++ @unittest.skipIf(is_3_12_7, "Doesn't work with Python 3.12.7") + def test_repl_parse_after_complete(self): + p = ArgumentParser() + p.add_argument("--foo", required=True)