Repository navigation
Conversation
4b7a52a to
fca9a08
Compare
Merging this PR will not alter performance
|
93729c7 to
e3272ea
Compare
fca9a08 to
b9275de
Compare
e3272ea to
32d694a
Compare
| if cfg!(unix) && fs_err::symlink_metadata(&base_python)?.is_symlink() { | ||
| Interpreter::clear_cache(self.interpreter().sys_executable(), cache)?; | ||
| return Ok(()); |
There was a problem hiding this comment.
[P2] Update the sync cache test for the symlink fallback
When tests use system CPython 3.12, TestContext::python_path() exposes it through a python3 symlink, which non-standalone interpreters retain as their base executable. This guard therefore skips cache population in sync_caches_interpreter (crates/uv/tests/sync/sync.rs), causing its second sync to execute sitecustomize.py and fail assert!(!startup_marker.exists()). Make that test’s initial sync explicitly select the canonical regular executable, following create_venv_caches_interpreter, so it continues exercising metadata inference regardless of the contributor’s Python installation.
Venvs created from symlinked Python executables can cache a
sys._base_executablethat disagrees with Python and changes the base selected for child environments. Let Python populate the cache for these executables on Unix, and invalidate older interpreter-cache entries so existing environments recover after upgrading.Fixes astral-sh#22383.
Stacked on #2547.
The reproducer is stacked on astral-sh#22524.