Skip to content

Commit f03f2e8

Browse files
fix(deps): bump nicegui lower bound to 3.11.0 to fix download regression
NiceGUI 3.10.0 has a bug where exceptions raised in async event handlers are silently swallowed (fixed by zauberzeug/nicegui#5945, #5946). This manifested as test_gui_run_download and test_gui_run_qupath_install_to_inspect timing out at "Download completed.": the start_download() coroutine fires "Downloading ..." but crashes before the success notification, and 3.10.0's broken exception handling never surfaces the failure. 3.11.0 also makes ValueChangeEventArguments generic over its value type (zauberzeug/nicegui#5785), so update three call sites that need the new signature: - dataset/_gui.py: ValueChangeEventArguments[str | None] for the source input; coerce its .value to str when invoking _download. - application/_gui/_page_application_describe.py: parameterize on_force_change with [bool | None] and bool()-coerce e.value before assigning to SubmitForm.force. - system/_gui.py: bool()-coerce the mask_secrets switch value passed to load_info(). CVE-2026-39844 (>=3.10.0) remediation is preserved by the new lower bound. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
1 parent afef177 commit f03f2e8

5 files changed

Lines changed: 15 additions & 10 deletions

File tree

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ dependencies = [
7878
# From Template
7979
"fastapi[all,standard]>=0.123.10",
8080
"humanize>=4.14.0,<5",
81-
"nicegui[native]>=3.10.0,<4", # CVE-2026-21871, CVE-2026-21873, CVE-2026-21874 (>=3.5.0); CVE-2026-25516 (>=3.7.0, #418); CVE-2026-27156 (>=3.8.0, #448); CVE-2026-33332 (>=3.9.0, #498); CVE-2026-39844 (>=3.10.0).
81+
"nicegui[native]>=3.11.0,<4", # CVE-2026-21871, CVE-2026-21873, CVE-2026-21874 (>=3.5.0); CVE-2026-25516 (>=3.7.0, #418); CVE-2026-27156 (>=3.8.0, #448); CVE-2026-33332 (>=3.9.0, #498); CVE-2026-39844 (>=3.10.0). 3.11.0 fixes async event handler exception leaks (#5945, #5946) — without it test_gui_run_download / test_gui_run_qupath_install_to_inspect time out at "Download completed." because exceptions in the async download coroutine are silently swallowed.
8282
"packaging>=26,<27",
8383
"platformdirs>=4.5.1,<5",
8484
"psutil>=7.1.3,<8",

src/aignostics/application/_gui/_page_application_describe.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -315,7 +315,7 @@ def _add_application_version_selection_section() -> None:
315315
# Show force checkbox for internal users
316316
if user_info and user_info.is_internal_user:
317317

318-
def on_force_change(e: ValueChangeEventArguments) -> None:
318+
def on_force_change(e: ValueChangeEventArguments[bool | None]) -> None:
319319
if e.value:
320320
version_next_button.enable()
321321
if unhealthy_tooltip:
@@ -324,7 +324,7 @@ def on_force_change(e: ValueChangeEventArguments) -> None:
324324
version_next_button.disable()
325325
if unhealthy_tooltip:
326326
unhealthy_tooltip.set_visibility(True)
327-
submit_form.force = e.value
327+
submit_form.force = bool(e.value)
328328

329329
ui.checkbox("Force (skip health check)", on_change=on_force_change).mark("CHECKBOX_FORCE")
330330

src/aignostics/dataset/_gui.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,7 @@ async def page_idc() -> None: # noqa: C901, PLR0915, RUF029
8888
"""
8989
)
9090

91-
def _on_source_input_change(e: ValueChangeEventArguments) -> None:
91+
def _on_source_input_change(e: ValueChangeEventArguments[str | None]) -> None:
9292
"""On change event."""
9393
if download_form.download_button is None:
9494
return
@@ -250,7 +250,7 @@ async def _download(source: str) -> None:
250250
with ui.button("Download", icon="cloud_download").mark("BUTTON_DOWNLOAD") as download_button:
251251
ui.tooltip("Download the selected dataset")
252252
download_form.download_button = download_button
253-
download_form.download_button.on("click", lambda _: _download(source_input.value))
253+
download_form.download_button.on("click", lambda _: _download(source_input.value or ""))
254254
download_form.download_button.disable()
255255

256256
def update_progress() -> None:

src/aignostics/system/_gui.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,9 @@ async def page_system() -> None: # noqa: PLR0915
6363
# Mask secrets switch with reload functionality
6464
with ui.row().classes("w-full items-center gap-2 mb-4"):
6565
mask_secrets_switch = ui.switch(
66-
text="Mask secrets", value=True, on_change=lambda e: load_info(mask_secrets=e.value)
66+
text="Mask secrets",
67+
value=True,
68+
on_change=lambda e: load_info(mask_secrets=bool(e.value)),
6769
)
6870

6971
spinner = ui.spinner(size="lg").classes(

uv.lock

Lines changed: 7 additions & 4 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)