Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for locking PEP 723 scripts #10135

Merged
merged 1 commit into from
Jan 8, 2025
Merged

Conversation

charliermarsh
Copy link
Member

@charliermarsh charliermarsh commented Dec 24, 2024

Summary

You can now run uv lock --script main.py to lock a given script (though as of this PR, the script itself isn't used anywhere).

Closes #6318.

@charliermarsh charliermarsh marked this pull request as draft December 24, 2024 02:45
@charliermarsh charliermarsh added no-build Disable building binaries in CI no-test Disable CI tests for a pull request enhancement New feature or improvement to existing functionality labels Dec 24, 2024
@charliermarsh charliermarsh force-pushed the charlie/lock-target branch 2 times, most recently from b90829c to 5211494 Compare December 25, 2024 00:13
Base automatically changed from charlie/lock-target to main December 25, 2024 00:26
@charliermarsh charliermarsh removed no-build Disable building binaries in CI no-test Disable CI tests for a pull request labels Dec 25, 2024
@charliermarsh charliermarsh force-pushed the charlie/script-target branch 2 times, most recently from 0e9d555 to 0095740 Compare December 25, 2024 20:08
@charliermarsh charliermarsh marked this pull request as ready for review December 25, 2024 20:17
@charliermarsh charliermarsh force-pushed the charlie/script-target branch 2 times, most recently from 9ca5fd2 to 6387028 Compare December 26, 2024 17:01
@charliermarsh charliermarsh requested a review from zanieb December 26, 2024 20:02
Comment on lines 3094 to 3095
/// If provided, uv will lock the script based on its inline metadata table, in adherence
/// with PEP 723.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's mention where the lockfile will be written too.

@charliermarsh charliermarsh force-pushed the charlie/script-target branch from 6387028 to cede350 Compare January 8, 2025 18:26
@charliermarsh charliermarsh enabled auto-merge (squash) January 8, 2025 18:26
@charliermarsh charliermarsh merged commit 5d33b94 into main Jan 8, 2025
64 checks passed
@charliermarsh charliermarsh deleted the charlie/script-target branch January 8, 2025 18:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or improvement to existing functionality
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Make it possible to lock dependencies in a script
2 participants