Skip to content

Conversation

@dependabot
Copy link
Contributor

@dependabot dependabot bot commented on behalf of github Dec 29, 2025

Bumps cmd2 from 2.7.0 to 3.1.0.

Release notes

Sourced from cmd2's releases.

3.1.0 (December 25, 2025)

  • Potentially Breaking Changes
    • cmd2 no longer has a dependency on cmd and cmd2.Cmd no longer inherits from cmd.Cmd
      • We don't think this should impact users, but there is theoretically a possibility
      • This opens the door for more impactful changes in the next major release

3.0.0 (December 7, 2025)

Summary

cmd2 now has a dependency on rich for rich text and pretty formatting in the terminal. Previously, cmd2 had a large amount of custom code for this purpose that predated the existence of rich. This opens the door to even more beautiful cmd2 applications. To get the most out of the new capabilities, we encourage you to spend a little bit of time reading the rich documentation.

Details

  • Breaking Changes

    • Refactored and modernized styling and utility modules:
      • Removed the legacy table_creator.py module in favor of rich tables (see the rich_tables.py example for more info)
      • Moved all string-related functions from utils.py to a new string_utils.py module
        • Removed redundant string from some of the names so quote_string is now just quote and quote_string_if_needed is now quote_if_needed
      • Consolidated all string styling functions from ansi.py into string_utils.py
      • Replaced all text style enums from ansi.py with modern rich styles
      • Renamed ansi.py to terminal_utils.py to better reflect its purpose
    • Dropped support for Python 3.9. cmd2 now requires Python 3.10 or later
    • Replaced Settable.get_value() and Settable.set_value() methods with a more Pythonic value property
    • Removed redundant setting of a parser's prog value in the with_argparser() decorator, as this is now handled centrally in Cmd._build_parser()
    • The auto_load_commands argument to cmd2.Cmd.__init__ now defaults to False
    • argparse_custom module breaking changes:
      • descriptive_header: str replaced with descriptive_headers: Sequence[str | rich.Column]
        • Applies to parameter name when adding an argument to a parser as well as set_descriptive_headers and get_descriptive_headers
      • CompletionItem.description: str changed to CompletionItem.descriptive_data: Sequence[str | rich.Column]
    • decorators module breaking changes:
      • _set_parser_prog renamed to set_parser_prog (without the leading underscore) and moved to argparse_custom module
    • Renamed history --output_file to --output-file to follow common command-line practices
  • Enhancements

    • Enhanced all print methods (poutput(), perror(), ppaged(), etc.) to natively render rich objects, enabling beautiful and complex output
    • Simplified the process for setting a custom parser for cmd2's built-in commands. See the custom_parser.py example for an updated guide
    • Introduced Cmd.macro_arg_complete() for tab-completing macro arguments, with default path completion that can be easily customized
    • Added colors.py and styles.py to provide easy access to rich color names and manage cmd2-specific style definitions using StrEnum (see the colors.py example for a demonstration of all colors available to your cmd2 application)
    • Added ability to create a custom theme for a cmd2 application using rich_utils.set_theme (see the rich_theme.py example for more info)
    • Consolidated multiple redundant examples into a few more comprehensive ones, see:
    • Optimized performance of terminal fixup during command finalization by replacing stty sane with termios.tcsetattr
  • Bug Fixes

    • Fixed a redirection bug where cmd2 could unintentionally overwrite an application's sys.stdout
  • Migration Aids - these will help you iteratively migrate to cmd2 3.x in stages

... (truncated)

Changelog

Sourced from cmd2's changelog.

3.1.0 (December 25, 2025)

  • Potentially Breaking Changes
    • cmd2 no longer has a dependency on cmd and cmd2.Cmd no longer inherits from cmd.Cmd
      • We don't think this should impact users, but there is theoretically a possibility
      • This opens the door for more impactful changes in the next major release

3.0.0 (December 7, 2025)

Summary

