Script 'mail_helper' called by obssrc
Hello community,

here is the log from the commit of package python-click-didyoumean for 
openSUSE:Factory checked in at 2024-01-15 22:17:28
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/python-click-didyoumean (Old)
 and      /work/SRC/openSUSE:Factory/.python-click-didyoumean.new.21961 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "python-click-didyoumean"

Mon Jan 15 22:17:28 2024 rev:6 rq:1138673 version:0.3.0

Changes:
--------
--- 
/work/SRC/openSUSE:Factory/python-click-didyoumean/python-click-didyoumean.changes
  2023-06-12 15:27:23.039383027 +0200
+++ 
/work/SRC/openSUSE:Factory/.python-click-didyoumean.new.21961/python-click-didyoumean.changes
       2024-01-15 22:19:01.678400709 +0100
@@ -1,0 +2,11 @@
+Sun Jan 14 15:44:03 UTC 2024 - Dirk Müller <[email protected]>
+
+- update to 0.3.0:
+  * update tests for latest click
+  * fix license
+  * add typing
+  * switch to poetry
+- reenable tests
+- drop update-tests.patch (upstream)
+
+-------------------------------------------------------------------

Old:
----
  click-didyoumean-0.0.3.tar.gz
  update-tests.patch

New:
----
  click-didyoumean-0.3.0.tar.gz

BETA DEBUG BEGIN:
  Old:- reenable tests
- drop update-tests.patch (upstream)
BETA DEBUG END:

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ python-click-didyoumean.spec ++++++
--- /var/tmp/diff_new_pack.J9bdPl/_old  2024-01-15 22:19:02.266422320 +0100
+++ /var/tmp/diff_new_pack.J9bdPl/_new  2024-01-15 22:19:02.270422466 +0100
@@ -1,7 +1,7 @@
 #
 # spec file for package python-click-didyoumean
 #
-# Copyright (c) 2020 SUSE LLC
+# Copyright (c) 2024 SUSE LLC
 #
 # All modifications and additions to the file contributed by third parties
 # remain the property of their copyright owners, unless otherwise agreed
@@ -18,16 +18,16 @@
 
 %{?sle15_python_module_pythons}
 Name:           python-click-didyoumean
-Version:        0.0.3
+Version:        0.3.0
 Release:        0
 Summary:        Plugin to enable git-like did-you-mean feature in python-click
 License:        MIT
 Group:          Development/Languages/Python
 URL:            https://github.com/timofurrer/click-didyoumean
 Source:         
https://github.com/click-contrib/click-didyoumean/archive/v%{version}.tar.gz#/click-didyoumean-%{version}.tar.gz
-# https://github.com/click-contrib/click-didyoumean/pull/4
-Patch0:         update-tests.patch
-BuildRequires:  %{python_module setuptools}
+BuildRequires:  %{python_module pip}
+BuildRequires:  %{python_module poetry-core}
+BuildRequires:  %{python_module wheel}
 BuildRequires:  fdupes
 BuildRequires:  python-rpm-macros
 Requires:       python-click
@@ -43,20 +43,17 @@
 
 %prep
 %setup -q -n click-didyoumean-%{version}
-%patch0 -p1
 
 %build
-%python_build
+%pyproject_wheel
 
 %install
-%python_install
+%pyproject_install
 %python_expand %fdupes %{buildroot}%{$python_sitelib}
 
 %check
 export LANG=en_US.UTF-8
-# Upstream changed quotes, none of the tests are applicable with new version 
and last commit was in 2019 May
-# Just skip the tests for now until upstream catches up
-#%%pytest
+%pytest
 
 %files %{python_files}
 %doc README.rst

