Skip to content

Upgrading rich 7 to 8

Review needed7.1.0 → 8.0.0New4Changed3Fixed2

Review neededUpgrade verdict

3 behavior changes.

  • 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.
Nothing to change

No breaking, platform, security or deprecated items in this range.

Nothing in this upgrade needs a code or configuration change.

Generated by DepDelta from published Python source. Not mixed with prose notes.

  • changed: method Console.print_exception(*, width: Optional[int]=…, extra_lines: int=…, theme: Optional[str]=…, word_wrap: bool=…) -> None → method Console.print_exception(*, width: Optional[int]=…, extra_lines: int=…, theme: Optional[str]=…, word_wrap: bool=…, show_locals: bool=…) -> None
  • added: class ThemeContext
  • added: constructor ThemeContext(console: Console, theme: Theme, inherit: bool=…) -> None
  • added: field ConsoleThreadLocals.theme_stack: ThemeStack
  • added: method Console.bell() -> None
  • added: method Console.pop_theme() -> None
  • added: method Console.push_theme(theme: Theme, *, inherit: bool=…) -> None
  • added: method Console.use_theme(theme: Theme, *, inherit: bool=…) -> ThemeContext
  • added: class Node
  • added: field Node.children: Optional[List[Node]]
  • added: field Node.close_brace: str
  • added: field Node.empty: str
  • added: field Node.is_tuple: bool
  • added: field Node.key_repr: str
  • added: field Node.last: bool
  • added: field Node.open_brace: str
  • added: field Node.value_repr: str
  • added: function traverse(_object: Any) -> Node
  • added: method Node.check_length(start_length: int, max_length: int) -> bool
  • added: method Node.iter_tokens() -> Iterable[str]
  • added: method Node.render(max_width: int=…, indent_size: int=…, expand_all: bool=…) -> str
  • removed: static method Style.empty() -> Style
  • added: static method Style.null() -> Style
  • added: variable NULL_STYLE
  • added: class ThemeStack
  • added: class ThemeStackError(Exception)
  • added: constructor ThemeStack(theme: Theme) -> None
  • added: field Theme.styles: Dict[str, Style]
  • added: method ThemeStack.pop_theme() -> None
  • added: method ThemeStack.push_theme(theme: Theme, inherit: bool=…) -> None
  • removed: variable tb
  • changed: constructor Traceback(trace: Trace=…, width: Optional[int]=…, extra_lines: int=…, theme: Optional[str]=…, word_wrap: bool=…) → constructor Traceback(trace: Trace=…, width: Optional[int]=…, extra_lines: int=…, theme: Optional[str]=…, word_wrap: bool=…, show_locals: bool=…)
  • changed: function install(*, console: Console=…, width: Optional[int]=…, extra_lines: int=…, theme: Optional[str]=…, word_wrap: bool=…) -> Callable → function install(*, console: Console=…, width: Optional[int]=…, extra_lines: int=…, theme: Optional[str]=…, word_wrap: bool=…, show_locals: bool=…) -> Callable
  • changed: static method Traceback.extract(exc_type: Type[BaseException], exc_value: BaseException, traceback: Optional[TracebackType]) -> Trace → static method Traceback.extract(exc_type: Type[BaseException], exc_value: BaseException, traceback: Optional[TracebackType], show_locals: bool=…) -> Trace
  • changed: static method Traceback.from_exception(exc_type: Type, exc_value: BaseException, traceback: Optional[TracebackType], width: Optional[int]=…, extra_lines: int=…, theme: Optional[str]=…, word_wrap: bool=…) -> Traceback → static method Traceback.from_exception(exc_type: Type, exc_value: BaseException, traceback: Optional[TracebackType], width: Optional[int]=…, extra_lines: int=…, theme: Optional[str]=…, word_wrap: bool=…, show_locals: bool=…) -> Traceback
  • added: field Frame.locals: Optional[Dict[str, pretty.Node]]
  • added: function error()