cmd2 now has a dependency on rich for rich text and pretty formatting in the terminal. Previously, cmd2 had a large amount of custom code for this purpose that predated the existence of rich. This opens the door to even more beautiful cmd2 applications. To get the most out of the new capabilities, we encourage you to spend a little bit of time reading the rich documentation.

Details

  • Breaking Changes

    • Refactored and modernized styling and utility modules:
      • Removed the legacy table_creator.py module in favor of rich tables (see the rich_tables.py example for more info)
      • Moved all string-related functions from utils.py to a new string_utils.py module
        • Removed redundant string from some of the names so quote_string is now just quote and quote_string_if_needed is now quote_if_needed
      • Consolidated all string styling functions from ansi.py into string_utils.py
      • Replaced all text style enums from ansi.py with modern rich styles
      • Renamed ansi.py to terminal_utils.py to better reflect its purpose
    • Dropped support for Python 3.9. cmd2 now requires Python 3.10 or later
    • Replaced Settable.get_value() and Settable.set_value() methods with a more Pythonic value property
    • Removed redundant setting of a parser's prog value in the with_argparser() decorator, as this is now handled centrally in Cmd._build_parser()
    • The auto_load_commands argument to cmd2.Cmd.__init__ now defaults to False
    • argparse_custom module breaking changes:
      • descriptive_header: str replaced with descriptive_headers: Sequence[str | rich.Column]
        • Applies to parameter name when adding an argument to a parser as well as set_descriptive_headers and get_descriptive_headers
      • CompletionItem.description: str changed to CompletionItem.descriptive_data: Sequence[str | rich.Column]
    • decorators module breaking changes:
      • _set_parser_prog renamed to set_parser_prog (without the leading underscore) and moved to argparse_custom module
    • Renamed history --output_file to --output-file to follow common command-line practices
  • Enhancements

    • Enhanced all print methods (poutput(), perror(), ppaged(), etc.) to natively render rich objects, enabling beautiful and complex output

... (truncated)

Commits
  • 0cb14a8 Use uv for publishing to PyPI instead of twine (#1548)
  • 781f613 Remove MkDocs macros dependency since it was unused
  • 652b3f9 Convert a few more markdown-include plugin usages to pymdown.snippets extensi...
  • b443268 Eliminate use of the include-markdown plugin for MkDocs (#1544)
  • 133c0e6 Updated minimum versions for dev dependencies
  • c1edaaf Update versions of prettier and ruff
  • 5714cce Bump actions/cache from 4 to 5 (#1543)
  • cac30ed Remove override ignore comments since we no longer inherit from cmd
  • 3e1ec82 Remove dependency on Python's built-in cmd module (#1539)
  • 35af636 Bump actions/checkout from 5.0.1 to 6.0.1 (#1542)
  • Additional commits viewable in compare view

Dependabot compatibility score

Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


Dependabot commands and options

You can trigger Dependabot actions by commenting on this PR:

  • @dependabot rebase will rebase this PR
  • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
  • @dependabot merge will merge this PR after your CI passes on it
  • @dependabot squash and merge will squash and merge this PR after your CI passes on it
  • @dependabot cancel merge will cancel a previously requested merge and block automerging
  • @dependabot reopen will reopen this PR if it is closed
  • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
  • @dependabot show <dependency name> ignore conditions will show all of the ignore conditions of the specified dependency
  • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
  • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
  • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)

Bumps [cmd2](https://github.com/python-cmd2/cmd2) from 2.7.0 to 3.1.0.
- [Release notes](https://github.com/python-cmd2/cmd2/releases)
- [Changelog](https://github.com/python-cmd2/cmd2/blob/main/CHANGELOG.md)
- [Commits](python-cmd2/cmd2@2.7.0...3.1.0)

---
updated-dependencies:
- dependency-name: cmd2
  dependency-version: 3.1.0
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
@dependabot dependabot bot added dependencies Pull requests that update a dependency file python Pull requests that update python code labels Dec 29, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

dependencies Pull requests that update a dependency file python Pull requests that update python code

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant