Skip to content

Commit 4783455

Browse files
committed
Restored upgrade documentation.
1 parent 1dd6d43 commit 4783455

1 file changed

Lines changed: 14 additions & 1 deletion

File tree

docs/upgrades.md

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,8 @@ The major things users should be aware of when upgrading to 3.x are detailed in
6363
#### ansi
6464

6565
The functionality within the `cmd2.ansi` module has either been removed or changed to be based on
66-
`rich` and moved to one of the new modules: [cmd2.string_utils][] or [cmd2.styles][].
66+
`rich` and moved to one of the new modules: [cmd2.string_utils][], [cmd2.styles][], or
67+
[cmd2.terminal_utils][].
6768

6869
To ease the migration path from `cmd2` 2.x to 3.x, we have created the `cmd2-ansi` module which is a
6970
backport of the `cmd2.ansi` module present in `cmd2` 2.7.0 in a standalone fashion. Relevant links:
@@ -146,6 +147,18 @@ This includes functions for styling, aligning, and quoting/un-quoting text. See
146147
[getting_started.py](https://github.com/python-cmd2/cmd2/blob/main/examples/getting_started.py)
147148
example for a demonstration of how to use the common [cmd2.string_utils.stylize][] function.
148149

150+
#### terminal_utils
151+
152+
Support for terminal control escape sequences for things like setting the window title and
153+
asynchronous alerts has been moved from `cmd2.ansi` to the new [cmd2.terminal_utils][] module.
154+
155+
This isn't really intended to be used by end users, but is used by higher-level functionality that
156+
is intended to be used by end users such as [cmd2.Cmd.set_window_title][] and
157+
[cmd2.Cmd.async_alert][].
158+
159+
See [async_printing.py](https://github.com/python-cmd2/cmd2/blob/main/examples/async_printing.py)
160+
for an example of how to use this functionality in a `cmd2` application.
161+
149162
### Argparse HelpFormatter classes
150163

151164
`cmd2` now has 5 different Argparse HelpFormatter classes, all of which are based on the

0 commit comments

Comments
 (0)