[BUG] `set_props` streaming

未关闭
#4,127 1 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

维护者通常 1 天内回复

@BSd3v 已经在做这个了。

开始于 2026年11月6日。

  • #4129 来自 @BSd3v —— 未关闭

评估

难度
4/5
预计耗时
3-5 天
新手友好度
35/100
Issue 类型
缺陷
描述清晰度
基本清楚
活跃度
停滞
技术栈
flask, python, react

调研方向

Start by reproducing the issue with the example app in the report and trace how streaming callbacks deliver set_props updates to the client. Check the related open pull request #4129 for the current investigation. Done means the first set_props update reaches the client before the callback yields, with regression coverage for the reported sequence.

由索引模型根据 Issue 内容生成。

描述

bug P3 size: 1

In Dash 4.5.0:

A streaming callback does not send set_props to the client until the next yield.

Below is an example app:

from dash import LocalSharedStorage, Dash, html, dcc, Input, Output, callback, set_props, no_update
import asyncio

app = Dash(__name__,
           shared_storage=LocalSharedStorage())

app.layout = html.Div([
    html.Button(id='input', type='button', children='Click Me'),
    html.Div(id='output')
])

@callback(
    Output('output', 'id'),
    Input('input', 'n_clicks'),
    prevent_initial_call=True
)
async def update_output(value):
    set_props('output', {'children': html.Div(id='output2', children='Loading...')})
    # yield no_update
    await asyncio.sleep(1)
    set_props('output2', {'children': f'You entered: {value}'})
    yield no_update

if __name__ == '__main__':
    app.run(debug=True)
主要语言
Python
星标
24.5k
派生
2.3k
平均合并
3 天 7 小时
30 天内合并 PR
30

环境准备

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

plotly/dash 的其他 Issue

查看 plotly/dash 的全部 Issue

相似的 Issue

更多 Python Issue

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。