From 894de559849ef81679bbcaf73b85b80f5592f899 Mon Sep 17 00:00:00 2001 From: Arthur Albuquerque <20231694+troclaux@users.noreply.github.com> Date: Sun, 10 May 2026 21:22:03 -0300 Subject: [PATCH 1/2] fix(testing): return [] instead of None from get_logs for non-Chrome browsers When running tests with non-Chrome drivers, get_logs() returned None, causing assertions like `assert dash_duo.get_logs() == []` to fail. Returning an empty list is consistent with the Chrome path, which also returns an empty list when there are no logs. --- dash/testing/browser.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/dash/testing/browser.py b/dash/testing/browser.py index bbe92dceb6..a6382c17dd 100644 --- a/dash/testing/browser.py +++ b/dash/testing/browser.py @@ -629,10 +629,10 @@ def get_logs(self): if entry["timestamp"] > self._last_ts ] warnings.warn( - "get_logs always return None with webdrivers other than Chrome", + "get_logs always return [] with webdrivers other than Chrome", stacklevel=2, ) - return None + return [] def reset_log_timestamp(self): """reset_log_timestamp only work with chrome webdriver.""" From c01f7407ea5752e96453073297be163331c044f2 Mon Sep 17 00:00:00 2001 From: philippe Date: Thu, 2 Jul 2026 09:42:59 -0400 Subject: [PATCH 2/2] docs: add CHANGELOG entry for get_logs [] fix (#3779) Co-Authored-By: Claude Opus 4.8 --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 7df690ebaf..56e4a8a53d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -8,6 +8,7 @@ This project adheres to [Semantic Versioning](https://semver.org/). - [#3826](https://github.com/plotly/dash/pull/3826) WebSocket callback dispatch no longer lets long-lived callbacks limit the number of concurrent users. Async callbacks (including session-persistent ones) run directly on the connection event loop instead of occupying a worker thread, and synchronous callbacks run on a shared `ThreadPoolExecutor` whose size is configurable via the new `websocket_max_workers` argument to `Dash` (default `4`). A synchronous persistent (no-output) callback now warns at registration since it would tie up a worker thread. ## Fixed +- [#3779](https://github.com/plotly/dash/pull/3779) Fix `dash.testing` `Browser.get_logs()` returning `None` on non-Chrome webdrivers, which broke assertions like `assert dash_duo.get_logs() == []`. It now returns `[]`, matching the Chrome code path. - [#3822](https://github.com/plotly/dash/pull/3822) Fix `UnboundLocalError` for `user_callback_output` in async background callbacks (Celery and Diskcache managers) when the callback raises `PreventUpdate` or another exception before the variable is assigned. - [#3819](https://github.com/plotly/dash/pull/3819) Fix `RuntimeError: No active request in context` when a non-Dash path falls through to the FastAPI catch-all route. Fixes [#3812](https://github.com/plotly/dash/issues/3812). - [#3838](https://github.com/plotly/dash/pull/3838) Replace `mcp` dependency with inline types.