Skip to content

wasi-python 0.1.5

Choose a tag to compare

@github-actions github-actions released this 17 Nov 14:14
· 5 commits to dev since this release
Immutable release. Only release title and notes can be modified.

0.1.5 builds Rust into the runtime: orjson, and pydantic over pydantic-core, are compiled into both binaries with native's results, though a recursive pydantic model nests at most 49 levels. pydantic's suites run in the guest; a pydantic-core panic raises PanicException, which except Exception misses, and an orjson panic ends the run. It adds pytz, rich, Faker and folium, and soupsieve 4.1.1 fixes two advisories where a hostile page could keep select() busy for minutes. Act on three changes: soupsieve treats a template and an iframe differently, some selectors match as a browser does, and your own copy of a package the runtime carries, such as pydantic or pytz, is no longer imported. It is published on GitHub and on PyPI.

New

  • orjson is built in: fast JSON from Rust. import orjson gives orjson 3.13.0, compiled from Rust into both binaries, with native orjson's bytes for dumps and loads. A panic inside orjson cannot be caught: it ends the run, or the session, with its message, as it ends a native process. Packages
  • pydantic is built in: typed models over a Rust core. import pydantic gives pydantic 2.14.3 with annotated-types 0.8.0 and typing-inspection 0.4.5 in the zip, over pydantic-core 2.50.4 compiled from Rust into both binaries. A recursive model nests at most 49 levels, and EmailStr needs email-validator, which the set does not carry. Limitations
  • Time zones through pytz. pytz 2026.6 is in the zip and reads every zone from it: localize, normalize, its zone lists and pickled times work, and pandas takes its zones, since it imports pytz whenever pytz is there. Packages
  • Terminal text with rich. rich 15.0.0, with markdown-it-py 4.3.0, mdurl 0.1.2 and Pygments 2.21.0, is in the zip: tables, panels, trees, Markdown, highlighted code and pretty values, exported as text, HTML or SVG. Displays that refresh themselves need a thread and raise RuntimeError; Progress(auto_refresh=False) works. Limitations
  • Fake data with Faker. Faker 40.54.0 is in the zip with its 110 locales. A seeded Faker gives native's values, and each call from a starting image draws afresh unless the program seeds it. Packages
  • Web maps with folium. folium 0.20.0, with branca 0.8.2 and xyzservices 2026.9.1, is in the zip: Leaflet maps as HTML pages, colour scales and tile providers. A GeoJson given a URL raises ModuleNotFoundError naming requests, which the set lacks; give it a dict or a file. Limitations

Security

  • CSS selectors no longer slow down on deeply nested pages. soupsieve moves to 4.1.1, which fixes two advisories, GHSA-mmhr-3c5m-f64f (descendant selectors on nested documents) and GHSA-8jvp-3x96-xpqw (:has()), where a small hostile page could keep select() busy for seconds to minutes. Packages
  • pydantic's hash keys can be fixed in a prepared image. In an image whose prelude imports pydantic, as make_package_snapshot()'s default does, every image may share pydantic-core's hash keys, so crafted JSON keys can keep a model that collects extra keys busy until the deadline. Validate untrusted JSON in a plain call, or from an image without pydantic. Security model

Upgrading

  • soupsieve 4.1.1 inside, from 3.0.4. A selector no longer matches inside an HTML template, and an iframe's contents are no longer a separate document. Check code that selects inside either. Packages
  • Some selectors now match as a browser does. Attributes HTML treats as case insensitive (rel, method, lang, dir) match that way; [attr=value] no longer ignores a trailing newline; :checked, :lang(), :enabled, :disabled, :in-range and :out-of-range follow the HTML specification. Read soupsieve's 4.0 to 4.1.1 notes. Packages
  • Your copy of a package the runtime carries is no longer reached. The runtime now carries orjson, pydantic, pydantic-core, annotated-types, typing-inspection, pytz, rich, markdown-it-py, mdurl, Pygments, Faker, folium, branca and xyzservices, ahead of import_path=, so yours is not imported, and import pandas loads the runtime's pytz. Remove yours, or name your module apart. The import path

For contributors

  • The runner's argument check and async plumbing have their own module. The check every entry point runs, the default pool, the registry of live calls and the exit hook moved out of the runner, and both run_asyncs now await one shared wrapper. Nothing an embedder sees changes. Your first change
  • A failing class check names every test that moved. Its message, and a gap's "fails differently" reason, now list each test that joined or left the class, so a job log is enough to re-pin it. Tests the garbage collector moves in jinja2's and fontTools' classes are named, and no longer count as passes. Two tiers of tests
  • A release's signature check no longer waits on PyPI's index page. The read-back hands the verifier the wheel's address on PyPI's file host, so a lagging index page cannot fail a published release, and a version holding any file but the release's wheel is red. The release process
  • The build compiles Rust. Rust 1.100.0 comes from Rust's own servers and every crate from crates.io, each pinned by SHA-256, and cargo builds offline; orjson's crate type is widened by recipes/patches/orjson-3.13.0/0001-the-library-is-also-an-rlib.patch. Building from source
  • The package imports its own modules by name. Every import of a sibling under src/ reads from wasi_python.x import y, and ruff refuses a relative import anywhere it lints, the guest package excepted. Nothing an embedder sees changes. Principles
  • orjson moves to PyO3 0.30 and the system allocator. Every Rust module shares one PyO3, so orjson carries recipes/patches/orjson-3.13.0/0002-pyo3-0-30.patch to build on pydantic-core's PyO3 0.30.1, and recipes/patches/orjson-3.13.0/0003-no-global-allocator.patch so its allocator no longer serves pydantic-core's aligned allocations. Building from source
  • A carried patch lets folium start without requests. recipes/patches/folium-0.20.0/0001-import-requests-where-a-url-is-fetched.patch moves folium's import requests into the one method that fetches a URL, so a map that fetches nothing needs no requests. Carrying a patch
  • A carried patch lets branca read its tables from the zip. recipes/patches/branca-0.8.2/0001-read-its-tables-as-package-data.patch reads branca's colour tables through the package's loader instead of opening paths beside its modules. Carrying a patch
  • Only Faker's own suite loads Faker's pytest plugin. The guest drivers pass -p no:faker to every other session and report one that imported Faker anyway, so no other suite pays for it. Adding a package
  • pydantic's own tests run in the sandbox. The suites of pydantic-core, pydantic, annotated-types and typing-inspection run in the guest from their sdists: a smoke group of each in every merge's run, pydantic-core's and pydantic's on Windows in the merge-grade run, and the rest in the release tier, so Rust panics are judged as they unwind. Adding a package
  • A pull request waiting for its review no longer fails its run. Until the review is written or signed again, the review and ci-status checks stay red and block the merge, but the run is not failed, so nobody is mailed. A review signed wrong still fails. release/precheck.py runs the first check before a push. Review and landing

Verify a download (gh logged in; see Verify a download):

gh attestation verify <asset> --repo ClayGendron/wasi-python \
  --signer-workflow ClayGendron/wasi-python/.github/workflows/release.yml@refs/tags/v0.1.5 \
  --source-ref refs/tags/v0.1.5 --deny-self-hosted-runners