Minor Changes
-
#2094
376466fThanks @whitphx! - Serialize dataframes through pyarrow and Arrow IPC, as Streamlit does. Pyodide 314 bundles pyarrow, so the Parquet workaround Stlite used instead (fastparquet in Python, parquet-wasm in the frontend) is gone, and the Streamlit fork no longer patches anything Arrow-related.st.dataframe,st.data_editor,st.tableand Arrow-backed charts now handle column types exactly as Streamlit does: interval and period columns, date and time objects, set and tuple values, and non-string column names keep their types instead of being converted to strings as the Parquet path did. Large dataframes are delivered lazily as in Streamlit (above 150,000 rows, or withlazy=True), which Stlite previously disabled. The frontend no longer loads the 5.5 MB parquet-wasm module; the Python runtime installs pyarrow (about 10 MB to download) instead. Booting an app no longer imports pandas, and pyarrow with it, unless the app itself does.@stlite/cloudflareno longer supports elements that send data through Arrow:st.dataframe,st.data_editor,st.table,st.writewith a dataframe, and charts such asst.line_chartandst.altair_chart. pyarrow exceeds the Cloudflare Workers script size and memory limits, so the Worker installs a stub in its place that makes these elements raise an error explaining this. Every other element works as before, and the hello sample drops its Plotting demo and shows the DataFrame demo's table as text.
Patch Changes
-
#2094
376466fThanks @whitphx! - Upgrade the browser runtime from Pyodide 0.29.3 to 314.0.3, which moves apps from Python 3.13 to Python 3.14 and brings pandas 3, NumPy 2.4, protobuf 7, matplotlib 3.10, and Pillow 12. It also picks up the upstream fix for the JSPI-related crash that multipage apps hit after many Python async calls (#1493).Packages you pin in
requirements.txtmust have wheels for the new interpreter, and code relying on pandas 2 behavior may need updating.Pyodide 314 no longer loads in classic web workers, so
@stlite/browsernow runs Python in a module worker in production builds too, as the other packages already did. Browsers without module worker support (such as Firefox before 114) can no longer run it. AworkerType: "classic"passed to@stlite/react'screateKernel()no longer works.@stlite/cloudflarestays on Pyodide's 0.29.x line (0.29.3 → 0.29.4), since the wheels it vendors have to match the Python that Cloudflare's Worker runtime executes — 3.13 on the stablepython_workersflag. To let the two lines move independently,@stlite/app-packager's vendoring entry points take an optionalpyodideModule, and@stlite/cloudflarepasses its own.
What's Changed
🏕 Updates
- test(browser): run Streamlit's upstream E2E suite against Stlite by @whitphx in #2144
- test(browser): mount the upstream E2E app's sibling files by @whitphx in #2145
- feat(deps): upgrade the browser runtime to Pyodide 314 and serialize dataframes through pyarrow by @whitphx in #2094
- feat(arrow-ipc-writer): add a pure-Python Arrow IPC stream writer by @whitphx in #2146
- Version Packages by @whitphx-changesets-bot[bot] in #2147
Full Changelog: https://github.com/whitphx/stlite/compare/@stlite/browser@1.11.0...@stlite/cloudflare@0.7.0