++++++ click-didyoumean-0.0.3.tar.gz -> click-didyoumean-0.3.0.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/click-didyoumean-0.0.3/.github/workflows/cicd.yml 
new/click-didyoumean-0.3.0/.github/workflows/cicd.yml
--- old/click-didyoumean-0.0.3/.github/workflows/cicd.yml       1970-01-01 
01:00:00.000000000 +0100
+++ new/click-didyoumean-0.3.0/.github/workflows/cicd.yml       2021-09-29 
09:42:24.000000000 +0200
@@ -0,0 +1,44 @@
+name: CI
+
+on: [push, pull_request]
+
+jobs:
+  ci:
+    runs-on: ${{ matrix.os }}
+    strategy:
+      fail-fast: false
+      max-parallel: 4
+      matrix:
+        python-version: [3.6, 3.7, 3.8, 3.9]
+        os: [ubuntu-latest]
+
+    steps:
+      - uses: actions/checkout@v1
+      - name: Set up Python ${{ matrix.python-version }}
+        uses: actions/setup-python@v1
+        with:
+          python-version: ${{ matrix.python-version }}
+      - run: pip install -U pip poetry
+      - run: poetry config virtualenvs.create false
+      - run: poetry install
+      - run: flake8 --max-line-length 88 src/ tests/
+      - run: black --diff --check src/ tests/
+      - run: mypy src/ tests/
+      - run: pytest
+
+  cd:
+    needs: [ci]
+    runs-on: ubuntu-latest
+
+    steps:
+      - uses: actions/checkout@v1
+      - name: Set up Python
+        if: startsWith(github.event.ref, 'refs/tags')
+        uses: actions/setup-python@v1
+        with:
+          python-version: 3.9
+      - run: pip install -U pip poetry
+      - name: Publish package
+        if: startsWith(github.event.ref, 'refs/tags')
+        run: |
+          poetry publish --build --username __token__ --password ${{ 
secrets.PYPI_TOKEN }}
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/click-didyoumean-0.0.3/.gitignore 
new/click-didyoumean-0.3.0/.gitignore
--- old/click-didyoumean-0.0.3/.gitignore       2016-03-13 02:13:23.000000000 
+0100
+++ new/click-didyoumean-0.3.0/.gitignore       2021-09-29 09:42:24.000000000 
+0200
@@ -1,17 +1,15 @@
-# vim swap files
+# editors
 *.swp
+.vscode
 
-# python bytecode files
+# Python bytecode files
 *.pyc
 __pycache__/
 
-# python setuptools
+# Python packaging
 *.egg-info
 dist/
-
-# python tox files
-.tox/
-.cache/
+poetry.lock
 
 # python virtualenv
-env/
+.python-version
\ No newline at end of file
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/click-didyoumean-0.0.3/.travis.yml 
new/click-didyoumean-0.3.0/.travis.yml
--- old/click-didyoumean-0.0.3/.travis.yml      2016-03-13 02:13:23.000000000 
+0100
+++ new/click-didyoumean-0.3.0/.travis.yml      1970-01-01 01:00:00.000000000 
+0100
@@ -1,13 +0,0 @@
-language: python
-python:
-  - "2.6"
-  - "2.7"
-  - "3.3"
-  - "3.4"
-  - "3.5"
-  - "pypy"
-
-install:
-  - pip install --editable .
-
-script: make test
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/click-didyoumean-0.0.3/Makefile 
new/click-didyoumean-0.3.0/Makefile
--- old/click-didyoumean-0.0.3/Makefile 2016-03-13 02:13:23.000000000 +0100
+++ new/click-didyoumean-0.3.0/Makefile 1970-01-01 01:00:00.000000000 +0100
@@ -1,5 +0,0 @@
-test:
-       py.test --tb=short
-
-publish:
-       @python setup.py sdist register upload
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/click-didyoumean-0.0.3/README.rst 
new/click-didyoumean-0.3.0/README.rst
--- old/click-didyoumean-0.0.3/README.rst       2016-03-13 02:13:23.000000000 
+0100
+++ new/click-didyoumean-0.3.0/README.rst       2021-09-29 09:42:24.000000000 
+0200
@@ -119,14 +119,13 @@
     :target: https://pypi.python.org/pypi/click-didyoumean
     :alt: Latest version released on PyPi
 
