Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
options: adjust to behavior change in upstream _parse_optional
In Python 3.13 and 3.12.7, the behavior of _parse_optional has changed. It used to raise an error on multiple matching actions itself, and only ever return None or an option tuple. Now the "raise error on multiple matching actions" code was moved out into consume_optional, and _parse_optional returns either None or a *list* of option tuples, which contains more than one if multiple actions match. See: python/cpython#124631 python/cpython#58573 This adapts to the change in a way that should work on both older and newer Pythons. Signed-off-by: Adam Williamson <awilliam@redhat.com>
- Loading branch information