Keep Unix-only stdlib out of CLI and pytest import paths - #533
Open
brainRottedCoder wants to merge 1 commit into
Open
Keep Unix-only stdlib out of CLI and pytest import paths#533brainRottedCoder wants to merge 1 commit into
brainRottedCoder wants to merge 1 commit into
Conversation
Contributor
Greptile SummaryThe PR defers Unix-only standard-library imports to POSIX helpers, adds non-POSIX skips, and introduces package-wide import regression checks. The installed-release evidence path remains capable of invoking the PTY helper on Windows.
Confidence Score: 4/5The PR is not yet safe to merge because the installed-release evidence test still reaches Unix-only PTY imports during a Windows pytest run. The direct terminal-close-race test now skips correctly, but the undecorated installed-wheel evidence test executes a copied driver whose interactive flow calls Files Needing Attention: exp/tests/release_test.py
|
| Filename | Overview |
|---|---|
| exp/tests/release_test.py | Defers PTY imports and guards the race test, but the installed-wheel evidence test still reaches the POSIX-only helper on Windows. |
| exp/tests/posix_stdlib_import_test.py | Adds package-wide module-scope import enforcement, with a non-blocking gap for except* statement bodies. |
| exp/conftest.py | Defers POSIX imports and skips the terminal-child fixture on non-POSIX hosts. |
| exp/cli/shared/picker.py | Defers terminal imports and routes Windows consoles through the line-based picker. |
| exp/cli/judge/trace_viewer.py | Moves terminal-only imports into the raw-key helper. |
Reviews (3): Last reviewed commit: "Keep Unix-only stdlib out of CLI and pyt..." | Re-trigger Greptile
Import fcntl, pty, termios, and tty only inside POSIX helpers so Windows can collect tests and import exp.cli. Skip the direct TTY close-race caller off POSIX. Fixes experientiallabs#532.
brainRottedCoder
force-pushed
the
fix/532-windows-posix-imports
branch
from
August 20, 2026 18:55
ff6069b to
4e189bb
Compare
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.
Summary
fcntl/pty/termios/ttyat module scope so pytest can collect on Windows andimport wmo.cli.appworks.Fixes pytest cannot collect on Windows: wmo/conftest.py imports Unix-only fcntl #532
Test plan
uv run ruff check .uv run ruff format --check .uv run ty check(Ubuntu CI; Windows ty still fails on POSIX stubs)uv run pytest -q wmo/tests/posix_stdlib_import_test.py wmo/cli/shared/picker_test.py wmo/cli/judge/trace_viewer_test.pyuv run python -c "import wmo.cli.app; import wmo.conftest"uv run pytest --collect-only -q wmo