Clear Python installation scratch space with uv cache clean - #20754
Closed
woodruffw wants to merge 2 commits into
Closed
Clear Python installation scratch space with uv cache clean#20754woodruffw wants to merge 2 commits into
uv cache clean#20754woodruffw wants to merge 2 commits into
Conversation
Signed-off-by: William Woodruff <william@yossarian.net>
Signed-off-by: William Woodruff <william@yossarian.net>
uv test inventory changesThis PR changes the tests when compared with the
|
uv cleanuv cache clean
Member
Author
|
#20752 addresses the main root cause of this. We could still do the things here, but IMO only the |
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.
Summary
Fixes #20675.
There are two distinct parts here:
uv pythonitself now has a provision to attempt to clear the scratch directoryuv cache cleannow tries to clear the scratch directory by defaultI'm not 100% sure whether either/both is best -- I think clearing as part of
uv pythonis arguably superfluous (IIUC there will functionally never be anything to clear, since the only wayclear_scratchwill be reachable is if an installation/download wasn't interrupted). Arguably therefore we should maybe only do this as part ofuv cache clean.Curious if @geofft has strong opinions on that as well 🙂
Test Plan
Added tests for various scenarios with
uv cache clean+ different states for the Python installation scratch directory.