Add juv stamp
for time-based dependency resolution pinning
#50
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.
This PR introduces the
juv stamp
command, which sets anexclude-newer
timestamp for constraining dependency resolution inuv
by time. This approach significantly improves the ergonomics of using this feature for little scripts, especially in the absence of traditional lockfiles.By pinning a specific timestamp,
juv stamp
ensures thatuv
resolves dependencies as they existed at that point in time. This means you can stamp your scripts before you share them with others, or when you commit scripts or notebooks to version control systems.New Command:
juv stamp
The
juv stamp
command pins a timestamp asexclude-newer
in the metadata of the target file, effectively locking the dependency resolution context:The
juv stamp
command also works with regular Python scripts. This feature will land eventually in uv (via a config command, but until then you can use this CLI for your uv scripts withuvx
: