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
Python3.15a3 breaks %(default)x in help strings #142980
Traceback (most recent call last):
File "/Users/aprengere/Dev/cpython/Lib/argparse.py", line 1792, in _check_help
formatter._expand_help(action)
~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^
File "/Users/aprengere/Dev/cpython/Lib/argparse.py", line 695, in _expand_help
return help_string % params
~~~~~~~~~~~~^~~~~~~~
TypeError: %x format: an integer is required, not str
The reason is that now the values are "colored" (thus converted to str) before doing the actual interpolation using help_string % values.
If the expected type is not string (integer in this example), then the --help will fail.
I will try to fix this using a different approach for #141940
Activity
grayjk commentedon Dec 19, 2025
duplicate of #142950?
alexprengere commentedon Dec 19, 2025
Yep, will close now 👍