VOLTTRON / volttron

VOLTTRON Distributed Control System Platform
https://volttron.readthedocs.io/
Other
452 stars 217 forks source link

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

Open davidraker opened 2 months ago

davidraker commented 2 months ago

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:

https://github.com/python/cpython/pull/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.