Conversation
|
faysou
added a commit
to faysou/anylumino
that referenced
this pull request
Sep 16, 2026
…idget - Point the uv source at the pushed fork commit so CI can sync - Import the composition helpers from released anywidget private names until manzt/anywidget#1024 lands, so installed wheels work
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
Downstream widget composition libraries need to recognize both classic AnyWidget instances and protocol-based widgets backed by
MimeBundleDescriptor. The implementation already centralizes this behavior in_try_get_model_id, but it is private, so integrations duplicate incomplete checks.This PR exposes two small public helpers:
anywidget.get_model_id(value)returns the composition model ID for classic and protocol widgets.anywidget.is_widget(value)checks whether a value implements the composition protocol.WidgetTraitand internal reference replacement now use the public resolver, while the private name remains as a compatibility alias. Tests cover protocol objects and plain values.Validation
uv sync --group devuv run pytest(84 passed)git diff --check