Skip to content

Support ipyvue 3 and test it in CI on one Python version - #55

Merged
maartenbreddels merged 1 commit into
masterfrom
ci/ipyvue3-compat
Sep 3, 2026
Merged

Support ipyvue 3 and test it in CI on one Python version#55
maartenbreddels merged 1 commit into
masterfrom
ci/ipyvue3-compat

Conversation

@maartenbreddels

Copy link
Copy Markdown
Contributor

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: a Template(source_url='test.vue', template='') widget is left open.

ipyvue 3 only stores a Template in 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 own Template. reacton exempted every ipyvue.Template from 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 a Template that is present in ipyvue's template_registry. An unregistered one belongs to a single VueTemplate and is closed with it. Same behaviour on ipyvue 1.x, where every Template is registered. Both renderers.
  • CI: the matrix pins ipyvue<3 and ipyvuetify<3, and two include entries run Python 3.12 against >=3 for both renderers, named unit-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

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.
@maartenbreddels
maartenbreddels merged commit aea7d55 into master Sep 3, 2026
24 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant