Skip to content

RichHelpFormatter not working on Python 3.14.0b1 #163

Closed
@tleonhardt

Description

@tleonhardt

I help maintain the cmd2 open-source library and for the next version we have been working on incorporating rich-argparse to make our help output more aesthetically pleasing.

We recently added testing for Python 3.14-dev to our GitHub Actions CI workflow and we are getting numerous unit test errors related to RichHelpFormatter. The errors all look like the following

/opt/hostedtoolcache/Python/3.14.0-beta.1/x64/lib/python3.14/argparse.py:2729: in _get_formatter
    return self.formatter_class(
E   TypeError: RichHelpFormatter.__init__() got an unexpected keyword argument 'prefix_chars'

Looking at the argparse documentation for Python 3.14, I highly suspect this deprecation notice may be of relevance here:

Deprecated since version 3.14: Passing prefix_chars to add_argument_group() is now deprecated.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions