Script 'mail_helper' called by obssrc Hello community, here is the log from the commit of package python-shtab for openSUSE:Factory checked in at 2025-05-30 14:21:29 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/python-shtab (Old) and /work/SRC/openSUSE:Factory/.python-shtab.new.25440 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "python-shtab" Fri May 30 14:21:29 2025 rev:2 rq:1280826 version:1.7.2 Changes: -------- --- /work/SRC/openSUSE:Factory/python-shtab/python-shtab.changes 2024-04-10 17:49:34.786683707 +0200 +++ /work/SRC/openSUSE:Factory/.python-shtab.new.25440/python-shtab.changes 2025-05-30 17:26:29.574150504 +0200 @@ -1,0 +2,12 @@ +Wed May 28 08:23:07 UTC 2025 - John Paul Adrian Glaubitz <adrian.glaub...@suse.com> + +- Update to 1.7.2 + * bump deps + * add Python 3.12 support + * chore: bump linters & fix CI + * Add to bash support for completing paths after redirection + * Support unnecessary if conditions and support '[12]>>' cases + * docs: minor updates +- Use Python 3.11 on SLE-15 by default + +------------------------------------------------------------------- Old: ---- shtab-1.7.1.tar.gz New: ---- shtab-1.7.2.tar.gz ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ python-shtab.spec ++++++ --- /var/tmp/diff_new_pack.mBISJO/_old 2025-05-30 17:26:30.038169780 +0200 +++ /var/tmp/diff_new_pack.mBISJO/_new 2025-05-30 17:26:30.038169780 +0200 @@ -1,7 +1,7 @@ # # spec file for package python-shtab # -# Copyright (c) 2024 SUSE LLC +# Copyright (c) 2025 SUSE LLC # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -16,13 +16,14 @@ # +%{?sle15_python_module_pythons} Name: python-shtab -Version: 1.7.1 +Version: 1.7.2 Release: 0 Summary: Automagic shell tab completion for Python CLI applications License: Apache-2.0 URL: https://github.com/iterative/shtab -Source: https://files.pythonhosted.org/packages/source/s/shtab/shtab-1.7.1.tar.gz +Source: https://files.pythonhosted.org/packages/source/s/shtab/shtab-%{version}.tar.gz BuildRequires: %{python_module pip} BuildRequires: %{python_module setuptools >= 42} BuildRequires: %{python_module setuptools_scm >= 3.4} ++++++ shtab-1.7.1.tar.gz -> shtab-1.7.2.tar.gz ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/shtab-1.7.1/.github/workflows/test.yml new/shtab-1.7.2/.github/workflows/test.yml --- old/shtab-1.7.1/.github/workflows/test.yml 2024-03-07 19:50:41.000000000 +0100 +++ new/shtab-1.7.2/.github/workflows/test.yml 2025-04-12 22:27:38.000000000 +0200 @@ -8,10 +8,10 @@ test: if: github.event_name != 'pull_request' || !contains('OWNER,MEMBER,COLLABORATOR', github.event.pull_request.author_association) name: Test py${{ matrix.python }} - runs-on: ubuntu-latest + runs-on: ubuntu-${{ matrix.python == 3.7 && '22.04' || 'latest' }} strategy: matrix: - python: [3.7, 3.11] + python: [3.7, 3.12] steps: - uses: actions/checkout@v4 with: {fetch-depth: 0} @@ -21,7 +21,7 @@ - name: Install run: pip install -U -e .[dev] - run: pytest - - uses: codecov/codecov-action@v4 + - uses: codecov/codecov-action@v5 with: token: ${{ secrets.CODECOV_TOKEN }} deploy: diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/shtab-1.7.1/.pre-commit-config.yaml new/shtab-1.7.2/.pre-commit-config.yaml --- old/shtab-1.7.1/.pre-commit-config.yaml 2024-03-07 19:50:41.000000000 +0100 +++ new/shtab-1.7.2/.pre-commit-config.yaml 2025-04-12 22:27:38.000000000 +0200 @@ -2,7 +2,7 @@ python: python3 repos: - repo: https://github.com/pre-commit/pre-commit-hooks - rev: v4.5.0 + rev: v5.0.0 hooks: - id: check-added-large-files - id: check-builtin-literals @@ -27,7 +27,7 @@ types: [text] exclude: ^(.pre-commit-config.yaml|.github/workflows/test.yml)$ - repo: https://github.com/PyCQA/flake8 - rev: 7.0.0 + rev: 7.2.0 hooks: - id: flake8 args: [-j8] @@ -40,18 +40,18 @@ - flake8-pyproject - flake8-string-format - repo: https://github.com/pre-commit/mirrors-mypy - rev: v1.8.0 + rev: v1.15.0 hooks: - id: mypy additional_dependencies: [types-setuptools] - repo: https://github.com/google/yapf - rev: v0.40.2 + rev: v0.43.0 hooks: - id: yapf args: [-i] additional_dependencies: [toml] - repo: https://github.com/PyCQA/isort - rev: 5.13.2 + rev: 6.0.1 hooks: - id: isort ci: diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/shtab-1.7.1/PKG-INFO new/shtab-1.7.2/PKG-INFO --- old/shtab-1.7.1/PKG-INFO 2024-03-07 19:50:57.018100000 +0100 +++ new/shtab-1.7.2/PKG-INFO 2025-04-12 22:27:53.589287800 +0200 @@ -1,6 +1,6 @@ -Metadata-Version: 2.1 +Metadata-Version: 2.4 Name: shtab -Version: 1.7.1 +Version: 1.7.2 Summary: Automagic shell tab completion for Python CLI applications Author-email: Casper da Costa-Luis <casper....@physics.org> Maintainer-email: Iterative <supp...@iterative.ai> @@ -35,6 +35,7 @@ Classifier: Programming Language :: Python :: 3.9 Classifier: Programming Language :: Python :: 3.10 Classifier: Programming Language :: Python :: 3.11 +Classifier: Programming Language :: Python :: 3.12 Classifier: Programming Language :: Python :: 3 :: Only Classifier: Programming Language :: Python :: Implementation Classifier: Programming Language :: Python :: Implementation :: IronPython @@ -64,6 +65,7 @@ Requires-Dist: pytest>=6; extra == "dev" Requires-Dist: pytest-cov; extra == "dev" Requires-Dist: pytest-timeout; extra == "dev" +Dynamic: license-file |Logo| @@ -147,7 +149,6 @@ - executes the underlying script *every* time ``<TAB>`` is pressed (slow and has side-effects) - - only provides ``bash`` completion - `pyzshcomplete <https://pypi.org/project/pyzshcomplete>`_ @@ -165,7 +166,7 @@ Please do open `issues <https://github.com/iterative/shtab/issues>`_ & `pull requests <https://github.com/iterative/shtab/pulls>`_! Some ideas: -- support ``fish`` +- support ``fish`` (`#174 <https://github.com/iterative/shtab/pull/174>`_) - support ``powershell`` See @@ -190,6 +191,6 @@ .. |PyPI-Downloads| image:: https://img.shields.io/pypi/dm/shtab.svg?label=pypi%20downloads&logo=PyPI&logoColor=white :target: https://pepy.tech/project/shtab :alt: Downloads -.. |Hits| image:: https://caspersci.uk.to/cgi-bin/hits.cgi?q=shtab&style=social&r=https://github.com/iterative/shtab&a=hidden - :target: https://caspersci.uk.to/cgi-bin/hits.cgi?q=shtab&a=plot&r=https://github.com/iterative/shtab&style=social +.. |Hits| image:: https://cgi.cdcl.ml/hits?q=shtab&style=social&r=https://github.com/iterative/shtab&a=hidden + :target: https://cgi.cdcl.ml/hits?q=shtab&a=plot&r=https://github.com/iterative/shtab&style=social :alt: Hits diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/shtab-1.7.1/README.rst new/shtab-1.7.2/README.rst --- old/shtab-1.7.1/README.rst 2024-03-07 19:50:41.000000000 +0100 +++ new/shtab-1.7.2/README.rst 2025-04-12 22:27:38.000000000 +0200 @@ -80,7 +80,6 @@ - executes the underlying script *every* time ``<TAB>`` is pressed (slow and has side-effects) - - only provides ``bash`` completion - `pyzshcomplete <https://pypi.org/project/pyzshcomplete>`_ @@ -98,7 +97,7 @@ Please do open `issues <https://github.com/iterative/shtab/issues>`_ & `pull requests <https://github.com/iterative/shtab/pulls>`_! Some ideas: -- support ``fish`` +- support ``fish`` (`#174 <https://github.com/iterative/shtab/pull/174>`_) - support ``powershell`` See @@ -123,6 +122,6 @@ .. |PyPI-Downloads| image:: https://img.shields.io/pypi/dm/shtab.svg?label=pypi%20downloads&logo=PyPI&logoColor=white :target: https://pepy.tech/project/shtab :alt: Downloads -.. |Hits| image:: https://caspersci.uk.to/cgi-bin/hits.cgi?q=shtab&style=social&r=https://github.com/iterative/shtab&a=hidden - :target: https://caspersci.uk.to/cgi-bin/hits.cgi?q=shtab&a=plot&r=https://github.com/iterative/shtab&style=social +.. |Hits| image:: https://cgi.cdcl.ml/hits?q=shtab&style=social&r=https://github.com/iterative/shtab&a=hidden + :target: https://cgi.cdcl.ml/hits?q=shtab&a=plot&r=https://github.com/iterative/shtab&style=social :alt: Hits diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/shtab-1.7.1/docs/index.md new/shtab-1.7.2/docs/index.md --- old/shtab-1.7.1/docs/index.md 2024-03-07 19:50:41.000000000 +0100 +++ new/shtab-1.7.2/docs/index.md 2025-04-12 22:27:38.000000000 +0200 @@ -117,7 +117,7 @@ [CONTRIBUTING.md](https://github.com/iterative/shtab/tree/main/CONTRIBUTING.md) for more guidance. -[](https://caspersci.uk.to/cgi-bin/hits.cgi?q=shtab&a=plot&r=https://github.com/iterative/shtab&style=social) +[](https://cgi.cdcl.ml/hits?q=shtab&a=plot&r=https://github.com/iterative/shtab&style=social) [GH-issue]: https://github.com/iterative/shtab/issues [GH-pr]: https://github.com/iterative/shtab/pulls diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/shtab-1.7.1/docs/requirements.txt new/shtab-1.7.2/docs/requirements.txt --- old/shtab-1.7.1/docs/requirements.txt 2024-03-07 19:50:41.000000000 +0100 +++ new/shtab-1.7.2/docs/requirements.txt 2025-04-12 22:27:38.000000000 +0200 @@ -1,5 +1,5 @@ mkdocs-material -git+https://github.com/tqdm/jsmin@python3-only#egg=jsmin +git+https://github.com/tqdm/jsmin@fix-pip#egg=jsmin mkdocs-minify-plugin pydoc-markdown>=4,!=4.8.0 pygments diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/shtab-1.7.1/pyproject.toml new/shtab-1.7.2/pyproject.toml --- old/shtab-1.7.1/pyproject.toml 2024-03-07 19:50:41.000000000 +0100 +++ new/shtab-1.7.2/pyproject.toml 2025-04-12 22:27:38.000000000 +0200 @@ -54,6 +54,7 @@ "Programming Language :: Python :: 3.9", "Programming Language :: Python :: 3.10", "Programming Language :: Python :: 3.11", + "Programming Language :: Python :: 3.12", "Programming Language :: Python :: 3 :: Only", "Programming Language :: Python :: Implementation", "Programming Language :: Python :: Implementation :: IronPython", diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/shtab-1.7.1/shtab/__init__.py new/shtab-1.7.2/shtab/__init__.py --- old/shtab-1.7.1/shtab/__init__.py 2024-03-07 19:50:41.000000000 +0100 +++ new/shtab-1.7.2/shtab/__init__.py 2025-04-12 22:27:38.000000000 +0200 @@ -382,6 +382,7 @@ # ${!x} -> ${hello} -> "world" ${root_prefix}() { local completing_word="${COMP_WORDS[COMP_CWORD]}" + local previous_word="${COMP_WORDS[COMP_CWORD-1]}" local completed_positional_actions local current_action local current_action_args_start_index @@ -438,6 +439,10 @@ if [[ $pos_only = 0 && "${completing_word}" == -* ]]; then # optional argument started: use option strings COMPREPLY=( $(compgen -W "${current_option_strings[*]}" -- "${completing_word}") ) + elif [[ "${previous_word}" == ">" || "${previous_word}" == ">>" || + "${previous_word}" =~ ^[12]">" || "${previous_word}" =~ ^[12]">>" ]]; then + # handle redirection operators + COMPREPLY=( $(compgen -f -- "${completing_word}") ) else # use choices & compgen local IFS=$'\\n' # items may contain spaces, so delimit using newline diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/shtab-1.7.1/shtab/_dist_ver.py new/shtab-1.7.2/shtab/_dist_ver.py --- old/shtab-1.7.1/shtab/_dist_ver.py 2024-03-07 19:50:56.000000000 +0100 +++ new/shtab-1.7.2/shtab/_dist_ver.py 2025-04-12 22:27:53.000000000 +0200 @@ -1 +1 @@ -__version__ = '1.7.1' +__version__ = '1.7.2' diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/shtab-1.7.1/shtab.egg-info/PKG-INFO new/shtab-1.7.2/shtab.egg-info/PKG-INFO --- old/shtab-1.7.1/shtab.egg-info/PKG-INFO 2024-03-07 19:50:56.000000000 +0100 +++ new/shtab-1.7.2/shtab.egg-info/PKG-INFO 2025-04-12 22:27:53.000000000 +0200 @@ -1,6 +1,6 @@ -Metadata-Version: 2.1 +Metadata-Version: 2.4 Name: shtab -Version: 1.7.1 +Version: 1.7.2 Summary: Automagic shell tab completion for Python CLI applications Author-email: Casper da Costa-Luis <casper....@physics.org> Maintainer-email: Iterative <supp...@iterative.ai> @@ -35,6 +35,7 @@ Classifier: Programming Language :: Python :: 3.9 Classifier: Programming Language :: Python :: 3.10 Classifier: Programming Language :: Python :: 3.11 +Classifier: Programming Language :: Python :: 3.12 Classifier: Programming Language :: Python :: 3 :: Only Classifier: Programming Language :: Python :: Implementation Classifier: Programming Language :: Python :: Implementation :: IronPython @@ -64,6 +65,7 @@ Requires-Dist: pytest>=6; extra == "dev" Requires-Dist: pytest-cov; extra == "dev" Requires-Dist: pytest-timeout; extra == "dev" +Dynamic: license-file |Logo| @@ -147,7 +149,6 @@ - executes the underlying script *every* time ``<TAB>`` is pressed (slow and has side-effects) - - only provides ``bash`` completion - `pyzshcomplete <https://pypi.org/project/pyzshcomplete>`_ @@ -165,7 +166,7 @@ Please do open `issues <https://github.com/iterative/shtab/issues>`_ & `pull requests <https://github.com/iterative/shtab/pulls>`_! Some ideas: -- support ``fish`` +- support ``fish`` (`#174 <https://github.com/iterative/shtab/pull/174>`_) - support ``powershell`` See @@ -190,6 +191,6 @@ .. |PyPI-Downloads| image:: https://img.shields.io/pypi/dm/shtab.svg?label=pypi%20downloads&logo=PyPI&logoColor=white :target: https://pepy.tech/project/shtab :alt: Downloads -.. |Hits| image:: https://caspersci.uk.to/cgi-bin/hits.cgi?q=shtab&style=social&r=https://github.com/iterative/shtab&a=hidden - :target: https://caspersci.uk.to/cgi-bin/hits.cgi?q=shtab&a=plot&r=https://github.com/iterative/shtab&style=social +.. |Hits| image:: https://cgi.cdcl.ml/hits?q=shtab&style=social&r=https://github.com/iterative/shtab&a=hidden + :target: https://cgi.cdcl.ml/hits?q=shtab&a=plot&r=https://github.com/iterative/shtab&style=social :alt: Hits diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/shtab-1.7.1/tests/test_shtab.py new/shtab-1.7.2/tests/test_shtab.py --- old/shtab-1.7.1/tests/test_shtab.py 2024-03-07 19:50:41.000000000 +0100 +++ new/shtab-1.7.2/tests/test_shtab.py 2025-04-12 22:27:38.000000000 +0200 @@ -2,6 +2,7 @@ Tests for `shtab`. """ import logging +import os import subprocess from argparse import ArgumentParser @@ -316,3 +317,28 @@ pass else: raise NotImplementedError("invalid") + + +@pytest.fixture +def change_dir(tmp_path): + original_cwd = os.getcwd() + os.chdir(tmp_path) + yield tmp_path + os.chdir(original_cwd) + + +def test_path_completion_after_redirection(caplog, change_dir): + parser = ArgumentParser(prog="test") + shtab.add_argument_to(parser, ["-s", "--shell"]) + with caplog.at_level(logging.INFO): + completion = shtab.complete(parser, shell="bash") + print(completion) + + (change_dir / "test_file.txt").touch() + + for redirection in [">", ">>", "1>", "1>>", "2>", "2>>"]: + shell = Bash(completion + + f"\nCOMP_WORDS=(test '{redirection}' tes); COMP_CWORD=2; _shtab_test;") + shell.test('"${COMPREPLY[@]}" = "test_file.txt"', f"Redirection {redirection} failed") + + assert not caplog.record_tuples