You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
feat(runtime): execute Python awaitables as single-response RPC calls #338
Generated async Python calls currently fail when the bridge serializes their coroutine.
Reproduced on 6b84614: fixtures.typing_torture.async_text throws Object of type coroutine is not JSON serializable. Its generated wrapper promises a string result. handle_call immediately serializes the call result.
Acceptance criteria:
Define event-loop ownership for subprocess and Pyodide before implementation.
The generated async_text wrapper returns "awaited" through Node and actual Pyodide.
Coroutine exceptions retain the existing error envelope and call context.
Timed-out coroutines cannot desynchronize later requests or produce duplicate responses.
Define cancellation and disposal behavior explicitly.
Generators and async generators continue to reject explicitly.
Preserve one request and one response without handles, retries, streaming, or result caching.
Actual Pyodide coverage in #341 is a prerequisite for claiming browser support. Coordinate unsupported-callable diagnostics with #335.
Architectural approach:
Represent execution requirements in #335 so unsupported combinations produce diagnostics. Coroutine invocation, scheduling, and disposal remain runtime implementation work in this issue. Coordinate through #345.
Node and actual Pyodide now execute coroutine results through the existing request/response protocol. Generated async wrappers retain precise awaited return types. Tests cover structured errors, event-loop ownership, timeout recovery, cancellation, disposal, and rejection of generators and async generators. The release also isolates retired subprocess callbacks and queued writes from a replacement process.
Evidence: runtime/tywrap_bridge_core.py, src/runtime/subprocess-transport.ts, test/runtime_coroutines.test.ts, test/runtime_pyodide_real.conformance.ts, and docs/maintainers/coroutines.md.
Verified release evidence:
Implementation #362 and release #354 merged after independent review, green checks, and resolved CodeRabbit findings. Final candidate 0861ebe and merge f6f811d have identical trees.
Final full CI passed, including check:all, scientific 103/103, clean consumer 20/20, real Pyodide/browser 8/8, performance 25/25, and Node/Python/Bun/OS checks. Performance budgets remained unchanged.
Fresh published-consumer run passed 20/20 checks with exact registry versions, isolated imports, and generated calls. It used no local-package fallback.
Activity
bbopen commentedon Sep 20, 2026
Node and actual Pyodide now execute coroutine results through the existing request/response protocol. Generated async wrappers retain precise awaited return types. Tests cover structured errors, event-loop ownership, timeout recovery, cancellation, disposal, and rejection of generators and async generators. The release also isolates retired subprocess callbacks and queued writes from a replacement process.
Evidence:
runtime/tywrap_bridge_core.py,src/runtime/subprocess-transport.ts,test/runtime_coroutines.test.ts,test/runtime_pyodide_real.conformance.ts, anddocs/maintainers/coroutines.md.Verified release evidence:
0861ebeand mergef6f811dhave identical trees.The architecture decision records the accepted scope and prototype limits.
Closing with the implemented and verified 0.11 release outcome.