Skip to content

@stlite/react@1.8.2

Choose a tag to compare

@whitphx-changesets-bot whitphx-changesets-bot released this 23 Sep 06:40
· 2 commits to main since this release
7fed196

Patch Changes

  • #2125 762f6ab Thanks @whitphx! - Let Streamlit commands run from a Python callback that JS invokes outside any asyncio task, such as a pyodide.ffi.create_proxy callback fired by setTimeout or a JS library's progress callback.

    Stlite keys the ScriptRunContext off the running asyncio task, and such a callback has none, so every st.* call from it failed with AttributeError: 'NoneType' object has no attribute 'get_name'. The context now falls back to the thread object when no task is running, so the recipe Streamlit documents for worker threads, add_script_run_ctx(threading.current_thread(), ctx), works from such a callback too, whether the callback attaches the context itself or the script attached it beforehand. An async def callback runs as its own task and has to call add_script_run_ctx(ctx=ctx) inside itself.

What's Changed

🏕 Updates

  • ci: pin uv to 0.12.13 until the fork's dev lock resolves on newer uv by @whitphx in #2127
  • docs(cloudflare): link to the live demo of the hello sample by @whitphx in #2126
  • fix(deps): let Streamlit commands run from JS-invoked Python callbacks by @whitphx in #2125
  • Version Packages by @whitphx-changesets-bot[bot] in #2128

Full Changelog: https://github.com/whitphx/stlite/compare/@stlite/browser@1.9.1...@stlite/react@1.8.2