Script 'mail_helper' called by obssrc
Hello community,
here is the log from the commit of package python-cyclopts for openSUSE:Factory
checked in at 2026-10-01 22:20:27
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/python-cyclopts (Old)
and /work/SRC/openSUSE:Factory/.python-cyclopts.new.1253 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "python-cyclopts"
Thu Oct 1 22:20:27 2026 rev:21 rq:1381936 version:5.1.1
Changes:
--------
--- /work/SRC/openSUSE:Factory/python-cyclopts/python-cyclopts.changes
2026-10-01 16:45:27.196037657 +0200
+++
/work/SRC/openSUSE:Factory/.python-cyclopts.new.1253/python-cyclopts.changes
2026-10-01 22:21:14.169926553 +0200
@@ -1,0 +2,7 @@
+Thu Oct 1 16:00:31 UTC 2026 - Martin Pluskal <[email protected]>
+
+- Update to 5.1.1:
+ * Accept --flag=none on a bool | None annotation, so a tri-state
+ boolean can be set to None explicitly
+
+-------------------------------------------------------------------
Old:
----
cyclopts-5.1.0.tar.gz
New:
----
cyclopts-5.1.1.tar.gz
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ python-cyclopts.spec ++++++
--- /var/tmp/diff_new_pack.tiIRDD/_old 2026-10-01 22:21:14.805953236 +0200
+++ /var/tmp/diff_new_pack.tiIRDD/_new 2026-10-01 22:21:14.807953319 +0200
@@ -18,7 +18,7 @@
%bcond_without libalternatives
Name: python-cyclopts
-Version: 5.1.0
+Version: 5.1.1
Release: 0
Summary: Intuitive, easy CLIs based on python type hints
License: Apache-2.0
++++++ cyclopts-5.1.0.tar.gz -> cyclopts-5.1.1.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/cyclopts-5.1.0/PKG-INFO new/cyclopts-5.1.1/PKG-INFO
--- old/cyclopts-5.1.0/PKG-INFO 2020-02-02 01:00:00.000000000 +0100
+++ new/cyclopts-5.1.1/PKG-INFO 2020-02-02 01:00:00.000000000 +0100
@@ -1,6 +1,6 @@
Metadata-Version: 2.5
Name: cyclopts
-Version: 5.1.0
+Version: 5.1.1
Summary: Intuitive, easy CLIs based on type hints.
Project-URL: Homepage, https://github.com/BrianPugh/cyclopts
Project-URL: Repository, https://github.com/BrianPugh/cyclopts
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/cyclopts-5.1.0/cyclopts/_version.py
new/cyclopts-5.1.1/cyclopts/_version.py
--- old/cyclopts-5.1.0/cyclopts/_version.py 2020-02-02 01:00:00.000000000
+0100
+++ new/cyclopts-5.1.1/cyclopts/_version.py 2020-02-02 01:00:00.000000000
+0100
@@ -18,7 +18,7 @@
commit_id: str | None
__commit_id__: str | None
-__version__ = version = '5.1.0'
-__version_tuple__ = version_tuple = (5, 1, 0)
+__version__ = version = '5.1.1'
+__version_tuple__ = version_tuple = (5, 1, 1)
__commit_id__ = commit_id = None
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/cyclopts-5.1.0/cyclopts/bind.py
new/cyclopts-5.1.1/cyclopts/bind.py
--- old/cyclopts-5.1.0/cyclopts/bind.py 2020-02-02 01:00:00.000000000 +0100
+++ new/cyclopts-5.1.1/cyclopts/bind.py 2020-02-02 01:00:00.000000000 +0100
@@ -8,8 +8,8 @@
from functools import partial
from typing import TYPE_CHECKING, Any, NamedTuple, get_args
-from cyclopts._convert import _bool, create_empty_instance
-from cyclopts.annotations import is_union
+from cyclopts._convert import _bool, _none, create_empty_instance
+from cyclopts.annotations import is_nonetype, is_union
from cyclopts.argument import Argument, ArgumentCollection
from cyclopts.exceptions import (
ArgumentOrderError,
@@ -550,6 +550,23 @@
return common
+def _is_optional_bool_none_assignment(match: _KeywordMatch, value: str) ->
bool:
+ """Whether ``value`` is a none-string assigned to the positive flag of a
``bool | None``."""
+ hint = match.argument.hint
+ if not (
+ match.implicit_value is True
+ and match.argument.resolved_hint is bool
+ and is_union(hint)
+ and any(is_nonetype(arg) for arg in get_args(hint))
+ ):
+ return False
+ try:
+ _none(value)
+ except CoercionError:
+ return False
+ return True
+
+
def _parse_kw_and_flags(
argument_collection: ArgumentCollection,
tokens: Sequence[str],
@@ -770,7 +787,10 @@
match.argument.append(CliToken(keyword=match.matched_token, implicit_value=1))
elif match.implicit_value is not UNSET:
# A flag was parsed
- if cli_values:
+ if cli_values and _is_optional_bool_none_assignment(match,
cli_values[-1]):
+ # e.g. ``--flag=none`` for ``bool | None``.
+
match.argument.append(CliToken(keyword=match.matched_token,
implicit_value=None))
+ elif cli_values:
try:
coerced_value = _bool(cli_values[-1])
except CoercionError as e: