Added support for Windows.
Metadata
Current evaluation
Merged into main via 838e759 (commit b770879), adding Windows support: win32pipe-based file-descriptor pipes and a blocking _PipeReaderThread loop, with test matrix and Windows-runnable example updates.
Resolution: closed resolved
Reason: The PR itself was approved and merged into main (merge commit 838e759, commit b770879 'Added support for Windows.'). Its changes are present in craft_cli/messages.py, where _PipeReaderThread exists, with later commits 424f42e and ccd08ee refining the Windows pipe read loop.
Evaluated by: mr-cal-bot
No scores available.
Issue body
- [x] Have you signed the [CLA](http://www.ubuntu.com/legal/contributors/)?
-----
This includes a functionality change and several tests adjustments (beyond enabling Windows in the test matrix, with the particular case of installing extra dependencies).
The functionality change reflects the fact that there is no "os.pipe" nor "select" in Windows, so:
- used `win32pipe` module from `pywin32` package to create a proper pipe represented as a file descriptor (with `FdCreatePipe`) so it can be used as a subprocess' "stream"
- use a totally different loop for reading, which is blocking, so I had to write an extra byte on stopping (to unblock the reading), and support that byte in the read loop
Note 1: all the previous changes are only for "windows mode", which after a little refactor is just enclosed in the _PipeReaderThread class.
Note 2: tests for stream/pipe reading did not really change beyond the refactor just mentioned; "external" functionality is fulfilled just fine, for which I added an "example" suitable to be run in Windows.
The test changes are scattered in several test files, but they are mainly grouped in:
- better path representation in the test assert
- support for different "time behaviour" (specially in the log filepath timestamp)
Evaluation history
| Date | Model | Scores | Action | Summary |
|---|---|---|---|---|
| stealth/space-bunny-alpha | — | closed resolved | Merged into main via 838e759 (commit b770879), adding Windows support: win32pipe-based file-descriptor pipes and a blocking _PipeReaderThread loop, with test matrix and Windows-runnable example updates. | |
| stealth/space-bunny-alpha | — | closed resolved | Merged in craft-cli#26 (b770879; merge 838e759), adding Windows support via win32pipe and blocking _PipeReaderThread handling, plus updated tests and a Windows example. | |
| qwen/qwen3.6-35b-a3b | — | — | Merged. Added Windows support by replacing os.pipe and select with win32pipe and a blocking read loop. Refactored into _PipeReaderThread, updated tests for paths and timing, and added a Windows example. Approved and passed CI. |
Update history
No update history recorded yet.
Related issues
No related issues found above the similarity threshold.