Skip to content

Python 3.14.0b1: test errors with TypeError: Cmd2ArgumentParser.__init__() got an unexpected keyword argument 'color' #1418

Closed
@befeleme

Description

@befeleme

I try to build cmd2 with Python 3.14.0b1, but fail, because of the changes that happened in Python, resulting in a few errors in tests:

==================================== ERRORS ====================================
___________________ ERROR collecting tests/test_argparse.py ____________________
tests/test_argparse.py:263: in <module>
    class SubcommandApp(cmd2.Cmd):
tests/test_argparse.py:284: in SubcommandApp
    parser_foo = base_subparsers.add_parser('foo', help='foo help')
/usr/lib64/python3.14/argparse.py:1268: in add_parser
    parser = self._parser_class(**kwargs)
E   TypeError: Cmd2ArgumentParser.__init__() got an unexpected keyword argument 'color'
______________ ERROR collecting tests/test_argparse_completer.py _______________
tests/test_argparse_completer.py:50: in <module>
    class ArgparseCompleterTester(cmd2.Cmd):
tests/test_argparse_completer.py:64: in ArgparseCompleterTester
    music_create_parser = music_subparsers.add_parser('create', help='create music')
/usr/lib64/python3.14/argparse.py:1268: in add_parser
    parser = self._parser_class(**kwargs)
E   TypeError: Cmd2ArgumentParser.__init__() got an unexpected keyword argument 'color'
__________________ ERROR collecting tests/test_completion.py ___________________
tests/test_completion.py:23: in <module>
    from examples.subcommands import (
examples/subcommands.py:19: in <module>
    parser_foo = base_subparsers.add_parser('foo', help='foo help')
/usr/lib64/python3.14/argparse.py:1268: in add_parser
    parser = self._parser_class(**kwargs)
E   TypeError: Cmd2ArgumentParser.__init__() got an unexpected keyword argument 'color'
=========================== short test summary info ============================
ERROR tests/test_argparse.py - TypeError: Cmd2ArgumentParser.__init__() got a...
ERROR tests/test_argparse_completer.py - TypeError: Cmd2ArgumentParser.__init...
ERROR tests/test_completion.py - TypeError: Cmd2ArgumentParser.__init__() got...
!!!!!!!!!!!!!!!!!!! Interrupted: 3 errors during collection !!!!!!!!!!!!!!!!!!!!
============================== 3 errors in 1.58s ===============================

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions