Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions crates/uv-cli/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -236,8 +236,8 @@ pub struct GlobalArgs {
)]
pub color: Option<ColorChoice>,

/// Whether to load TLS certificates from the platform's native certificate store [env:
/// UV_NATIVE_TLS=]
/// (Deprecated: use `--system-certs` instead.) Whether to load TLS certificates from the
/// platform's native certificate store [env: UV_NATIVE_TLS=]
///
/// By default, uv uses bundled Mozilla root certificates. When enabled, this flag loads
/// certificates from the platform's native certificate store instead.
Expand Down
1 change: 1 addition & 0 deletions crates/uv-static/src/env_vars.rs
Original file line number Diff line number Diff line change
Expand Up @@ -110,6 +110,7 @@ impl EnvVars {
/// Equivalent to the `--native-tls` command-line argument. If set to `true`, uv will
/// load TLS certificates from the platform's native certificate store instead of the
/// bundled Mozilla root certificates.
/// (Deprecated: use `UV_SYSTEM_CERTS` instead.)
#[attr_added_in("0.1.19")]
pub const UV_NATIVE_TLS: &'static str = "UV_NATIVE_TLS";

Expand Down
24 changes: 24 additions & 0 deletions crates/uv/src/settings.rs
Original file line number Diff line number Diff line change
Expand Up @@ -287,6 +287,30 @@ impl NetworkSettings {
Connectivity::Online
};

if args.native_tls {
warn_user_once!(
"The `--native-tls` flag is deprecated and will be removed in a future release. Use `--system-certs` instead."
);
}
if args.no_native_tls {
warn_user_once!(
"The `--no-native-tls` flag is deprecated and will be removed in a future release. Use `--no-system-certs` instead."
);
}
if environment.native_tls.value.is_some() {
warn_user_once!(
"The `UV_NATIVE_TLS` environment variable is deprecated and will be removed in a future release. Use `UV_SYSTEM_CERTS` instead."
);
}
if workspace
.and_then(|workspace| workspace.globals.native_tls)
.is_some()
{
warn_user_once!(
"The `native-tls` setting is deprecated and will be removed in a future release. Use `system-certs` instead."
);
}

// Resolve whether to use system certificates.
//
// `--native-tls` is a legacy alias for `--system-certs` — it enables system certificates
Expand Down
3 changes: 3 additions & 0 deletions crates/uv/tests/it/show_settings.rs
Original file line number Diff line number Diff line change
Expand Up @@ -9031,6 +9031,7 @@ fn system_certs_cli_aliases_override_env() {
}

----- stderr -----
warning: The `--no-native-tls` flag is deprecated and will be removed in a future release. Use `--no-system-certs` instead.
"#
);

Expand Down Expand Up @@ -9155,6 +9156,7 @@ fn system_certs_cli_aliases_override_env() {
}

----- stderr -----
warning: The `UV_NATIVE_TLS` environment variable is deprecated and will be removed in a future release. Use `UV_SYSTEM_CERTS` instead.
"#
);
}
Expand Down Expand Up @@ -9416,6 +9418,7 @@ fn system_certs_config_aliases() -> anyhow::Result<()> {
}

----- stderr -----
warning: The `native-tls` setting is deprecated and will be removed in a future release. Use `system-certs` instead.
"#
);

Expand Down
Loading