[BUG] Patch.update mutates a shared mapping and rewrites earlier merges
Mantenedores costumam responder em até 1 dia
Avaliação
- Dificuldade
- 2/5
- Tempo estimado
- 1-3 horas
- Facilidade para iniciantes
- 35/100
Direção de pesquisa
Start by locating Patch.update and the code that records its merge operations; the issue provides a reproducer using a shared dictionary and to_json. Check the existing Patch tests for merge behavior, then verify that each location keeps its own amount and the input dictionary remains unchanged. Pull request #4144 is already open for this issue.
Escrita pelo modelo de indexação a partir do texto da issue.
Descrição
Patch.update uses its nonempty dictionary argument as the target for merging
keyword arguments. Reusing that dictionary for two locations in one callback
changes the value already queued for the first location.
import json
from dash import Patch
from dash._utils import to_json
common = {"currency": "USD"}
p = Patch()
p["jan"].update(common, amount=100)
p["feb"].update(common, amount=200)
print(json.dumps(json.loads(to_json(p)), indent=2))
print(common)
Expected merge values are {"currency": "USD", "amount": 100} for jan
and {"currency": "USD", "amount": 200} for feb. common should remain
{"currency": "USD"}. Both serialized merge values instead contain
"amount": 200, and common also gains "amount": 200.
The same callback was exercised in a running Dash app with a dcc.Store and
Chrome. Its actual Store data had amounts 200/200 instead of 100/200. Existing
fields at each location were retained. Distinct dictionary arguments and
keyword-only calls produced the expected 100/200 values.
The native diagnostic run is
https://github.com/peterolkhov/dash/actions/runs/43130587651/job/130893438856.
It checks the actual public producer and running browser, with two ordinary
assertion failures for the shared mapping and four passing controls.
Environment: unchanged Dash dev commit
b5a33c5b9191bef976e352b9feca14eaf93c9b7a, Dash 4.5.0, Python 3.12.16,
Node 24.22.2, Selenium 4.51.0, Chrome/ChromeDriver 157.0.8103.78, and Ubuntu
on a standard GitHub-hosted runner. The full npm run build completed first.
AI assistance was used to investigate and prepare this report. The observed
results above come from the linked native run.
- Linguagem predominante
- Python
- Estrelas
- 24.5k
- Forks
- 2.3k
- Merge médio
- 3d 7h
- PRs com merge (30d)
- 30
Preparar o ambiente
- Sem Dockerfile nem arquivo Docker Compose
- Tem um modelo de pull request
- Ler o guia de contribuição
Primeiros passos
- Leia a issue inteira e depois o guia de contribuição do projeto.
- Comente na issue dizendo que vai assumir — evita que duas pessoas façam o mesmo trabalho.
- Faça um fork do repositório e trabalhe em uma branch.
- Abra um pull request que referencie o número da issue.
Mais de plotly/dash
-
P2 plotly-internal size: 1 task
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 78/100
Mantenedores costumam responder em até 1 dia
-
Extract graph schema validation into properly named testTalvez já em andamento @Nice6042 assumiu há 90 dias. Abertagood first issue P3 size: 1 task
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 68/100
plotly/dash#3735 · 3 comentários ·
Mantenedores costumam responder em até 1 dia
-
[BUG] dcc.Dropdown: virtualized list keeps the height measured at opening when options grow while the menu is openTalvez já em andamento @KoolADE85 assumiu há 2 dias. Abertabug P3 size: 1
plotly/dash#4131 · 1 comentário · 1 responsável ·
Mantenedores costumam responder em até 1 dia
-
[BUG] `set_props` streamingTalvez já em andamento @BSd3v assumiu há 5 dias. Abertabug P3 size: 1
Dificuldade 4/5 3-5 dias Facilidade para iniciantes 35/100
plotly/dash#4127 · 1 comentário ·
Mantenedores costumam responder em até 1 dia
-
[BUG] dcc.Upload contents and dcc.Geolocation position docstrings describe the wrong value formatTalvez já em andamento @ZainnQureshii assumiu há 5 dias. Abertabug P3 size: 1
Dificuldade 1/5 Menos de uma hora Facilidade para iniciantes 30/100
Mantenedores costumam responder em até 1 dia
Todas as issues de plotly/dash
Issues semelhantes
-
[BUG] HTTP lifecycle dispatch treats a NO_PROXY-only environment as corporate egress and skips the resolve-and-pinned sessionTalvez já em andamento @bodapatisaikrishna assumiu hoje. Aberta
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 76/100
Mantenedores costumam responder em até 1 dia
-
[integration]: NoMacSandboxAbertaexternal
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 65/100
langchain-ai/docs#7652 ·
Mantenedores costumam responder em até 1 dia
-
[oblt-aw][autodoc] Document new e2e-secret-leak-artifacts workflow and update e2e-all leaf listAberta
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 79/100
elastic/oblt-aw#2513 · 1 comentário ·
Mantenedores costumam responder em até 1 dia
-
bug p2
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 85/100
amd/gaia#7326 · 1 comentário ·
Mantenedores costumam responder em até 1 dia
-
enhancement
Dificuldade 1/5 Menos de uma hora Facilidade para iniciantes 75/100
NCAR/CLM-Tutorial#113 · 1 comentário ·
Mantenedores costumam responder em até 1 dia