diff --git a/.github/workflows/testing.yml b/.github/workflows/testing.yml index d22ea01902..1fc0df1845 100644 --- a/.github/workflows/testing.yml +++ b/.github/workflows/testing.yml @@ -34,6 +34,8 @@ jobs: - 'dash/dash-renderer/**' - 'dash/_callback.py' - 'dash/_callback_context.py' + - 'tests/background_callback/**' + - 'tests/async_tests/**' - 'requirements/**' build: @@ -263,6 +265,10 @@ jobs: cd bgtests touch __init__.py pytest --headless --nopercyfinalize tests/background_callback -v -s + + - name: Run Async Callback Tests + run: | + cd bgtests pytest --headless --nopercyfinalize tests/async_tests -v -s table-unit: diff --git a/CHANGELOG.md b/CHANGELOG.md index a38a4a2c4e..725a461fa9 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,10 @@ All notable changes to `dash` will be documented in this file. This project adheres to [Semantic Versioning](https://semver.org/). +# [3.1.1] - 2025-06-29 + +## Fixed +[#3351](https://github.com/plotly/dash/pull/3351) Fix multi-page app with `suppress_callback_exceptions=True` ## [3.1.0] - 2025-06-27 @@ -20,6 +24,7 @@ This project adheres to [Semantic Versioning](https://semver.org/). - [#3294](https://github.com/plotly/dash/pull/3294) Added the ability to pass `allow_optional` to Input and State to allow callbacks to work even if these components are not in the dash layout. - [#3077](https://github.com/plotly/dash/pull/3077) Add new parameter `assets_path_ignore` to `dash.Dash()`. Closes [#3076](https://github.com/plotly/dash/issues/3076) - [#3202](https://github.com/plotly/dash/pull/3202) expose the closeOnSelect option in dropdown component +- [#3089](https://github.com/plotly/dash/pull/3089) adding support for async callbacks and page layouts, install with `pip install dash[async]`. ## Changed diff --git a/dash/dash.py b/dash/dash.py index e7b194705e..cf6d0f43f1 100644 --- a/dash/dash.py +++ b/dash/dash.py @@ -2491,9 +2491,9 @@ def update(pathname_, search_, **states): _validate.check_for_duplicate_pathnames(_pages.PAGE_REGISTRY) _validate.validate_registry(_pages.PAGE_REGISTRY) - # Set validation_layout - if not self.config.suppress_callback_exceptions: - layout = self.layout + # Set validation_layout + if not self.config.suppress_callback_exceptions: + layout = self.layout if not isinstance(layout, list): layout = [ # pylint: disable=not-callable diff --git a/dash/version.py b/dash/version.py index f5f41e567e..d539d50ceb 100644 --- a/dash/version.py +++ b/dash/version.py @@ -1 +1 @@ -__version__ = "3.1.0" +__version__ = "3.1.1" diff --git a/tests/async_tests/test_async_callbacks.py b/tests/async_tests/test_async_callbacks.py index 8b7d5e5416..8ad200f51b 100644 --- a/tests/async_tests/test_async_callbacks.py +++ b/tests/async_tests/test_async_callbacks.py @@ -1,6 +1,8 @@ import json import time +import flaky + from multiprocessing import Lock, Value import pytest @@ -27,6 +29,7 @@ from tests.utils import is_dash_async +@flaky.flaky(max_runs=3) def test_async_cbsc001_simple_callback(dash_duo): if not is_dash_async(): return