Hacktoberfest 2026:メンテナが10月に向けて印を付けた、オープンで初心者向けの issue。 Hacktoberfest の issue を見る

Windows support (without using WSL)

オープン
#397 コメント 4 件 リアクション 2 件 担当者 0 名 GitHub で見る

メンテナーはふだん 3 日以内に返信

@Otto-AA がすでに取り組んでいます。

2025年7月6日 から。

  • #404 @Otto-AA による — オープン

評価

難易度
5/5
見積もり時間
1週間以上
初心者へのやさしさ
28/100
issue の種類
機能追加
明瞭さ
おおむね明確
活発さ
停滞
技術スタック
python

調査の方向性

_run() エントリポイントから開始し、現在の os.fork() と resource.RLIMIT_CPU の経路を追跡します。提案されている multiprocessing のアプローチを比較し、Windows で pytest の状態、引数、エラー、タイムアウトがどのように転送されるかを特定します。Linux と macOS のパフォーマンス、エラー処理、ミューテーションのタイムアウトを維持しながら、Windows のネイティブサポートを実現できれば完了です。

索引モデルが issue の本文から書いたものです。

説明

enhancement

Mutmut 3 currently can be run on Windows through the WSL, but not natively on Windows.

We use fork() as a performance optimization, which only works on Unix systems. However, it should be possible to rewrite mutmut to also work with other multiprocessing options. This would be slower (as we cannot copy the whole memory at fork time, including the initialized pytest setup), but still a nice to have.

If someone wants to add native Windows support, we likely need to:

  • rewrite the _run() method to use a the spawn method instead of os.fork()
  • pass all necessary arguments to this process (currently we rely on global + local variables to be copied via forking the whole process memory)

While doing so, we want to ensure that (at least for Linux and MacOS) we have:

  • same performance as before (at least for Linux and MacOS)
  • same test error handling as before (not sure what/how we currently support this. But e.g. what happens a unit test calls os._exit()?)
  • test timeout (currently we use resource.RLIMIT_CPU, which is Unix-only if I'm not mistaken. This is necessary as mutants can easily create infinite loops)

I would consider following approaches, though there may be better ones:

  • create a new process per mutant (as we do now)
  • create max_children worker processes and initialize pytest there. The worker processes keep polling mutation tasks from a Queue and perform them
  • use a multiprocessing.pool.Pool of size max_children and initialize pytest in the setup
主要言語
Python
スター
1.5k
フォーク
182
平均マージ
2日 14時間
マージ済み PR(30日)
3

環境構築

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

boxed/mutmut のほかの issue

boxed/mutmut の issue をすべて見る

似ている issue

Python の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。