Conversation
reactive.lock() is deprecated (posit-dev/py-shiny#2520) and setting a value schedules a flush (posit-dev/py-shiny#2508), so the update_dashboard() example no longer takes the lock or flushes.
11 of 15 tasks
This branch was successfully deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This updates the tool-calling docs for the deprecation of
reactive.lock(). A tool now sets a reactive value directly, with no lock and no flush.Do not merge until a py-shiny release includes posit-dev/py-shiny#2508 and posit-dev/py-shiny#2520. In the released Shiny, a
set()from a background task does not schedule a flush, so this example would not update the dashboard.Summary
update_dashboard()example indocs/genai-tools.qmdcallscurrent_query.set(query)and nothing else.Review Notes
reactive.lock()orreactive.flush(). The API reference pages come from py-shiny's docstrings, and those are updated in feat(reactive): Deprecatereactive.lock()py-shiny#2520.Testing
I did not render the site. The change is a code block and a callout in one
.qmdfile.Refs posit-dev/py-shiny#698, posit-dev/py-shiny#2508, posit-dev/py-shiny#2520