From ebdaf9fe9d5f9c9e96be6189d736e28a9ff034b8 Mon Sep 17 00:00:00 2001 From: Barret Schloerke Date: Mon, 10 Mar 2025 11:18:05 -0400 Subject: [PATCH 1/3] Make `app_opts()` args into kwargs --- shiny/express/_run.py | 1 + 1 file changed, 1 insertion(+) diff --git a/shiny/express/_run.py b/shiny/express/_run.py index 83f4b91c9..aeb35766f 100644 --- a/shiny/express/_run.py +++ b/shiny/express/_run.py @@ -295,6 +295,7 @@ class AppOpts(TypedDict): @no_example() def app_opts( + *, static_assets: str | Path | Mapping[str, str | Path] | MISSING_TYPE = MISSING, debug: bool | MISSING_TYPE = MISSING, ): From d608363cfb897fa57aa3c5050242cc4e84d3373b Mon Sep 17 00:00:00 2001 From: Barret Schloerke Date: Mon, 10 Mar 2025 11:18:13 -0400 Subject: [PATCH 2/3] Update app.py --- tests/playwright/shiny/components/chat/icon/app.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/playwright/shiny/components/chat/icon/app.py b/tests/playwright/shiny/components/chat/icon/app.py index c673d87fe..035b8a539 100644 --- a/tests/playwright/shiny/components/chat/icon/app.py +++ b/tests/playwright/shiny/components/chat/icon/app.py @@ -7,7 +7,7 @@ ui.page_opts(title="Chat Icons") -app_opts({"/img": Path(__file__).parent / "img"}) +app_opts(static_assets={"/img": Path(__file__).parent / "img"}) with ui.layout_columns(): # Default Bot --------------------------------------------------------------------- From 2c1a12d179cfc8175ef6f2f7e78fa4832ffbaf9f Mon Sep 17 00:00:00 2001 From: Barret Schloerke Date: Mon, 10 Mar 2025 11:20:34 -0400 Subject: [PATCH 3/3] Update CHANGELOG.md --- CHANGELOG.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 2c2b84243..31d312614 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -9,6 +9,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ### Changes +* Express mode's `app_opts()` requires all arguments to be keyword-only. If you are using positional arguments, you will need to update your code. (#1895) + * The `.get_latest_stream_result()` method on `ui.MarkdownStream()` was deprecated in favor of the new `.latest_stream` property. Call `.result()` on the property to get the latest result, `.status` to check the status, and `.cancel()` to cancel the stream. ### Bug fixes