You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
test_isolation fails when PYTHONPATH is set (exposed by __lazy_modules__ on Python 3.15) #1047
test_isolation calls subprocess.check_call without env=, so the parent's PYTHONPATH leaks into the isolated venv. The test expects import build.env to fail inside the venv, but it succeeds because build is reachable via PYTHONPATH.
This wasn't visible before 1.4.3 because eager imports in build/init.py would pull in pyproject_hooks, which isn't in the venv, causing the import to fail for a different reason. The lazy_modules added in 1.4.3 defers that import on Python 3.15, unmasking the PYTHONPATH leak.
Suggested fix: use make_extra_environ() (which already clears PYTHONPATH) for the subprocess:
Activity