-.. |build| image:: 
https://img.shields.io/travis/timofurrer/click-didyoumean/master.svg?style=flat
-    :target: http://travis-ci.org/timofurrer/click-didyoumean
+.. |build| image:: 
https://img.shields.io/travis/click-contrib/click-didyoumean/master.svg?style=flat
+    :target: http://travis-ci.org/click-contrib/click-didyoumean
     :alt: Build status of the master branch
 
-.. |demo| image:: https://asciinema.org/a/duyr2j5d7w7fhpe7xf71rafgr.png
-    :target: https://asciinema.org/a/duyr2j5d7w7fhpe7xf71rafgr
+.. |demo| image:: 
https://raw.githubusercontent.com/click-contrib/click-didyoumean/master/examples/asciicast.gif
     :alt: Demo
 
 .. |license| image:: 
https://img.shields.io/badge/license-MIT-blue.svg?style=flat
-    :target: 
https://raw.githubusercontent.com/timofurrer/click-didyoumean/master/LICENSE
+    :target: 
https://raw.githubusercontent.com/click-contrib/click-didyoumean/master/LICENSE
     :alt: Package license
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/click-didyoumean-0.0.3/click_didyoumean/__init__.py 
new/click-didyoumean-0.3.0/click_didyoumean/__init__.py
--- old/click-didyoumean-0.0.3/click_didyoumean/__init__.py     2016-03-13 
02:13:23.000000000 +0100
+++ new/click-didyoumean-0.3.0/click_didyoumean/__init__.py     1970-01-01 
01:00:00.000000000 +0100
@@ -1,58 +0,0 @@
-# -*- coding: utf-8 -*-
-
-"""
-    Extension for the python ``click`` module to provide
-    a group with a git-like *did-you-mean* feature.
-"""
-
-import click
-import difflib
-
-__version__ = "0.0.3"
-
-
-class DYMMixin(object):  # pylint: disable=too-few-public-methods
-    """
-    Mixin class for click MultiCommand inherited classes
-    to provide git-like *did-you-mean* functionality when
-    a certain command is not registered.
-    """
-    def __init__(self, *args, **kwargs):
-        self.max_suggestions = kwargs.pop("max_suggestions", 3)
-        self.cutoff = kwargs.pop("cutoff", 0.5)
-        super(DYMMixin, self).__init__(*args, **kwargs)
-
-    def resolve_command(self, ctx, args):
-        """
-        Overrides clicks ``resolve_command`` method
-        and appends *Did you mean ...* suggestions
-        to the raised exception message.
-        """
-        original_cmd_name = click.utils.make_str(args[0])
-
-        try:
-            return super(DYMMixin, self).resolve_command(ctx, args)
-        except click.exceptions.UsageError as error:
-            error_msg = str(error)
-            matches = difflib.get_close_matches(original_cmd_name,
-                                                self.list_commands(ctx), 
self.max_suggestions, self.cutoff)
-            if matches:
-                error_msg += '\n\nDid you mean one of these?\n    %s' % '\n    
'.join(matches)  # pylint: disable=line-too-long
-
-            raise click.exceptions.UsageError(error_msg, error.ctx)
-
-
-class DYMGroup(DYMMixin, click.Group):  # pylint: 
disable=too-many-public-methods
-    """
-    click Group to provide git-like
-    *did-you-mean* functionality when a certain
-    command is not found in the group.
-    """
-
-
-class DYMCommandCollection(DYMMixin, click.CommandCollection):  # pylint: 
disable=too-many-public-methods
-    """
-    click CommandCollection to provide git-like
-    *did-you-mean* functionality when a certain
-    command is not found in the group.
-    """
Binary files old/click-didyoumean-0.0.3/examples/asciicast.gif and 
new/click-didyoumean-0.3.0/examples/asciicast.gif differ
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/click-didyoumean-0.0.3/pyproject.toml 
new/click-didyoumean-0.3.0/pyproject.toml
--- old/click-didyoumean-0.0.3/pyproject.toml   1970-01-01 01:00:00.000000000 
+0100
+++ new/click-didyoumean-0.3.0/pyproject.toml   2021-09-29 09:42:24.000000000 
+0200
@@ -0,0 +1,21 @@
+[tool.poetry]
+name = "click-didyoumean"
+version = "0.3.0"
+description = "Enables git-like *did-you-mean* feature in click"
+authors = ["Timo Furrer <[email protected]>"]
+license = "MIT"
+
+[tool.poetry.dependencies]
+python = "^3.6.2"
+click = ">=7"
+
+[tool.poetry.dev-dependencies]
+pytest = "^6.2.5"
+black = "^21.9b0"
+isort = "^5.9.3"
+flake8 = "^3.9.2"
+mypy = "^0.910"
+
+[build-system]
+requires = ["poetry-core>=1.0.0"]
+build-backend = "poetry.core.masonry.api"
\ No newline at end of file
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/click-didyoumean-0.0.3/setup.py 
new/click-didyoumean-0.3.0/setup.py
--- old/click-didyoumean-0.0.3/setup.py 2016-03-13 02:13:23.000000000 +0100
+++ new/click-didyoumean-0.3.0/setup.py 1970-01-01 01:00:00.000000000 +0100
@@ -1,28 +0,0 @@
-import re
-import ast
-from setuptools import setup
-
-
-_version_re = re.compile(r"__version__\s+=\s+(.*)")
-
-
-with open("click_didyoumean/__init__.py", "rb") as f:
-    version = str(ast.literal_eval(_version_re.search(
-        f.read().decode("utf-8")).group(1)))
-
-
-setup(
-    name="click-didyoumean",
-    author="Timo Furrer",
-    author_email="[email protected]",
-    version=version,
-    url="https://github.com/timofurrer/click-didyoumean";,
-    packages=["click_didyoumean"],
-    install_requires=["click"],
-    description="Enable git-like did-you-mean feature in click.",
-    classifiers=[
-        "License :: OSI Approved :: BSD License",
-        "Programming Language :: Python",
-        "Programming Language :: Python :: 3",
-    ],
-)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/click-didyoumean-0.0.3/src/click_didyoumean/__init__.py 
new/click-didyoumean-0.3.0/src/click_didyoumean/__init__.py
--- old/click-didyoumean-0.0.3/src/click_didyoumean/__init__.py 1970-01-01 
01:00:00.000000000 +0100
+++ new/click-didyoumean-0.3.0/src/click_didyoumean/__init__.py 2021-09-29 
09:42:24.000000000 +0200
@@ -0,0 +1,66 @@
+"""
+Extension for ``click`` to provide a group
+with a git-like *did-you-mean* feature.
+"""
+
+import difflib
+import typing
+
+import click
+
+
+class DYMMixin:
+    """
+    Mixin class for click MultiCommand inherited classes
+    to provide git-like *did-you-mean* functionality when
+    a certain command is not registered.
+    """
+
+    def __init__(self, *args: typing.Any, **kwargs: typing.Any) -> None:
+        self.max_suggestions = kwargs.pop("max_suggestions", 3)
+        self.cutoff = kwargs.pop("cutoff", 0.5)
+        super().__init__(*args, **kwargs)  # type: ignore
+
+    def resolve_command(
+        self, ctx: click.Context, args: typing.List[str]
+    ) -> typing.Tuple[
+        typing.Optional[str], typing.Optional[click.Command], typing.List[str]
+    ]:
+        """
+        Overrides clicks ``resolve_command`` method
+        and appends *Did you mean ...* suggestions
+        to the raised exception message.
+        """
+        try:
+            return super(DYMMixin, self).resolve_command(ctx, args)  # type: 
ignore
+        except click.exceptions.UsageError as error:
+            error_msg = str(error)
+            original_cmd_name = click.utils.make_str(args[0])
+            matches = difflib.get_close_matches(
+                original_cmd_name,
+                self.list_commands(ctx),  # type: ignore
+                self.max_suggestions,
+                self.cutoff,
+            )
+            if matches:
+                fmt_matches = "\n    ".join(matches)
+                error_msg += "\n\n"
+                error_msg += f"Did you mean one of these?\n    {fmt_matches}"
+
+            raise click.exceptions.UsageError(error_msg, error.ctx)
+
+
+class DYMGroup(DYMMixin, click.Group):
+    """
+    click Group to provide git-like
+    *did-you-mean* functionality when a certain
+    command is not found in the group.
+    """
+
+
+class DYMCommandCollection(DYMMixin, click.CommandCollection):
+    """
+    click CommandCollection to provide git-like
+    *did-you-mean* functionality when a certain
+    command is not found in the group.
+    """
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/click-didyoumean-0.0.3/tests/test_core.py 
new/click-didyoumean-0.3.0/tests/test_core.py
--- old/click-didyoumean-0.0.3/tests/test_core.py       2016-03-13 
02:13:23.000000000 +0100
+++ new/click-didyoumean-0.3.0/tests/test_core.py       2021-09-29 
09:42:24.000000000 +0200
@@ -1,13 +1,8 @@
-# -*- coding: utf-8 -*-
-
-"""
-Module to test functionality of the click ``did-you-mean`` extension.
-"""
-
-import pytest
 import click
