Skip to content

Commit d0f78b6

Browse files
authored
Merge pull request #3803 from plotly/version-4.2.0
Version 4.2.0
2 parents c41939b + 6c3fdab commit d0f78b6

11 files changed

Lines changed: 4295 additions & 4118 deletions

File tree

CHANGELOG.md

Lines changed: 75 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -4,45 +4,92 @@ This project adheres to [Semantic Versioning](https://semver.org/).
44

55
## [UNRELEASED]
66

7-
## Added
8-
- [#3783](https://github.com/plotly/dash/pull/3783) Add batching/debouncing for websocket `set_props` messages to reduce lag when updating multiple components in a loop. Configurable via `websocket_batch_delay` (default 5ms, set to 0 to disable).
9-
- [#3669](https://github.com/plotly/dash/pull/3669) Selection for DataTable cleared with custom action settings
10-
- [#3680](https://github.com/plotly/dash/pull/3680) Added `search_order` prop to `Dropdown` to allow users to preserve original option order during search
11-
- Added `csrf_token_name` and `csrf_header_name` config options to allow configuring the CSRF cookie and header names. Fixes [#729](https://github.com/plotly/dash/issues/729)
12-
- [#3797](https://github.com/plotly/dash/pull/3797) Improved websocket callback management.
13-
- [#3523](https://github.com/plotly/dash/pull/3523) Fall back to background callback function names if source cannot be found
14-
- [#3785](https://github.com/plotly/dash/pull/3785) Fix patch with dcc.Graph figure.
15-
- [#3785](https://github.com/plotly/dash/pull/3785) Fix dcc.Graph not sending duplicate clicks because it had the same payload by adding a timestamp in the click event object.
7+
## [4.2.0] - 2026-06-01 - *The Freedom Update*
168

17-
## Fixed
18-
- [#3690](https://github.com/plotly/dash/pull/3690) Fixes Input when min or max is set to None
19-
- [#3723](https://github.com/plotly/dash/pull/3723) Fix misaligned `dcc.Slider` marks when some labels are empty strings
20-
- [#3738](https://github.com/plotly/dash/pull/3738) Add missing `stacklevel=2` to `warnings.warn()` calls so warnings report the caller's location instead of internal Dash source lines
21-
- [#3740](https://github.com/plotly/dash/pull/3740) Fix cannot tab into dropdowns in Safari
22-
- [#2462](https://github.com/plotly/dash/issues/2462) Allow `MATCH` in `Input`/`State` when the callback's `Output` has no wildcards (fixed-id Output, no Output, or `ALL`-only wildcard Output). `ALLSMALLER` still requires a corresponding `MATCH` in an Output.
23-
- [#3768](https://github.com/plotly/dash/pull/3768) Improved `Dropdown` search performance for large options lists
24-
- [#3759](https://github.com/plotly/dash/pull/3759) Fix the issue where `Patch` objects cannot be updated via `set_props()` in `websocket` callback. Fix [#3742](https://github.com/plotly/dash/issues/3742)
25-
- [#3789](https://github.com/plotly/dash/pull/3789) Fixed extra wrapper in `DatePickerRange` and `DatePickerSingle` causing styling and layout issues.
26-
- [#3799](https://github.com/plotly/dash/pull/3799) Fixed dropdown crash when filtering large datasets with component-based labels by using stable item keys for virtualized rows.
9+
This release marks a major milestone for Dash, bringing unprecedented flexibility to how you build and deploy your applications.
2710

28-
## [4.2.0rc3] - 2026-05-12
11+
### 🚀 Multiple Backend Support
12+
Dash is no longer tied to Flask. You can now run your Dash apps on **FastAPI** or **Quart**, or even bring your own backend implementation:
2913

30-
- [#3771](https://github.com/plotly/dash/pull/3771) Add persistent callbacks and no inputs/no outputs callback support.
31-
- Rename ctx.get_websocket to ctx.websocket
14+
```python
15+
# FastAPI backend
16+
app = Dash(__name__, backend="fastapi")
3217

33-
## [4.2.0rc2] - 2026-05-01
18+
# Quart backend (async-native)
19+
app = Dash(__name__, backend="quart")
3420

35-
## Fixed
36-
- [#3759](https://github.com/plotly/dash/pull/3759) Fix the error when using `set_props()` to update component-type properties in the `websocket` callback.
37-
- Add threadpool for running websocket callbacks.
21+
# Or use an existing server
22+
from fastapi import FastAPI
23+
server = FastAPI()
24+
app = Dash(__name__, server=server)
25+
```
26+
27+
Install with `pip install dash[fastapi]` or `pip install dash[quart]`.
28+
29+
### ⚡ Websocket Callbacks
30+
Real-time, bidirectional communication is here. Websocket callbacks enable persistent connections for live updates without polling:
31+
32+
```python
33+
@callback(
34+
Output("live-output", "children"),
35+
Input("trigger", "n_clicks"),
36+
websocket=True,
37+
persistent=True
38+
)
39+
def live_updates(n_clicks):
40+
ws = ctx.websocket
41+
while True:
42+
data = fetch_live_data()
43+
ws.send(Output("live-output", "children", data))
44+
time.sleep(1)
45+
```
3846

39-
## [4.2.0rc1] - 2026-04-13
47+
### 🔓 Relaxed Pattern Matching Rules
48+
`MATCH` wildcards are now allowed in `Input` and `State` even when your `Output` has no wildcards, making dynamic UIs simpler to build:
49+
50+
```python
51+
@callback(
52+
Output("summary", "children"), # Fixed ID output
53+
Input({"type": "item", "index": MATCH}, "value") # MATCH input - now allowed!
54+
)
55+
def update_summary(value):
56+
return f"Selected: {value}"
57+
```
58+
59+
---
4060

4161
## Added
62+
- [#3783](https://github.com/plotly/dash/pull/3783) Add batching/debouncing for websocket `set_props` messages to reduce lag when updating multiple components in a loop. Configurable via `websocket_batch_delay` (default 5ms, set to 0 to disable).
63+
- [#3669](https://github.com/plotly/dash/pull/3669) Selection for DataTable cleared with custom action settings.
64+
- [#3680](https://github.com/plotly/dash/pull/3680) Added `search_order` prop to `Dropdown` to allow users to preserve original option order during search.
65+
- [#3745](https://github.com/plotly/dash/pull/3745) Added `csrf_token_name` and `csrf_header_name` config options to allow configuring the CSRF cookie and header names. Fixes [#729](https://github.com/plotly/dash/issues/729).
66+
- [#3797](https://github.com/plotly/dash/pull/3797) Improved websocket callback management with heartbeat configuration and proper reconnection handling.
67+
- [#3523](https://github.com/plotly/dash/pull/3523) Fall back to background callback function names if source cannot be found.
68+
- [#3771](https://github.com/plotly/dash/pull/3771) Add persistent callbacks and no inputs/no outputs callback support.
4269
- [#3742](https://github.com/plotly/dash/pull/3742) Add websocket callbacks to fastapi and quart backends.
70+
- [#3737](https://github.com/plotly/dash/pull/3737) Add `displayNotifier` to `dcc.Graph` config props.
4371

4472
## Changed
45-
- [#3691] Improve static typing for `dash.callback` by preserving wrapped callback signatures, and add callback typing coverage in compliance plus new callback decorator unit and integration tests.
73+
- [#3746](https://github.com/plotly/dash/pull/3746) Improve static typing for `dash.callback` by preserving wrapped callback signatures, and add callback typing coverage in compliance plus new callback decorator unit and integration tests. Fixes [#3691](https://github.com/plotly/dash/issues/3691).
74+
- Rename `ctx.get_websocket` to `ctx.websocket`.
75+
- Add threadpool for running websocket callbacks.
76+
77+
## Fixed
78+
- [#3690](https://github.com/plotly/dash/pull/3690) Fix `dcc.Input` when min or max is set to None.
79+
- [#3723](https://github.com/plotly/dash/pull/3723) Fix misaligned `dcc.Slider` marks when some labels are empty strings.
80+
- [#3738](https://github.com/plotly/dash/pull/3738) Add missing `stacklevel=2` to `warnings.warn()` calls so warnings report the caller's location instead of internal Dash source lines.
81+
- [#3740](https://github.com/plotly/dash/pull/3740) Fix cannot tab into dropdowns in Safari.
82+
- [#3756](https://github.com/plotly/dash/pull/3756) Allow `MATCH` in `Input`/`State` when the callback's `Output` has no wildcards (fixed-id Output, no Output, or `ALL`-only wildcard Output). `ALLSMALLER` still requires a corresponding `MATCH` in an Output. Fixes [#2462](https://github.com/plotly/dash/issues/2462).
83+
- [#3768](https://github.com/plotly/dash/pull/3768) Improved `Dropdown` search performance for large options lists.
84+
- [#3759](https://github.com/plotly/dash/pull/3759) Fix the issue where `Patch` objects cannot be updated via `set_props()` in `websocket` callback. Fix [#3742](https://github.com/plotly/dash/issues/3742).
85+
- [#3789](https://github.com/plotly/dash/pull/3789) Fixed extra wrapper in `DatePickerRange` and `DatePickerSingle` causing styling and layout issues.
86+
- [#3799](https://github.com/plotly/dash/pull/3799) Fixed dropdown crash when filtering large datasets with component-based labels by using stable item keys for virtualized rows.
87+
- [#3785](https://github.com/plotly/dash/pull/3785) Fix patch with `dcc.Graph` figure. Fix `dcc.Graph` not sending duplicate clicks because it had the same payload by adding a timestamp in the click event object.
88+
- [#3798](https://github.com/plotly/dash/pull/3798) Fix blueprint registering and double init when using `flask run` command. Fixes [#3787](https://github.com/plotly/dash/issues/3787).
89+
- [#3734](https://github.com/plotly/dash/pull/3734) Fix websocket used in the same FastAPI server. Fixes [#3636](https://github.com/plotly/dash/issues/3636).
90+
- [#3668](https://github.com/plotly/dash/pull/3668) Fix FastAPI url paths order. Fixes [#3667](https://github.com/plotly/dash/issues/3667).
91+
- [#3641](https://github.com/plotly/dash/pull/3641) Fix `dcc.Loading` spinner not triggering when callback `Output` uses the `ALL` wildcard. Fixes [#3619](https://github.com/plotly/dash/issues/3619).
92+
- [#3570](https://github.com/plotly/dash/pull/3570) Fix components not remounting when passed from a parent object. Fixes [#3330](https://github.com/plotly/dash/issues/3330).
4693

4794
## [4.1.0] - 2026-03-23
4895

@@ -59,13 +106,6 @@ This project adheres to [Semantic Versioning](https://semver.org/).
59106
- [#3609](https://github.com/plotly/dash/pull/3609) Add backward compat alias for _Wildcard
60107
- [#3672](https://github.com/plotly/dash/pull/3672) Improve browser performance when app contains a large number of pattern matching callback callbacks. Exposes an api endpoint to fetch the latest computeGraph call.
61108

62-
# [4.2.0rc0] - 2026-04-13
63-
64-
## Fixed
65-
66-
- Fix websocket used in the same FastAPI server. Fix [#3636](https://github.com/plotly/dash/issues/3636)
67-
- Fix FastAPI url paths order. Fix [3667](https://github.com/plotly/dash/issues/3667)
68-
69109
# [4.1.0rc0] - 2026-02-23
70110

71111
## Added

0 commit comments

Comments
 (0)