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-07-20 09:59:43
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/python-cyclopts (Old)
and /work/SRC/openSUSE:Factory/.python-cyclopts.new.24530 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "python-cyclopts"
Mon Jul 20 09:59:43 2026 rev:5 rq:1366649 version:4.22.0
Changes:
--------
--- /work/SRC/openSUSE:Factory/python-cyclopts/python-cyclopts.changes
2026-07-17 18:50:17.730909235 +0200
+++
/work/SRC/openSUSE:Factory/.python-cyclopts.new.24530/python-cyclopts.changes
2026-07-20 10:01:49.921161844 +0200
@@ -1,0 +2,12 @@
+Mon Jul 20 05:51:02 UTC 2026 - Martin Pluskal <[email protected]>
+
+- Update to 4.22.0:
+ * Reject malformed timedelta strings instead of silently
+ ignoring garbage input
+ * Fix parsing of signed base-prefixed integers (-0xFF, +0o17)
+ * Honour config search_parents=False so parent directories are
+ no longer walked
+- Changes from 4.21.2:
+ * Fix the "--" delimiter leaking into an "Unknown option" error
+
+-------------------------------------------------------------------
Old:
----
cyclopts-4.21.1.tar.gz
New:
----
cyclopts-4.22.0.tar.gz
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ python-cyclopts.spec ++++++
--- /var/tmp/diff_new_pack.1aSXKC/_old 2026-07-20 10:01:50.681187421 +0200
+++ /var/tmp/diff_new_pack.1aSXKC/_new 2026-07-20 10:01:50.681187421 +0200
@@ -17,7 +17,7 @@
Name: python-cyclopts
-Version: 4.21.1
+Version: 4.22.0
Release: 0
Summary: Intuitive, easy CLIs based on python type hints
License: Apache-2.0
++++++ cyclopts-4.21.1.tar.gz -> cyclopts-4.22.0.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/cyclopts-4.21.1/PKG-INFO new/cyclopts-4.22.0/PKG-INFO
--- old/cyclopts-4.21.1/PKG-INFO 2020-02-02 01:00:00.000000000 +0100
+++ new/cyclopts-4.22.0/PKG-INFO 2020-02-02 01:00:00.000000000 +0100
@@ -1,6 +1,6 @@
Metadata-Version: 2.4
Name: cyclopts
-Version: 4.21.1
+Version: 4.22.0
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-4.21.1/cyclopts/_convert.py
new/cyclopts-4.22.0/cyclopts/_convert.py
--- old/cyclopts-4.21.1/cyclopts/_convert.py 2020-02-02 01:00:00.000000000
+0100
+++ new/cyclopts-4.22.0/cyclopts/_convert.py 2020-02-02 01:00:00.000000000
+0100
@@ -90,11 +90,15 @@
def _int(s: str) -> int:
s = s.lower()
- if s.startswith("0x"):
+ # Detect the base prefix past an optional leading sign; ``int(s, base)``
+ # handles the sign itself, so negative/explicitly-positive values like
+ # "-0xff" parse the same way "-255" already does.
+ unsigned = s[1:] if s[:1] in ("+", "-") else s
+ if unsigned.startswith("0x"):
return int(s, 16)
- elif s.startswith("0o"):
+ elif unsigned.startswith("0o"):
return int(s, 8)
- elif s.startswith("0b"):
+ elif unsigned.startswith("0b"):
return int(s, 2)
elif "." in s:
# Casting to a float first allows for things like "30.0"
@@ -141,6 +145,7 @@
def _timedelta(s: str) -> timedelta:
"""Parse a timedelta string."""
+ s = s.strip()
negative = False
if s.startswith("-"):
negative = True
@@ -148,7 +153,10 @@
matches = re.findall(r"((\d+\.\d+|\d+)([smhdwMy]))", s)
- if not matches:
+ # Every character must belong to a "<number><unit>" token. Without this
+ # check, ``re.findall`` silently ignores stray characters, so a malformed
+ # duration like "5sfoo" would be accepted as 5s instead of raising.
+ if not matches or "".join(match[0] for match in matches) != s:
raise ValueError(f"Could not parse duration string: {s}")
seconds = 0
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/cyclopts-4.21.1/cyclopts/_version.py
new/cyclopts-4.22.0/cyclopts/_version.py
--- old/cyclopts-4.21.1/cyclopts/_version.py 2020-02-02 01:00:00.000000000
+0100
+++ new/cyclopts-4.22.0/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 = '4.21.1'
-__version_tuple__ = version_tuple = (4, 21, 1)
+__version__ = version = '4.22.0'
+__version_tuple__ = version_tuple = (4, 22, 0)
__commit_id__ = commit_id = None
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/cyclopts-4.21.1/cyclopts/bind.py
new/cyclopts-4.22.0/cyclopts/bind.py
--- old/cyclopts-4.21.1/cyclopts/bind.py 2020-02-02 01:00:00.000000000
+0100
+++ new/cyclopts-4.22.0/cyclopts/bind.py 2020-02-02 01:00:00.000000000
+0100
@@ -448,8 +448,15 @@
# Continue in case we hit a VAR_POSITIONAL argument.
continue
if prior_positional_or_keyword_supplied_as_keyword_arguments:
- token = tokens[0]
- if not argument.parameter.allow_leading_hyphen and
is_option_like(token):
+ if not tokens_and_force_positional:
+ # ``tokens`` contained only the ``--`` end-of-options
delimiter;
+ # there are no positional tokens to misassign.
+ break
+ # Use the preprocessed token: ``tokens`` still contains the
``--``
+ # end-of-options delimiter, and ``force_positional`` marks
tokens
+ # after it, which must not be treated as options.
+ token, force_positional = tokens_and_force_positional[0]
+ if not force_positional and not
argument.parameter.allow_leading_hyphen and is_option_like(token):
# It's more meaningful to interpret the token as an
intended option,
# rather than an intended positional value for
``argument``.
raise UnknownOptionError(token=CliToken(value=token),
argument_collection=argument_collection)
@@ -457,7 +464,7 @@
raise ArgumentOrderError(
argument=argument,
prior_positional_or_keyword_supplied_as_keyword_arguments=prior_positional_or_keyword_supplied_as_keyword_arguments,
- token=tokens_and_force_positional[0][0],
+ token=token,
)
tokens_per_element, consume_all = argument.token_count()
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/cyclopts-4.21.1/cyclopts/config/_common.py
new/cyclopts-4.22.0/cyclopts/config/_common.py
--- old/cyclopts-4.21.1/cyclopts/config/_common.py 2020-02-02
01:00:00.000000000 +0100
+++ new/cyclopts-4.22.0/cyclopts/config/_common.py 2020-02-02
01:00:00.000000000 +0100
@@ -160,11 +160,9 @@
msg += exception_msg
raise CycloptsError(msg=msg) from e
return self._config
- elif self.search_parents:
- # Continue iterating over parents.
- continue
- elif self.must_exist:
- raise FileNotFoundError(errno.ENOENT,
os.strerror(errno.ENOENT), str(self.path))
+ if not self.search_parents:
+ # Only look at the specified path; do not walk parent
directories.
+ break
# No matching file was found.
if self.must_exist:
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/cyclopts-4.21.1/cyclopts/utils.py
new/cyclopts-4.22.0/cyclopts/utils.py
--- old/cyclopts-4.21.1/cyclopts/utils.py 2020-02-02 01:00:00.000000000
+0100
+++ new/cyclopts-4.22.0/cyclopts/utils.py 2020-02-02 01:00:00.000000000
+0100
@@ -277,6 +277,10 @@
# https://github.com/BrianPugh/cyclopts/issues/328
return True
return False
+ with suppress(ValueError):
+ # ``complex`` cannot parse base-prefixed integers (e.g. ``-0xFF``,
``-0b101``).
+ int(token, 0)
+ return False
# Lazy imports to avoid a circular import (exceptions/_convert import
utils).
from cyclopts._convert import _slice
from cyclopts.exceptions import CoercionError