fix(ci): prevent PYTHONHOME leak in Windows nox sub-sessions#559
Merged
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
Updates the Windows CI test runner composite action to prevent PYTHONHOME (set by uv run for Python 3.14) from leaking into nox sub-sessions running other Python versions.
Changes:
- Unsets
PYTHONHOMEimmediately before executingmake $MAKE_TARGETin therun-testscomposite action.
014d881 to
559c99a
Compare
This comment was marked as outdated.
This comment was marked as outdated.
559c99a to
89ede7f
Compare
89ede7f to
280fb02
Compare
280fb02 to
c52d54b
Compare
c52d54b to
782be30
Compare
…dows On Windows, uv run sets PYTHONHOME to the managed Python 3.14 install directory. This leaks into nox sub-sessions for older Python versions (3.11-3.13), causing them to load 3.14's stdlib and crash at startup. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
782be30 to
6fd9af7
Compare
|
arne-aignx
approved these changes
Apr 23, 2026
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.



Why?
Windows CI fails for Python 3.11, 3.12, and 3.13 because
uv runsetsPYTHONHOMEto the managed Python 3.14 install directory when launching nox. This leaks into pytest sub-processes for older Python versions, causing them to load 3.14's stdlib and crash at startup (SyntaxError on 3.11; fatalinit_import_siteon 3.12/3.13).How?
On Windows only, strip
PYTHONHOMEfrom the session's subprocess environment in_run_test_suitebefore any pytest process is spawned. The fix is guarded byplatform.system() == "Windows"to avoid affecting coverage collection on Linux/macOS.