Repository navigation
browseros: libc のヘッダーの値が Linux になった python.wasm の ABI の版を上げる - #2
Draft
steelydylan wants to merge 7 commits into
Draft
steelydylan wants to merge 7 commits into
steelydylan wants to merge 7 commits into
Conversation
1 本の版を abi3、スレッド版を abi4 にする。libc の errno・O_*・時計の番号などが Linux の値になり、前の libc で 組んだ拡張とは値が食い違うので、pip が前の wheel を選ばないようにする。
wasm32-unknown-linux-musl の的では __wasi__ が定義されず、call trampoline の マクロが直接呼び出しの fallback に落ちていた。call_indirect の型照合は wasm の仕様なので、OS 層(wasi か linux-musl か)と関係なく wasm の的すべてで有効 にする。
…wn の setsid・setpgroup で渡す jupyter_client はカーネルを start_new_session=True で起こす(サーバーに届いた SIGINT をカーネルへ漏らさないため)。 BrowserOS の libc の posix_spawn は POSIX_SPAWN_SETSID・POSIX_SPAWN_SETPGROUP を持ち、カーネルの setsid・setpgid も 本物なので、_posixsubprocess が子で setsid() / setpgid() を呼ぶのと同じ結果を posix_spawn の属性で作る。 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
browseros: subprocess の start_new_session と process_group を posix_spawn の setsid・setpgroup で渡す
3.13 の methodcaller_clear は void を返すのに Py_tp_clear(inquiry)に入っていた。 WebAssembly の call_indirect は関数の型を照らすので、methodcaller を含む循環を GC が 後始末すると "function signature mismatch" で落ちる。上流の 3.14 で直した pythongh-156762 (cb81ae4360)を写す Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…gnature browseros: operator.methodcaller の tp_clear を int を返す形にする(pythongh-156762 の backport)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
概要
wheel の platform タグの ABI の版を上げる。1 本の版は
wasi-progate_abi1-wasm32をwasi-progate_abi3-wasm32に、スレッド版はwasi-progate_abi2-wasm32をwasi-progate_abi4-wasm32にする。BrowserOS の libc のヘッダーの値(errno・
O_*・AT_*・ソケットの定数・POLL*・時計の番号。clockid_tは int)が Linux のものになった(Progate/libc#12、Progate/packages#839)。前の libc で組んだ拡張(numpy などの.so)を新しい python.wasm で読むと、値が食い違うか、消えた記号(_CLOCK_MONOTONICなど)で import が落ちる。ABI の版を上げておけば、pip は前の wheel を選ばず、合う wheel が無ければその場で断る。packages の側は python#839 で
scripts/forks.mjsをこのコミットにし、scripts/build-wheels.pyのTAGとテストの期待値を合わせる。🤖 Generated with Claude Code