Skip to content

Commit 7b3199f

Browse files
woodruffwkonstin
andauthored
Collect and upload PEP 740 attestations during uv publish (#16731)
Co-authored-by: konsti <konstin@mailbox.org>
1 parent 4b92f4f commit 7b3199f

17 files changed

Lines changed: 1244 additions & 101 deletions

File tree

Cargo.lock

Lines changed: 1 addition & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -108,6 +108,7 @@ dunce = { version = "1.0.5" }
108108
either = { version = "1.13.0" }
109109
encoding_rs_io = { version = "0.1.7" }
110110
etcetera = { version = "0.11.0" }
111+
fastrand = { version = "2.3.0" }
111112
flate2 = { version = "1.0.33", default-features = false, features = ["zlib-rs"] }
112113
fs-err = { version = "3.0.0", features = ["tokio"] }
113114
futures = { version = "0.3.30" }

crates/uv-cli/src/lib.rs

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7040,8 +7040,8 @@ pub struct DisplayTreeArgs {
70407040
pub struct PublishArgs {
70417041
/// Paths to the files to upload. Accepts glob expressions.
70427042
///
7043-
/// Defaults to the `dist` directory. Selects only wheels and source distributions, while
7044-
/// ignoring other files.
7043+
/// Defaults to the `dist` directory. Selects only wheels and source distributions
7044+
/// and their attestations, while ignoring other files.
70457045
#[arg(default_value = "dist/*")]
70467046
pub files: Vec<String>,
70477047

@@ -7147,6 +7147,13 @@ pub struct PublishArgs {
71477147
/// and will perform validation against the index if supported, but will not upload any files.
71487148
#[arg(long)]
71497149
pub dry_run: bool,
7150+
7151+
/// Do not upload attestations for the published files.
7152+
///
7153+
/// By default, uv attempts to upload matching PEP 740 attestations with each distribution
7154+
/// that is published.
7155+
#[arg(long, env = EnvVars::UV_PUBLISH_NO_ATTESTATIONS)]
7156+
pub no_attestations: bool,
71507157
}
71517158

71527159
#[derive(Args)]

crates/uv-keyring/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ zeroize = { workspace = true }
4545
[dev-dependencies]
4646
doc-comment = "0.3"
4747
env_logger = "0.11.5"
48-
fastrand = "2"
48+
fastrand = { workspace = true }
4949

5050
[package.metadata.docs.rs]
5151
default-target = "x86_64-unknown-linux-gnu"

crates/uv-publish/Cargo.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,7 @@ url = { workspace = true }
4949

5050
[dev-dependencies]
5151
insta = { workspace = true }
52+
fastrand = { workspace = true }
5253

5354
[features]
5455
# Test only feature to enable non-HTTPS URL handling

0 commit comments

Comments
 (0)