Skip to content

Work with anyio 4.15 and plotly 7 - #1199

Merged
maartenbreddels merged 2 commits into
masterfrom
fix/anyio-lazy-submodules
Sep 3, 2026
Merged

maartenbreddels merged 2 commits into
masterfrom
fix/anyio-lazy-submodules

Conversation

@maartenbreddels

@maartenbreddels maartenbreddels commented Sep 3, 2026 •

Copy link
Copy Markdown
Contributor

Two dependency releases broke solara, and CI with it. Both fixes are needed for CI to pass, so they travel together (this supersedes #1200).

anyio 4.15.0 (2026-09-02)

anyio no longer exposes its submodules as eager attributes: anyio.from_thread raises AttributeError unless the submodule was imported. solara/server/starlette.py uses it in a class annotation, evaluated at import time, so the server could not start. On CI: unit-test-vue3 failing on the import and the test-install jobs timing out waiting for a server on port 8765. Fix: import anyio.from_thread and anyio.to_thread explicitly, which works on every anyio version.

$ uv run --with anyio==4.15.0 python -c "import anyio; anyio.from_thread"
AttributeError: module 'anyio' has no attribute 'from_thread'

plotly 7.0.0 (2026-08-25)

plotly removed the *_mapbox functions, deprecated since 5.24 in favour of the *_map ones. solara.express wrapped them at import time, so import solara.express failed on plotly 7, and unit-test-vue3 errored at collection. Fix: wrap whichever set the installed plotly provides, the *_mapbox ones when present and the *_map ones, which exist since 5.24. Verified: import and express_test.py on plotly 7.0.0, import on plotly 6.0.1 with both sets wrapped.

🤖 Generated with Claude Code

anyio 4.15.0 (2026-09-02) no longer exposes its submodules as eager
attributes of the anyio package: `anyio.from_thread` raises
AttributeError unless the submodule was imported. solara used it in a
class annotation in solara/server/starlette.py, evaluated at import
time, so the server could not start on the new anyio (CI: unit-test-vue3
and the test-install jobs, which wait for a server that never comes up).
Importing the submodules explicitly works on every anyio version.
@maartenbreddels maartenbreddels changed the title Import anyio.from_thread and anyio.to_thread explicitly Work with anyio 4.15 and plotly 7 Sep 3, 2026
@maartenbreddels
maartenbreddels force-pushed the fix/anyio-lazy-submodules branch from be7c772 to 0170753 Compare September 3, 2026 13:10
plotly 7.0.0 (2026-08-25) removed the *_mapbox functions, deprecated
since 5.24 in favour of the *_map ones. solara.express wrapped them at
import time, so `import solara.express` failed on plotly 7 and CI's
unit-test-vue3 job errored at collection. Wrap whichever set this plotly
provides: the *_mapbox ones when present, and the *_map ones (5.24+).
@maartenbreddels
maartenbreddels temporarily deployed to fix/anyio-lazy-submodules - solara-stable PR #1199 September 3, 2026 13:11 — with Render Destroyed
@maartenbreddels
maartenbreddels merged commit 563225d into master Sep 3, 2026
35 checks passed

This branch was successfully deployed

No deployments
fix/anyio-lazy-submodules - solara-stable PR #1199 — 8c5d9943 Deployed Sep 3, 2026 by maartenbreddels
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