Releases: python-cmd2/cmd2
Releases · python-cmd2/cmd2
2.5.3 (November 5, 2024)
- Enhancements
- Changed
CommandSet._cmd
to a read-only property which never returnsNone
because it is meant to be called after theCommandSet
is registered. This addresses type checker errors that occurred ifCommandSet._cmd
wasn't cast or checked ifNone
before use.
- Changed
2.5.2 (November 3, 2024)
- Bug Fixes
- Fixed default
pytest
execution when not using cmd2's custominvoke
command viainv pytest
- Fixed default
2.5.1 (November 2, 2024)
- Bug Fixes
- Fixed readline bug when using ipy command with gnureadline and Python 3.13
2.5.0 (October 23, 2024)
- Breaking Change
cmd2
2.5 supports Python 3.8+ (removed support for Python 3.6 and 3.7)
- Bug Fixes
- Fixed issue where persistent history file was not saved upon SIGHUP and SIGTERM signals.
- Multiline commands are no longer fragmented in up-arrow history.
- Fixed bug where
async_alert()
overwrites readline's incremental and non-incremental search prompts.- This fix introduces behavior where an updated prompt won't display after an aborted search
until a user presses Enter. See async_printing.py
example for how to handle this case usingCmd.need_prompt_refresh()
andCmd.async_refresh_prompt()
.
- This fix introduces behavior where an updated prompt won't display after an aborted search
- Enhancements
- Removed dependency on
attrs
and replaced with dataclasses - add
allow_clipboard
initialization parameter and attribute to disable ability to
add output to the operating system clipboard - Updated unit tests to be Python 3.13 compliant.
- Fall back to bz2 compression of history file when lzma is not installed.
- Added settable called
scripts_add_to_history
which determines whether scripts and pyscripts
add commands to history.
- Removed dependency on
- Deletions (potentially breaking changes)
- Removed
apply_style
fromCmd.pwarning()
.
- Removed
2.4.3 (January 27, 2023)
- Bug Fixes
- Fixed ValueError caused when passing
Cmd.columnize()
strings wider thandisplay_width
.
- Fixed ValueError caused when passing
- Enhancements
- Renamed
utils.str_to_bool()
->utils.to_bool()
. - Enhanced
utils.to_bool()
so that it accepts and convertsbool
,int
, andfloat
in addition tostr
.
- Renamed
2.4.2 (July 13, 2022)
- Enhancements
- Updated argparse decorator to remove annotations when the docstring is used for a command's help text.
- Updated unit test to be Python 3.11 compliant.
2.4.1 (April 13, 2022)
- Bug Fixes
- Fixed value for
ansi.Bg.YELLOW
. - Fixed unit tests for
ansi.allow_style
.
- Fixed value for
- Enhancements
async_alert()
raises aRuntimeError
if called from the main thread.
2.4.0 (February 22, 2022)
- Bug Fixes
- Fixed issue in
ansi.async_alert_str()
which would raiseIndexError
if prompt was blank. - Fixed issue where tab completion was quoting argparse flags in some cases.
- Fixed issue in
- Enhancements
- Added broader exception handling when enabling clipboard functionality via
pyperclip
. - Added
PassThroughException
to__init__.py
imports. - cmd2 now uses pyreadline3 when running any version of Python on Windows
- Improved memory usage in certain use cases of tables (e.g. nested colored tables)
- Added broader exception handling when enabling clipboard functionality via
- Deletions (potentially breaking changes)
- Deleted
cmd2.fg
andcmd2.bg
which were deprecated in 2.3.0. Usecmd2.Fg
andcmd2.Bg
instead.
- Deleted
2.3.3 (November 29, 2021)
- Enhancements
- Added clearer exception handling to
BorderedTable
andSimpleTable
.
- Added clearer exception handling to
2.3.2 (November 22, 2021)
- Bug Fixes
- Fixed issue where a
ns_provider
could be passedNone
instead of its correctcmd2.Cmd
orCommandSet
value.
- Fixed issue where a