Repository navigation
Conversation
Windows has no os.fork, so neither existing runner can work there. SpawnRunner starts a fresh Python process per mutant, hands it the mutant and its tests on stdin and reads the verdict from the exit code. It is the default on Windows; a config asking for fork or forkserver falls back to it with a warning, so a pyproject.toml shared with POSIX users keeps working. Timeouts are wall-clock only, as there is no RLIMIT_CPU. A worker that fails outside the tests exits 35 (suspicious) instead of Python's 1, which would count as a kill.
Remove the exit that sent Windows users to WSL. Mutant generation and coverage gathering relied on forked children inheriting state() and sys.path; under the spawn start method they are handed what they need. The my_lib segfault mutant is killed by a failing test on Windows, because ctypes turns the access violation into an OSError there. Refs boxed#397.
The default encoding there is the ANSI code page, which cannot encode the "ǁ" in mutant names, the spinner or the emoji. It went unnoticed locally because this machine runs with a UTF-8 code page; the Windows CI runner added in 92e1540 does not.
Run natively on Windows
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.
Fixes #397
No regression on Linux
The issue asks for the same performance as before, at least on Linux and macOS. On Linux and macOS the default
process_isolationis stillfork, andForkRunnerandForkServerRunnerare unchanged. The spawn runner is a separate class that Linux and macOS only use if you ask for it.Same benchmark (
benchmark_1k, WSL2 ext4, Python 3.13,--max-children 4, median of 3 runs):process_isolation6837b3cforkforkserver(collect)The differences are within run-to-run noise on a shared machine:
forkvaried from 98 to 115 mut/s on this branch. Both versions gave the same results, 842 killed and 170 survived.