Remove duplicate extra-build-dependencies warnings for uv pip (#15088)

## Summary

These are repeated for all the `uv pip` commands.
This commit is contained in:
Charlie Marsh 2025-08-05 19:14:58 +01:00 committed by GitHub
parent 8ef3b2eb8e
commit 327af017ae
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -28,7 +28,7 @@ use uv_cli::{
ProjectCommand, PythonCommand, PythonNamespace, SelfCommand, SelfNamespace, ToolCommand, ProjectCommand, PythonCommand, PythonNamespace, SelfCommand, SelfNamespace, ToolCommand,
ToolNamespace, TopLevelArgs, compat::CompatArgs, ToolNamespace, TopLevelArgs, compat::CompatArgs,
}; };
use uv_configuration::{PreviewFeatures, min_stack_size}; use uv_configuration::min_stack_size;
use uv_fs::{CWD, Simplified}; use uv_fs::{CWD, Simplified};
#[cfg(feature = "self-update")] #[cfg(feature = "self-update")]
use uv_pep440::release_specifiers_to_ranges; use uv_pep440::release_specifiers_to_ranges;
@ -443,16 +443,6 @@ async fn run(mut cli: Cli) -> Result<ExitStatus> {
// Resolve the settings from the command-line arguments and workspace configuration. // Resolve the settings from the command-line arguments and workspace configuration.
let args = PipCompileSettings::resolve(args, filesystem); let args = PipCompileSettings::resolve(args, filesystem);
show_settings!(args); show_settings!(args);
if !args.settings.extra_build_dependencies.is_empty()
&& !globals
.preview
.is_enabled(PreviewFeatures::EXTRA_BUILD_DEPENDENCIES)
{
warn_user_once!(
"The `extra-build-dependencies` setting is experimental and may change without warning. Pass `--preview-features {}` to disable this warning.",
PreviewFeatures::EXTRA_BUILD_DEPENDENCIES
);
}
// Initialize the cache. // Initialize the cache.
let cache = cache.init()?.with_refresh( let cache = cache.init()?.with_refresh(
@ -554,16 +544,6 @@ async fn run(mut cli: Cli) -> Result<ExitStatus> {
// Resolve the settings from the command-line arguments and workspace configuration. // Resolve the settings from the command-line arguments and workspace configuration.
let args = PipSyncSettings::resolve(args, filesystem); let args = PipSyncSettings::resolve(args, filesystem);
show_settings!(args); show_settings!(args);
if !args.settings.extra_build_dependencies.is_empty()
&& !globals
.preview
.is_enabled(PreviewFeatures::EXTRA_BUILD_DEPENDENCIES)
{
warn_user_once!(
"The `extra-build-dependencies` setting is experimental and may change without warning. Pass `--preview-features {}` to disable this warning.",
PreviewFeatures::EXTRA_BUILD_DEPENDENCIES
);
}
// Initialize the cache. // Initialize the cache.
let cache = cache.init()?.with_refresh( let cache = cache.init()?.with_refresh(
@ -643,16 +623,6 @@ async fn run(mut cli: Cli) -> Result<ExitStatus> {
// Resolve the settings from the command-line arguments and workspace configuration. // Resolve the settings from the command-line arguments and workspace configuration.
let mut args = PipInstallSettings::resolve(args, filesystem); let mut args = PipInstallSettings::resolve(args, filesystem);
show_settings!(args); show_settings!(args);
if !args.settings.extra_build_dependencies.is_empty()
&& !globals
.preview
.is_enabled(PreviewFeatures::EXTRA_BUILD_DEPENDENCIES)
{
warn_user_once!(
"The `extra-build-dependencies` setting is experimental and may change without warning. Pass `--preview-features {}` to disable this warning.",
PreviewFeatures::EXTRA_BUILD_DEPENDENCIES
);
}
let mut requirements = Vec::with_capacity( let mut requirements = Vec::with_capacity(
args.package.len() + args.editables.len() + args.requirements.len(), args.package.len() + args.editables.len() + args.requirements.len(),