Make interpreter caching robust to OS upgrades (#11875)

## Summary

In. https://github.com/astral-sh/uv/issues/11857, we had a case of a
user that was seeing incorrect resolution results after upgrading to a
newer version of macOS, since we retained cache information about the
interpreter. This PR adds the OS name and version to the cache key for
the interpreter. This seems to be extremely cheap, and it's nice to make
this robust so that users don't run into the same confusion in the
future.

Closes https://github.com/astral-sh/uv/issues/11857.
This commit is contained in:
Charlie Marsh
2025-03-01 20:36:38 -05:00
committed by GitHub
parent cf76334d79
commit 461f4d9007
3 changed files with 9 additions and 3 deletions
+1
View File
@@ -51,6 +51,7 @@ same-file = { workspace = true }
schemars = { workspace = true, optional = true }
serde = { workspace = true, features = ["derive"] }
serde_json = { workspace = true }
sys-info = { workspace = true }
target-lexicon = { workspace = true }
tempfile = { workspace = true }
thiserror = { workspace = true }