VOLTTRON/volttron

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

Opened this issue · 0 comments

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.