Change8

v14.0.0

Breaking Changes
📦 richView on GitHub →
2 breaking4 features🔧 2 symbols

Summary

Rich 14.0.0 adds the `TTY_COMPATIBLE` env var, updates color‑env‑var semantics, and enhances traceback rendering with notes, exception groups, and revised indentation.

⚠️ Breaking Changes

  • An empty `NO_COLOR` environment variable is now treated as disabled, whereas previously it enabled color output. Update any scripts that relied on an empty `NO_COLOR` to explicitly unset or set to a non‑empty value.
  • An empty `FORCE_COLOR` environment variable is now treated as disabled, changing previous behavior where it forced color output. Adjust CI or terminal configurations accordingly.

Migration Steps

  1. If you relied on an empty `NO_COLOR` to enable colors, remove the variable or set it to a non‑empty value.
  2. If you relied on an empty `FORCE_COLOR` to force colors, remove the variable or set it to a non‑empty value.
  3. To retain previous CI behavior, set `TTY_COMPATIBLE=1` where ANSI output is needed without a TTY.
  4. Upgrade to Python 3.11 or later to benefit from traceback note rendering and ExceptionGroup support.

✨ New Features

  • New environment variable `TTY_COMPATIBLE=1` forces Rich to emit ANSI escape sequences even when not attached to a TTY.
  • Rich tracebacks now display notes added via `Exception.add_note` on Python 3.11+.
  • Rich tracebacks now render `ExceptionGroup` objects.
  • Exception indentation is no longer underlined in tracebacks.

🔧 Affected Symbols

ConsoleTraceback