From 51bea5ecd6d7aa64fb310594bc5a5fc65ce902a7 Mon Sep 17 00:00:00 2001 From: Brett Cannon Date: Thu, 13 Aug 2026 12:06:23 -0700 Subject: [PATCH 1/3] [3.12] Set `--argv0` for wasmtime --- Tools/wasm/wasm_build.py | 1 + 1 file changed, 1 insertion(+) diff --git a/Tools/wasm/wasm_build.py b/Tools/wasm/wasm_build.py index f6e262965665510..6582b570a816b54 100755 --- a/Tools/wasm/wasm_build.py +++ b/Tools/wasm/wasm_build.py @@ -318,6 +318,7 @@ def _check_wasi(): "wasmtime run " "--wasm max-wasm-stack=8388608 " "--wasi preview2 " + "--argv0 /{relbuilddir}/python.wasm " "--dir {srcdir}::/ " "--env PYTHONPATH=/{relbuilddir}/build/lib.wasi-wasm32-{version}:/Lib" ), From 77c6b4178a966eb0e3577853244b4727fd63de8a Mon Sep 17 00:00:00 2001 From: Brett Cannon Date: Thu, 13 Aug 2026 12:57:48 -0700 Subject: [PATCH 2/3] Add a news entry --- .../next/Build/2026-08-13-12-57-27.gh-issue-155757._5cg0h.rst | 3 +++ 1 file changed, 3 insertions(+) create mode 100644 Misc/NEWS.d/next/Build/2026-08-13-12-57-27.gh-issue-155757._5cg0h.rst diff --git a/Misc/NEWS.d/next/Build/2026-08-13-12-57-27.gh-issue-155757._5cg0h.rst b/Misc/NEWS.d/next/Build/2026-08-13-12-57-27.gh-issue-155757._5cg0h.rst new file mode 100644 index 000000000000000..2aec7f28d24f1a1 --- /dev/null +++ b/Misc/NEWS.d/next/Build/2026-08-13-12-57-27.gh-issue-155757._5cg0h.rst @@ -0,0 +1,3 @@ +Set the `--argv0` argument to wasmtime for WASI builds so the test suite +passes. Otherwise the calculated paths to the stdlib for frozen modules is +incorrect. From f24101814dbbf7cb06672741580986d93cf85550 Mon Sep 17 00:00:00 2001 From: Brett Cannon Date: Thu, 13 Aug 2026 13:02:02 -0700 Subject: [PATCH 3/3] Fix markdown formatting in news entry --- .../next/Build/2026-08-13-12-57-27.gh-issue-155757._5cg0h.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Misc/NEWS.d/next/Build/2026-08-13-12-57-27.gh-issue-155757._5cg0h.rst b/Misc/NEWS.d/next/Build/2026-08-13-12-57-27.gh-issue-155757._5cg0h.rst index 2aec7f28d24f1a1..5113bc93d937015 100644 --- a/Misc/NEWS.d/next/Build/2026-08-13-12-57-27.gh-issue-155757._5cg0h.rst +++ b/Misc/NEWS.d/next/Build/2026-08-13-12-57-27.gh-issue-155757._5cg0h.rst @@ -1,3 +1,3 @@ -Set the `--argv0` argument to wasmtime for WASI builds so the test suite +Set the ``--argv0`` argument to wasmtime for WASI builds so the test suite passes. Otherwise the calculated paths to the stdlib for frozen modules is incorrect.