You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Does not work with Python 3.14, breaking changes to Argparse #434
All CLI commands are broken when using Python 3.14 due to changes in Argparse, adding nested mutually exclusive groups is now an error:
$ aws-encryption-cli --version --verbosity 4
Encountered unexpected error: increase verbosity to see details.
ValueError("mutually exclusive groups cannot be nested")
Exception traceback:
File "/Users/xxxxxx/.local/bin/aws-encryption-cli", line 7, in <module>
sys.exit(cli())
~~~^^
File "/Users/xxxxxx/.local/pipx/venvs/aws-encryption-sdk-cli/lib/python3.14/site-packages/aws_encryption_sdk_cli/__init__.py", line 270, in cli
args = parse_args(raw_args)
File "/Users/xxxxxx/.local/pipx/venvs/aws-encryption-sdk-cli/lib/python3.14/site-packages/aws_encryption_sdk_cli/internal/arg_parsing.py", line 636, in parse_args
parser = _build_parser()
File "/Users/xxxxxx/.local/pipx/venvs/aws-encryption-sdk-cli/lib/python3.14/site-packages/aws_encryption_sdk_cli/internal/arg_parsing.py", line 186, in _build_parser
operating_action = version_or_action.add_mutually_exclusive_group()
File "/opt/homebrew/Cellar/[email protected]/3.14.0_1/Frameworks/Python.framework/Versions/3.14/lib/python3.14/argparse.py", line 1816, in add_mutually_exclusive_group
raise ValueError('mutually exclusive groups cannot be nested')
ValueError: mutually exclusive groups cannot be nested
In Python 3.14 the relevant code in argparse.py is:
class_MutuallyExclusiveGroup(_ArgumentGroup):
...
defadd_mutually_exclusive_group(self, **kwargs):
raiseValueError('mutually exclusive groups cannot be nested')
At a glance, I'm not sure how to fix this, it looks to require a bit of an overhaul of argument parsing. Nesting mutually exclusive groups has been deprecated since Python 3.11 though.
Reacted by Richard Jenkins, Nicholas Beninato, natehudson, Marlon Gracietti Amorim, Tori Bench, Anthony and Willem Govaerts
Activity
aws-encryption-sdk-cli: fix build with Python 3.14
aws-encryption-sdk-cli: fix build with Python 3.14