-
-
Notifications
You must be signed in to change notification settings - Fork 167
Description
Current Behavior
nox' test test_run_env_systemroot
fails on python 3.12.8
Expected Behavior
test_run_env_systemroot
should not fail on >=python 3.12.8
Steps To Reproduce
I am reporting this as a failure of a current rebuilding on NixOS that bumped python 3.12.7 -> 3.12.8.
The build logs from CI can be found here: https://hydra.nixos.org/build/281820678/nixlog/1
I tried to dig into the source code changes of 3.12.8 for shutil.which
and i think the test is failing because of the following change:
python/cpython@8899e85
The change intention on cpython is to fix behavior for which on windows systems.
The test_run_env_systemroot
is running shutil.which
with mocked sys.platform = "win32"
so should be affected by the change.
In Lib/shutil.py
the line 1558 change removes cmd
from the windows lookup path thus the test is failing in our ci suite.
Environment
- OS: NixOS 25.05 (nixos-unstable)
- Python: 3.12.8
- Nox: 2024.10.09
Anything else?
In addition os.pathsep
(line 1553) does return an unexpected pathseperator when having the mock sys.platform = "win32"
active. So i kind of have the feeling that the overall test setup is not correct when building in linux systems
I am actually not sure why sys.platform
is mocked on the test at all, shouldnt it work the same on any platform?