Repository navigation
Conversation
Include `pyvenv.cfg` timestamp in interpreter cache validation so that recreating a virtual environment with different settings (e.g., toggling `--system-site-packages`) properly invalidates the cached interpreter info, even when the underlying Python executable hasn't changed. Closes astral-sh#18510 https://claude.ai/code/session_01XnGrXu7zANvMbh53D2GMU2
Instead of taking the max of executable and pyvenv.cfg timestamps (which fails when the executable timestamp is newer than pyvenv.cfg), include the pyvenv.cfg content directly in the cache key digest. This guarantees a cache miss whenever pyvenv.cfg changes, regardless of timestamp ordering. https://claude.ai/code/session_01XnGrXu7zANvMbh53D2GMU2
Use the pyvenv.cfg modification time as a separate component in the cache filename digest rather than hashing the full file content. This is cheaper (stat vs read) while still correctly invalidating the cache when the virtual environment is recreated. https://claude.ai/code/session_01XnGrXu7zANvMbh53D2GMU2
zanieb
force-pushed
the
claude/investigate-uv-18510-FWEM6
branch
from
March 17, 2026 23:23
4ea068e to
852ff09
Compare
Gankra
force-pushed
the
claude/investigate-uv-18510-FWEM6
branch
from
April 10, 2026 16:16
d15d71c to
840cb85
Compare
Contributor
|
The current implementation is me throwing codex at the problem:
I'm looking into this one remaining snapshot change. |
This branch has not been deployed
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.
Closes #18510.
Adds the
pyvenv.cfgmtime to the interpreter cache key since toggling--system-site-packageschanges the interpreter's reported site packages at query time.