+import pytest
 from click.testing import CliRunner
-from click_didyoumean import DYMGroup, DYMCommandCollection
+
+from click_didyoumean import DYMCommandCollection, DYMGroup
 
 
 @pytest.fixture(scope="function")
@@ -34,8 +29,10 @@
 
     result = runner.invoke(cli, ["barr"])
     assert result.output == (
-        "Usage: cli [OPTIONS] COMMAND [ARGS]...\n\n"
-        "Error: No such command \"barr\".\n\n"
+        "Usage: cli [OPTIONS] COMMAND [ARGS]...\n"
+        "Try 'cli --help' for help.\n"
+        "\n"
+        "Error: No such command 'barr'.\n\n"
         "Did you mean one of these?\n"
         "    barrr\n"
         "    bar\n"
@@ -66,8 +63,10 @@
     cli = DYMCommandCollection(sources=[cli1, cli2])
     result = runner.invoke(cli, ["barr"])
     assert result.output == (
-        "Usage: root [OPTIONS] COMMAND [ARGS]...\n\n"
-        "Error: No such command \"barr\".\n\n"
+        "Usage: root [OPTIONS] COMMAND [ARGS]...\n"
+        "Try 'root --help' for help.\n"
+        "\n"
+        "Error: No such command 'barr'.\n\n"
         "Did you mean one of these?\n"
         "    barrr\n"
         "    bar\n"
@@ -94,8 +93,10 @@
     # if cutoff factor is 1.0 the match must be perfect.
     result = runner.invoke(cli, ["barr"])
     assert result.output == (
-        "Usage: cli [OPTIONS] COMMAND [ARGS]...\n\n"
-        "Error: No such command \"barr\".\n"
+        "Usage: cli [OPTIONS] COMMAND [ARGS]...\n"
+        "Try 'cli --help' for help.\n"
+        "\n"
+        "Error: No such command 'barr'.\n"
     )
 
 
@@ -123,8 +124,10 @@
     # if cutoff factor is 1.0 the match must be perfect.
     result = runner.invoke(cli, ["barr"])
     assert result.output == (
-        "Usage: cli [OPTIONS] COMMAND [ARGS]...\n\n"
-        "Error: No such command \"barr\".\n\n"
+        "Usage: cli [OPTIONS] COMMAND [ARGS]...\n"
+        "Try 'cli --help' for help.\n"
+        "\n"
+        "Error: No such command 'barr'.\n\n"
         "Did you mean one of these?\n"
         "    barrr\n"
         "    baarr\n"
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/click-didyoumean-0.0.3/tox.ini 
new/click-didyoumean-0.3.0/tox.ini
--- old/click-didyoumean-0.0.3/tox.ini  2016-03-13 02:13:23.000000000 +0100
+++ new/click-didyoumean-0.3.0/tox.ini  1970-01-01 01:00:00.000000000 +0100
@@ -1,10 +0,0 @@
-[tox]
-envlist = py26,py27,py33,py34,pypy
-
-[testenv]
-passenv = LANG
-commands = make test
-deps =
-    pytest
-    click
-whitelist_externals = make

Reply via email to