Script 'mail_helper' called by obssrc Hello community, here is the log from the commit of package python-cloup for openSUSE:Factory checked in at 2023-12-08 22:31:37 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/python-cloup (Old) and /work/SRC/openSUSE:Factory/.python-cloup.new.25432 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "python-cloup" Fri Dec 8 22:31:37 2023 rev:8 rq:1131672 version:3.0.3 Changes: -------- --- /work/SRC/openSUSE:Factory/python-cloup/python-cloup.changes 2023-10-19 22:53:42.592338564 +0200 +++ /work/SRC/openSUSE:Factory/.python-cloup.new.25432/python-cloup.changes 2023-12-08 22:31:42.531239164 +0100 @@ -1,0 +2,7 @@ +Thu Dec 7 17:25:53 UTC 2023 - Dirk Müller <dmuel...@suse.com> + +- update to 3.0.3: + * Redefine click.pass_context and click.get_current_context to + use cloup.Context in place of click.Context + +------------------------------------------------------------------- Old: ---- cloup-3.0.2.tar.gz New: ---- cloup-3.0.3.tar.gz ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ python-cloup.spec ++++++ --- /var/tmp/diff_new_pack.A1Hnuk/_old 2023-12-08 22:31:43.559276990 +0100 +++ /var/tmp/diff_new_pack.A1Hnuk/_new 2023-12-08 22:31:43.559276990 +0100 @@ -17,7 +17,7 @@ Name: python-cloup -Version: 3.0.2 +Version: 3.0.3 Release: 0 Summary: Option groups, constraints, subcommand sections and help themes for Click License: BSD-3-Clause @@ -27,14 +27,14 @@ BuildRequires: %{python_module setuptools_scm} BuildRequires: %{python_module setuptools} BuildRequires: %{python_module wheel} +BuildRequires: fdupes BuildRequires: python-rpm-macros +Requires: python-click >= 8.0 +BuildArch: noarch # SECTION test requirements BuildRequires: %{python_module click >= 8.0} BuildRequires: %{python_module pytest} # /SECTION -BuildRequires: fdupes -Requires: python-click >= 8.0 -BuildArch: noarch %python_subpackages %description ++++++ _scmsync.obsinfo ++++++ --- /var/tmp/diff_new_pack.A1Hnuk/_old 2023-12-08 22:31:43.607278756 +0100 +++ /var/tmp/diff_new_pack.A1Hnuk/_new 2023-12-08 22:31:43.611278904 +0100 @@ -1,5 +1,5 @@ -mtime: 1697729011 -commit: 117fc732a80a5654c2368214ea353bf95d82fb0f -url: https://src.opensuse.org/mimi_vx/python-cloup.git -revision: 117fc732a80a5654c2368214ea353bf95d82fb0f +mtime: 1701970008 +commit: 3c7ec77388bc699c5eecdece98428b60e82cd159 +url: https://src.opensuse.org/dirkmueller/python-cloup.git +revision: 3c7ec77388bc699c5eecdece98428b60e82cd159 ++++++ cloup-3.0.2.tar.gz -> cloup-3.0.3.tar.gz ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/cloup-3.0.2/.github/workflows/tests.yaml new/cloup-3.0.3/.github/workflows/tests.yaml --- old/cloup-3.0.2/.github/workflows/tests.yaml 2023-09-07 23:51:50.000000000 +0200 +++ new/cloup-3.0.3/.github/workflows/tests.yaml 2023-11-13 03:31:13.000000000 +0100 @@ -5,6 +5,8 @@ tags: [v*] pull_request: workflow_dispatch: + schedule: + - cron: "0 6 * * 0" jobs: tests: diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/cloup-3.0.2/PKG-INFO new/cloup-3.0.3/PKG-INFO --- old/cloup-3.0.2/PKG-INFO 2023-09-07 23:52:06.000000000 +0200 +++ new/cloup-3.0.3/PKG-INFO 2023-11-13 03:31:23.000000000 +0100 @@ -1,6 +1,6 @@ Metadata-Version: 2.1 Name: cloup -Version: 3.0.2 +Version: 3.0.3 Summary: Adds features to Click: option groups, constraints, subcommand sections and help themes. Home-page: https://github.com/janLuke/cloup Author: Gianluca Gippetto diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/cloup-3.0.2/cloup/__init__.py new/cloup-3.0.3/cloup/__init__.py --- old/cloup-3.0.2/cloup/__init__.py 2023-09-07 23:51:50.000000000 +0200 +++ new/cloup-3.0.3/cloup/__init__.py 2023-11-13 03:31:13.000000000 +0100 @@ -11,7 +11,6 @@ # decorators confirmation_option, help_option, - pass_context, pass_obj, password_option, version_option, @@ -42,7 +41,7 @@ HelpFormatter, HelpSection, ) -from ._context import Context +from ._context import Context, get_current_context, pass_context from ._params import Argument, Option, argument, option from ._option_groups import ( OptionGroup, @@ -104,6 +103,7 @@ "constraint", "dir_path", "file_path", + "get_current_context", "group", "help_option", "option", diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/cloup-3.0.2/cloup/_context.py new/cloup-3.0.3/cloup/_context.py --- old/cloup-3.0.2/cloup/_context.py 2023-09-07 23:51:50.000000000 +0200 +++ new/cloup-3.0.3/cloup/_context.py 2023-11-13 03:31:13.000000000 +0100 @@ -1,5 +1,10 @@ +from __future__ import annotations + import warnings -from typing import Any, Callable, Dict, List, Optional, Type +from functools import update_wrapper +from typing import ( + Any, Callable, cast, Dict, List, Optional, Type, TypeVar, TYPE_CHECKING, overload, +) import click @@ -8,6 +13,41 @@ from cloup.formatting import HelpFormatter from cloup.typing import MISSING, Possibly +if TYPE_CHECKING: + import typing_extensions as te + + P = te.ParamSpec("P") + +R = TypeVar("R") + + +@overload +def get_current_context() -> "Context": + ... + + +@overload +def get_current_context(silent: bool = False) -> "Optional[Context]": + ... + + +def get_current_context(silent: bool = False) -> "Optional[Context]": + """Equivalent to :func:`click.get_current_context` but casts the returned + :class:`click.Context` object to :class:`cloup.Context` (which is safe when using + cloup commands classes and decorators).""" + return cast(Optional[Context], click.get_current_context(silent=silent)) + + +def pass_context(f: "Callable[te.Concatenate[Context, P], R]") -> "Callable[P, R]": + """Marks a callback as wanting to receive the current context object as first + argument. Equivalent to :func:`click.pass_context` but assumes the current context + is of type :class:`cloup.Context`.""" + + def new_func(*args: "P.args", **kwargs: "P.kwargs") -> R: + return f(get_current_context(), *args, **kwargs) + + return update_wrapper(new_func, f) + def _warn_if_formatter_settings_conflict( ctx_key: str, diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/cloup-3.0.2/cloup/_version.py new/cloup-3.0.3/cloup/_version.py --- old/cloup-3.0.2/cloup/_version.py 2023-09-07 23:52:06.000000000 +0200 +++ new/cloup-3.0.3/cloup/_version.py 2023-11-13 03:31:23.000000000 +0100 @@ -1,4 +1,4 @@ # file generated by setuptools_scm # don't change, don't track in version control -__version__ = version = '3.0.2' -__version_tuple__ = version_tuple = (3, 0, 2) +__version__ = version = '3.0.3' +__version_tuple__ = version_tuple = (3, 0, 3) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/cloup-3.0.2/cloup.egg-info/PKG-INFO new/cloup-3.0.3/cloup.egg-info/PKG-INFO --- old/cloup-3.0.2/cloup.egg-info/PKG-INFO 2023-09-07 23:52:06.000000000 +0200 +++ new/cloup-3.0.3/cloup.egg-info/PKG-INFO 2023-11-13 03:31:23.000000000 +0100 @@ -1,6 +1,6 @@ Metadata-Version: 2.1 Name: cloup -Version: 3.0.2 +Version: 3.0.3 Summary: Adds features to Click: option groups, constraints, subcommand sections and help themes. Home-page: https://github.com/janLuke/cloup Author: Gianluca Gippetto diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/cloup-3.0.2/tox.ini new/cloup-3.0.3/tox.ini --- old/cloup-3.0.2/tox.ini 2023-09-07 23:51:50.000000000 +0200 +++ new/cloup-3.0.3/tox.ini 2023-11-13 03:31:13.000000000 +0100 @@ -39,7 +39,9 @@ commands = flake8 cloup tests examples [testenv:mypy] -deps = mypy +deps = + mypy + typing-extensions commands = mypy --strict cloup mypy tests examples