Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Changes to argparse break handling of single dash arguments in platform/config.py. #3173

Open
davidraker opened this issue Apr 20, 2024 · 0 comments

Comments

@davidraker
Copy link
Contributor

Recent changes to the argparse module in cpython will break the ability of volttron to parse single dash arguments (e.g., "-vv"). This prevents the platform from being started with those options. The breaking change, which will affect python >=3.11.9 and >=3.12.3, occured here:

python/cpython#115675

The change is to the return signature of ArgumentParser._parse_optional(). It previously returned a 3-tuple: (action, option_string, explicit_arg). It now returns a 4-tuple: (action, option_string, sep, explicit_arg).

To Reproduce
Start VOLTTRON on 3.12:

  1. unpin gevent, pyzmq, and requests (updating these is already a separate issue).
  2. run bootstrap.
  3. volttron -vv

You will get a "too many values to unpack" error which kills VOLTTRON early in the startup process.

Expected behavior
VOLTTRON starts normally.

@davidraker davidraker mentioned this issue Apr 20, 2024
9 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant