Support ipyvue 3 and test it in CI on one Python version - #55
Merged
Conversation
ipyvue 3.0.0 only puts a Template widget in its per-file template_registry when there is a real comm. Without a kernel (tests, and any DummyComm setup) every VueTemplate gets its own Template, so the widget is owned by that VueTemplate and must die with it. reacton exempted every Template from orphan cleanup by class name, which leaked a Template per render on ipyvue 3 and made test_vue_orphan_not_close fail in the cleanup_guard fixture. Ask the registry instead of the class name, so the exemption applies exactly to the templates that really are shared. This keeps ipyvue 1.x behaviour, where templates are always registered. CI now pins ipyvue/ipyvuetify below 3 for the existing matrix and adds two py3.12 jobs on the 3.x line, so both majors stay green.
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.
Why
CI installs ipyvue unpinned, and since the Vue 3 port (ipyvue 3.0.0, ipyvuetify 3.0.0) the suite fails at the teardown of
test_vue_orphan_not_close: aTemplate(source_url='test.vue', template='')widget is left open.ipyvue 3 only stores a
Templatein its per-file registry when there is a real comm (ipyvue/Template.py,get_template). Without a kernel, as in the tests, every render creates its ownTemplate. reacton exempted everyipyvue.Templatefrom orphan cleanup by class name, which was right when all of them were shared, and now leaks one per render.What
_is_shared_ipyvue_template: keep the exemption only for aTemplatethat is present in ipyvue'stemplate_registry. An unregistered one belongs to a singleVueTemplateand is closed with it. Same behaviour on ipyvue 1.x, where everyTemplateis registered. Both renderers.ipyvue<3andipyvuetify<3, and twoincludeentries run Python 3.12 against>=3for both renderers, namedunit-test-vue3 (...). The existing 14 check names are unchanged.Locally: 178 passed on Python 3.12 for ipyvue 1.12 and 3.0, both renderers.
🤖 Generated with Claude Code