From 607634116c0d680544018a102789138fd6d49dd0 Mon Sep 17 00:00:00 2001 From: Will McGugan Date: Thu, 22 Jan 2026 16:19:44 +0000 Subject: [PATCH 1/2] restore locals --- CHANGELOG.md | 3 ++- rich/traceback.py | 2 -- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 13ef9279ab..cdf5bc6a1f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,7 +5,7 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). -## [14.3.0] +## Unreleased ### Added @@ -15,6 +15,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ### Changed - `cells.cell_len` now has a `unicode_version` parameter (that you probably should never change) https://github.com/Textualize/rich/pull/3930 +- Restore showing functions and classes in locals ## [14.2.0] - 2025-10-09 diff --git a/rich/traceback.py b/rich/traceback.py index c32baaca12..e67748409f 100644 --- a/rich/traceback.py +++ b/rich/traceback.py @@ -1,4 +1,3 @@ -import inspect import linecache import os import sys @@ -562,7 +561,6 @@ def get_locals( max_string=locals_max_string, ) for key, value in get_locals(frame_summary.f_locals.items()) - if not (inspect.isfunction(value) or inspect.isclass(value)) } if show_locals else None From 38cdd3634ca9963bfd9bf73b86d1c70efc1cd99f Mon Sep 17 00:00:00 2001 From: Will McGugan Date: Thu, 22 Jan 2026 16:22:37 +0000 Subject: [PATCH 2/2] changelog --- CHANGELOG.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index cdf5bc6a1f..f78897da61 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -15,7 +15,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ### Changed - `cells.cell_len` now has a `unicode_version` parameter (that you probably should never change) https://github.com/Textualize/rich/pull/3930 -- Restore showing functions and classes in locals +- Restore showing functions and classes in locals https://github.com/Textualize/rich/pull/3933 ## [14.2.0] - 2025-10-09