fix(python): pin python version and add uv caching#3690
Open
slbotbm wants to merge 1 commit into
Open
Conversation
ethanlin01x
reviewed
Jul 17, 2026
| { file = "pyproject.toml" }, | ||
| { file = "Cargo.toml" }, | ||
| { file = "Cargo.lock" }, | ||
| { file = "src/**/*.rs" }, |
There was a problem hiding this comment.
Would it make sense to also include the workspace root manifest here?
{ file = "../../Cargo.toml" }
My understanding is that since foreign/python is excluded from the root workspace, but core/sdk inherits most of its dependency versions and features from [workspace.dependencies] in the root Cargo.toml, a version bump there could change the build without any of the current cache keys noticing — so uv sync might keep the previously built .so.
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.
While working on the python sdk, often
uv sync --all-extrasdoes not actually recreate the .so file using the latest changes and leaves the old version of the sdk, leading to difficulties in actually testing it on local. This change adds explicit cache keys for files. If the files are changed, the .so extension is automatically rebuilt on runninguv sync --all-extras. (caveat: it will also be run when running other commands likeuv run ruff formatsince there is a hidden sync step in these commands).I also pin the python version to 3.10 explicitly. Previously, we only declare the python version to be >= 3.10, which led to uv downloading python according to the following hierarchy:
By pinning the version, we force uv to utilize 3.10.