fix: use the proactor event loop policy on Windows in edit-mode runtimes#9194
Merged
fix: use the proactor event loop policy on Windows in edit-mode runtimes#9194
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
1 task
Contributor
There was a problem hiding this comment.
Pull request overview
This PR updates the kernel subprocess startup path to use the Windows Proactor event loop policy (instead of inheriting the server’s Selector policy), enabling asyncio subprocess APIs (e.g., asyncio.create_subprocess_exec) to work in Windows edit-mode kernels.
Changes:
- Force
WindowsProactorEventLoopPolicyfor kernel subprocesses on Windows to support asyncio subprocess features.
mscolnick
reviewed
Apr 16, 2026
Contributor
mscolnick
left a comment
There was a problem hiding this comment.
could we add a test that this gets set in a test? or prevent someone from accidentally removing this code path.
While still using the selector event loop in the server ...
29fa1da to
d256d75
Compare
mscolnick
previously approved these changes
Apr 16, 2026
Contributor
|
@akshayka tests are currently failing: |
|
🚀 Development release published. You may be able to view the changes at https://marimo.app?v=0.23.2-dev41 |
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.
This change updates the kernel to use the Proactor event loop in Windows in edit mode, partially fixing #9182.
Before this change, the kernel process inherited the event loop policy of the server process (which is the selector policy, because we use the
add_readerAPI).This is only a partial fix because it doesn't address when the kernel runs in-process (
marimo run notebook.py). We could maybe change the event loop policy even in the in-process situation, but we would have to double check that doing so wouldn't break the server as a side-effect.