|
2 | 2 | * Enhancements |
3 | 3 | * Added support for and testing with Python 3.8, starting with 3.8 beta |
4 | 4 | * Improved information displayed during transcript testing |
| 5 | + * Added `ansi` module with functions and constants to support ANSI escape sequences which are used for things |
| 6 | + like applying style to text |
| 7 | + * Added support for applying styles (color, bold, underline) to text via `style()` function in `ansi` module |
| 8 | + * Added default styles to ansi.py for printing `success`, `warning`. and `error` text. These are the styles used |
| 9 | + by cmd2 and can be overridden to match the color scheme of your application. |
| 10 | + * Added `ansi_aware_write()` function to `ansi` module. This function takes into account the value of `allow_ansi` |
| 11 | + to determine if ANSI escape sequences should be stripped when not writing to a tty. See documentation for more |
| 12 | + information on the `allow_ansi` setting. |
5 | 13 | * Breaking Changes |
6 | 14 | * Python 3.4 reached its [end of life](https://www.python.org/dev/peps/pep-0429/) on March 18, 2019 and is no longer supported by `cmd2` |
7 | 15 | * If you need to use Python 3.4, you should pin your requirements to use `cmd2` 0.9.13 |
8 | 16 | * Made lots of changes to minimize the public API of the `cmd2.Cmd` class |
9 | 17 | * Attributes and methods we do not intend to be public now all begin with an underscore |
10 | 18 | * We make no API stability guarantees about these internal functions |
| 19 | + * Split `perror` into 2 functions: |
| 20 | + * `perror` - print a message to sys.stderr |
| 21 | + * `pexcept` - print Exception message to sys.stderr. If debug is true, print exception traceback if one exists. |
| 22 | + * Removed color parameters from `poutput` and `perror` since more powerful styles now exist. See the docstrings |
| 23 | + of these methods for more information on applying styles to output messages. |
| 24 | + * Moved `cmd2.Cmd.colors` to ansi.py and renamed it to `allow_ansi`. This is now an application-wide setting. |
| 25 | + * Renamed the following constants and moved them to ansi.py |
| 26 | + * `COLORS_ALWAYS` --> `ANSI_ALWAYS` |
| 27 | + * `COLORS_NEVER` --> `ANSI_NEVER` |
| 28 | + * `COLORS_TERMINAL` --> `ANSI_TERMINAL` |
11 | 29 | * **Renamed Commands Notice** |
12 | 30 | * The following commands have been renamed. The old names will be supported until the next release. |
13 | 31 | * `load` --> `run_script` |
|
0 commit comments