Repository navigation
Conversation
It already didn't follow the Shiny rendering pattern and its docstring said it was deprecated, but no warning was emitted. Now it warns with shiny's ShinyDeprecationWarning (falling back to DeprecationWarning on older shiny versions) and points users at the @render_widget pattern. Closes #127
cpsievert
marked this pull request as draft
October 20, 2026 22:26
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.
Summary
Closes #127.
register_widget()doesn't follow the Shiny rendering pattern (calling a register method inside the server body doesn't read as "this will be rendered to the UI"), and its docstring has said "Deprecated. Use @render_widget instead." for a while — but no actual warning was emitted, so users had no signal at runtime.Now it emits a deprecation warning (
ShinyDeprecationWarningfrom shiny, falling back toDeprecationWarningon older shiny versions) pointing users at the@render_widgetpattern:Changes
shinywidgets/_shinywidgets.py:register_widget()now warns on every call.tests/unit/test_widget_bootstrap.py: existingregister_widgettests assert the warning; added a dedicated deprecation test.CHANGELOG.md: new Deprecations section entry.Verification
make test-unit— 151 passed, 1 xfailedmake pyright— 0 errorsmake py-check-format— clean