From 7757a92890dbae32fcfe031d014c790d4a879174 Mon Sep 17 00:00:00 2001 From: Barret Schloerke Date: Mon, 17 Mar 2025 13:29:26 -0400 Subject: [PATCH] Revert "fix(session): Always have calling session be the parent session when making a scoped session (#1923)" This reverts commit 14b92d4e8f273560ba63a9c4e1206a7f4b0aa9e1. --- CHANGELOG.md | 3 --- shiny/session/_session.py | 5 ++--- .../shiny/bookmark/modules/test_bookmark_modules.py | 3 --- 3 files changed, 2 insertions(+), 9 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index ef6aba0b7..55638d52b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -25,9 +25,6 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 * Fixed an issue with the `.click()` method on InputActionButton controllers in `shiny.playwright.controllers` where the method would not work as expected. (#1886) -* Fixed an issue where the parent session of a nested module's session was not being set to the calling session. Now, a session who's namespace is `A-B` has a parent of `A` and grandparent of `(root)` (whereas before it would have skipped `A` and the parent would have been `(root)`). (#1923) - - ## [1.3.0] - 2025-03-03 ### New features diff --git a/shiny/session/_session.py b/shiny/session/_session.py index 9a57c5c7b..8f9b270a1 100644 --- a/shiny/session/_session.py +++ b/shiny/session/_session.py @@ -1233,9 +1233,8 @@ def is_stub_session(self) -> bool: async def close(self, code: int = 1001) -> None: await self._parent.close(code) - def make_scope(self, id: Id) -> Session: - ns = self.ns(id) - return SessionProxy(parent=self, ns=ns) + def make_scope(self, id: str) -> Session: + return self._parent.make_scope(self.ns(id)) def root_scope(self) -> Session: res = self diff --git a/tests/playwright/shiny/bookmark/modules/test_bookmark_modules.py b/tests/playwright/shiny/bookmark/modules/test_bookmark_modules.py index 9f65de347..31306d9cc 100644 --- a/tests/playwright/shiny/bookmark/modules/test_bookmark_modules.py +++ b/tests/playwright/shiny/bookmark/modules/test_bookmark_modules.py @@ -28,9 +28,6 @@ def test_bookmark_modules( mod1_key: str, ) -> None: - if "recursive" in app_name: - pytest.skip("Skip broken recursive test") - # Set environment variable before the app starts os.environ["SHINY_BOOKMARK_STORE"] = bookmark_store