All notable changes to this project will be documented in this file.
The format is based on Keep a Changelog, and this project adheres to Semantic Versioning.
- Progress download column now displays decimal units
- Support for Python 3.9
- Added legacy_windows to ConsoleOptions
- Added ascii_only to ConsoleOptions
- Added box.SQUARE_DOUBLE_HEAD
- Added highlighting of EUI-48 and EUI-64 (MAC addresses)
- Added Console.pager
- Added Console.out
- Added binary_units in progress download column
- Added Progress.reset
- Added Style.background_style property
- Added Bar renderable Textualize#361
- Dropped box.get_safe_box function in favor of Box.substitute
- Changed default padding in Panel from 0 to (0, 1) Textualize#385
- Table with row_styles will extend background color between cells if the box has no vertical dividerhttps://github.com/Textualize/issues/383
- Changed default of fit kwarg in render_group() from False to True
- Renamed rich.bar to rich.progress_bar, and Bar class to ProgressBar, rich.bar is now the new solid bar class
- Fixed typo in
Style.transparent_background
method name.
### Added
- Added Console.bell method
- Added Set to types that Console.print will automatically pretty print
- Added show_locals to Traceback
- Added theme stack mechanism, see Console.push_theme and Console.pop_theme
- Changed Style.empty to Style.null to better reflect what it does
- Optimized combining styles involving a null style
- Change error messages in Style.parse to read better
- Fixed Table.__rich_measure__
- Fixed incorrect calculation of fixed width columns
- Added Console.begin_capture, Console.end_capture and Console.capture
- Added Table.title_justify and Table.caption_justify Textualize#301
### Changed
- Improved formatting of exceptions
- Enabled Rich exceptions in logging https://github.com/taliraj
- UTF-8 encoding is now mentioned in HTML head section
- Removed line_numbers argument from traceback.install, which was undocumented and did nothing
- New ansi_dark and ansi_light themes
- Added Text.append_tokens for fast appending of string + Style pairs
- Added Text.remove_suffix
- Added Text.append_tokens
### Changed
- Text.tabs_to_spaces was renamed to Text.expand_tabs, which works in place rather than returning a new instance
- Renamed Column.index to Column._index
- Optimized Style.combine and Style.chain
- Optimized text rendering by fixing internal cache mechanism
- Optimized hash generation for Styles
- Added inline code highlighting to Markdown
- Added ipv4 and ipv6 to ReprHighlighter
- The
#
sign is included in url highlighting
- Fixed force-color switch in rich.syntax and rich.markdown commands
- Restored "def" in inspect signature
- New inspect module
- Added os._Environ to pretty print
- Prevented recursive renderables from getting stuck
- force_terminal and force_jupyter can now be used to force the disabled state, or left as None to auto-detect.
- Panel now expands to fit title if supplied
- Fixed use of
__rich__
cast
- New algorithm to pretty print which fits more on a line if possible
- Deprecated
character
parameter in Rule and Console.rule, in favor ofcharacters
- Optimized Syntax.from_path to avoid searching all lexers, which also speeds up tracebacks
- Added soft_wrap flag to Console.print
- Fixed underscore with display hook Textualize#235
- Added crop argument to Console.print
- Added "ignore" overflow method
- Added multiple characters per rule @hedythedev Textualize#207
- Further optimized pretty printing ~5X.
- Optimized pretty printing ~3X faster
- Added Text.cell_len
- Added helpful message regarding unicode decoding errors Textualize#212
- Added display hook with pretty.install()
- Fixed deprecation warnings re backslash Textualize#210
- Fixed repr highlighting of scientific notation, e.g. 1e100
- Implemented pretty printing, and removed pprintpp from dependencies
- Optimized Text.join
- Change to console markup syntax to not parse Python structures as markup, i.e.
[1,2,3]
is treated as a literal, not a tag. - Standard color numbers syntax has changed to
"color(<number>)"
so that[5]
(for example) is considered a literal. - Markup escape method has changed from double brackets to preceding with a backslash, so
foo[[]]
would befoo\[bar]
- Added thread to automatically call update() in progress.track(). Replacing previous adaptive algorithm.
- Second attempt at working around https://bugs.python.org/issue37871
- Added show_time and show_level parameters to RichHandler Textualize#182
- Fixed progress.track iterator exiting early Textualize#189
- Added workaround for Python bug https://bugs.python.org/issue37871, fixing Textualize#186
- Set overflow=fold for log messages Textualize#190
- Fixed missing new lines Textualize#178
- Fixed Progress.track Textualize#184
- Remove control codes from exported text Textualize#181
- Implemented auto-detection and color rendition of 16-color mode
- Optimized progress.track for very quick iterations
- Force default size of 80x25 if get_terminal_size reports size of 0,0
Major version bump for a breaking change to Text.stylize signature
, which corrects a minor but irritating API wart. The style now comes first and the start
and end
offsets default to the entire text. This allows for text.stylize_all(style)
to be replaced with text.stylize(style)
. The start
and end
offsets now support negative indexing, so text.stylize("bold", -1)
makes the last character bold.
- Added markup switch to RichHandler Textualize#171
- Change signature of Text.stylize to accept style first
- Remove Text.stylize_all which is no longer necessary
- Fixed rendering of Confirm prompt Textualize#170
- Fixed incorrect default of expand in Table.grid
- Added stream parameter to Console.input
- Added password parameter to Console.input
- Added description parameter to Progress.update
- Added rich.prompt
- Added detecting 'dumb' terminals
- Added Text.styled alternative constructor
- Fixed progress bars so that they are readable when color is disabled
- Optimized Text.pad
- Added rich.scope
- Change log_locals to use scope.render_scope
- Added title parameter to Columns
- box.ASCII_DOUBLE_HEAD
- Removed replace of -- --- ... from Markdown, as it made it impossible to include CLI info
- Added title and title_align options to Panel
- Added pad and width parameters to Align
- Added end parameter to Rule
- Added Text.pad and Text.align methods
- Added leading parameter to Table
- Added Align.left Align.center Align.right shortcuts
- Added Panel.fit shortcut
- Added align parameter to Columns
- Align class now pads to the right, like Text
- ipywidgets added as an optional dependency
- Issue with Panel and background color
- Fixed missing
__bool__
on Segment
- Added
border_style
argument to Panel (note,style
now applies to interior of the panel)
- Progress bars now work in Jupyter
- Added refresh_per_second to progress.track
- Added styles to BarColumn and progress.track
- Fixed Windows version number require for truecolor
- More precise detection of Windows console Textualize#140
- Fixed edge case with wrapped and overflowed text
- New algorithm for compressing table that priorities smaller columns
- Added safe_box parameter to Console constructor
### Added
- Added rich.styled.Styled class to apply styles to renderable
- Table.add_row now has an optional style parameter
- Added table_movie.py to examples
- Modified box options to use half line characters at edges
- Non no_wrap columns will now shrink below minimum width if table is compressed
- Added box.ASCII2
- Added markup argument to logging extra
- Setting a non-None width now implies expand=True
- Enabled supported box chars for legacy Windows, and introduce
safe_box
flag - Disable hyperlinks on legacy Windows
- Constructors for Rule and Panel now have keyword only arguments (reason for major version bump)
- Table.add_colum added keyword only arguments
- Fixed Table measure
- Disabled legacy_windows if jupyter is detected Textualize#125
- Fixed highlighting of paths / filenames
- Corrected docs for RichHandler which erroneously said default console writes to stderr
- Allowed
style
parameter forhighlight_regex
to be a callable that returns a style
- Added optional highlighter parameter to RichHandler
- Store a "link id" on Style instance, so links containing different styles are highlighted together. (Textualize#123)
- Fixed justify of tables (Textualize#117)
- Added enable_link_path to RichHandler
- Added legacy_windows switch to Console constructor
- Fixed console.log hyperlink not containing full path
- Used random number for hyperlink id
- Exposed RichHandler highlighter as a class var
- Linked path in log render to file
- Added redirect_stdout and redirect_stderr to Progress
- printing to console with an active Progress doesn't break visuals
- Added 'transient' option to Progress
### Changed
- Truncated overly long text in Rule with ellipsis overflow
- Added expand option to Padding
- Some minor optimizations in Text
- Fixed broken rule with CJK text
- Added overflow methods
- Added no_wrap option to print()
- Added width option to print
- Improved handling of compressed tables
- Fixed erroneous space at end of log
- Fixed erroneous space at end of progress bar
- Renamed _ratio.ratio_divide to _ratio.ratio_distribute
- Renamed JustifyValues to JustifyMethod (backwards incompatible)
- Optimized _trim_spans
- Enforced keyword args in Console / Text interfaces (backwards incompatible)
- Return self from text.append
- Changed defaults of Table.grid
- Polished listdir.py example
- Added width argument to Columns
- Fixed for
columns_first
argument in Columns - Fixed incorrect padding in columns with fixed width
- Added rich.get_console() function to get global console instance.
- Added Columns class
- Updated
markdown.Heading.create()
to work with subclassing. - Console now transparently works with Jupyter
- Fixed issue with broken table with show_edge=False and a non-None box arg
- Added
padding
parameter to Panel - Added 'indeterminate' state when progress bars aren't started
- Fixed Progress deadlock Textualize#90
- Auto-detect "truecolor" color system when in Windows Terminal
- Issue with right aligned wrapped text adding extra spaces
- Issue with sum and Style
- Support for double underline, framed, encircled, and overlined attributes
- Optimized Style
- Changed methods
__console__
to__rich_console__
, and__measure__
to__rich_measure__
- Exception when BarColumn.bar_width == None
- Optimizations for Segment, Console and Table
### Added
- Added Console.clear method
- Added exporting of links to HTML
- Added collapse_padding option to Table.
- Some style attributes may be abbreviated (b for bold, i for italic etc). Previously abbreviations worked in console markup but only one at a time, i.e. "[b]Hello[/]" but not "[b i]Hello[/]" -- now they work everywhere.
- Renamed 'text' property on Text to 'plain'. i.e. text.plain returns a string version of the Text instance.
- Fixed zero division if total is 0 in progress bar
### Added
- Added rich.align.Align class
- Added justify argument to Console.print and console.log
- Changed progress bars to write to stdout on terminal and hide on non-terminal
- Fixed incorrect file and link in progress.log
- Fixes for legacy windows: Bar, Panel, and Rule now use ASCII characters
- show_cursor is now a no-op on legacy windows
### Added
- Added Console.input
- Disable progress bars when not writing to a terminal
- Issue with progress of one line`
- Added -p switch to python -m rich.markdown to page output
- Added Console.control to output control codes
- Changed Console log_time_format to no longer require a space at the end
- Added print and log to Progress to render terminal output when progress is active
- Stripped cursor moving control codes from text
- Added hyperlinks to Style and markup
- Added justify and code theme switches to markdown command
- Added
python -m rich.syntax
command
- Issue with Windows legacy support Textualize#59
- Applied console markup after highlighting
- Documented highlighting
- Changed Markup parser to handle overlapping styles
- Relaxed dependency on colorama
- Allowed Theme to accept values as style definitions (str) as well as Style instances
- Added a panel to emphasize code in Markdown
- Added markup.escape
- Added
python -m rich.theme
command - Added
python -m rich.markdown
command - Added rendering of images in Readme (links only)
- Fixed Text.assemble not working with strings Textualize#57
- Fixed table when column widths must be compressed to fit
- Improvements to repr highlighter to highlight URLs
- Fixed incorrect markdown rendering for quotes and changed style
- Removed debug print from rich.progress
- Added Table.show_lines to render lines between rows
- Added markup escape with double square brackets
- Fix row_styles applying to header
- Added force_terminal option to
Console.__init__
- Added Table.row_styles to enable zebra striping.
- Fixed background in Syntax
- Broken wrapping of long lines
- Fixed wrapping in Syntax
- Added word_wrap option to Syntax, which defaults to False.
- Added word_wrap option to Traceback.
- Experimental Jupyter notebook support: from rich.jupyter import print
- Smarter number parsing regex for repr highlighter
- uuid highlighter for repr
- Added 'test card', run python -m rich
- Detected windows terminal, defaulting to colorama support
- Fixed table scaling issue
- CJK right align
- Fixed issue with 0 speed resulting in zero division error
- Changed signature of Progress.update
- Made calling start() a second time a no-op
- Added progress.DownloadColumn
- CJK support
- Console level highlight flag
- Added encoding argument to Syntax.from_path
- Dropped support for Windows command prompt (try https://www.microsoft.com/en-gb/p/windows-terminal-preview/)
- Added task_id to Progress.track
- KeyError for missing pygments style
- Issue with control codes being used in length calculation
- Remove current_style concept, which wasn't really used and was problematic for concurrency
- Added width option to Panel
- Change special method
__render_width__
to__measure__
- Dropped the "markdown style" syntax in console markup
- Optimized style rendering
- Added Console.show_cursor method
- Added Progress bars
- Fixed wrapping when a single word was too large to fit in a line
- Added tab_size to Console and Text
- Added protocol.is_renderable for runtime check
- Added emoji switch to Console
- Added inherit boolean to Theme
- Made Console thread safe, with a thread local buffer
- Console.markup attribute now effects Table
- SeparatedConsoleRenderable and RichCast types
- Fixed tabs breaking rendering by converting to spaces
- Replaced
__console_str__
with__rich__
- Readme links in Pypi
- Added Traceback rendering and handler
- Added rich.constrain
- Added rich.rule
- Fixed unnecessary padding
- Fixed Windows color support
- Fixed line width on windows issue (Textualize#7)
- Fixed Pretty print on Windows
- Added rich.logging
- Added colorama for Windows support
- First official release, API still to be stabilized