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
13 changes: 2 additions & 11 deletions crates/uv/src/commands/pip/compile.rs
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ use uv_fs::{CWD, Simplified};
use uv_git::ResolvedRepositoryReference;
use uv_install_wheel::LinkMode;
use uv_normalize::PackageName;
use uv_preview::{Preview, PreviewFeature};
use uv_preview::Preview;
use uv_pypi_types::{Conflicts, SupportedEnvironments};
use uv_python::{
EnvironmentPreference, PythonDownloads, PythonEnvironment, PythonInstallation,
Expand All @@ -49,7 +49,7 @@ use uv_settings::PythonInstallMirrors;
use uv_static::EnvVars;
use uv_torch::{TorchMode, TorchSource, TorchStrategy};
use uv_types::{EmptyInstalledPackages, HashStrategy};
use uv_warnings::{warn_user, warn_user_once};
use uv_warnings::warn_user;
use uv_workspace::WorkspaceCache;
use uv_workspace::pyproject::ExtraBuildDependencies;

Expand Down Expand Up @@ -123,15 +123,6 @@ pub(crate) async fn pip_compile(
printer: Printer,
preview: Preview,
) -> Result<ExitStatus> {
if !preview.is_enabled(PreviewFeature::ExtraBuildDependencies)
&& !extra_build_dependencies.is_empty()
{
warn_user_once!(
"The `extra-build-dependencies` option is experimental and may change without warning. Pass `--preview-features {}` to disable this warning.",
PreviewFeature::ExtraBuildDependencies
);
}

// If the user provides a `pyproject.toml` or other TOML file as the output file, raise an
// error.
if output_file
Expand Down
11 changes: 1 addition & 10 deletions crates/uv/src/commands/pip/install.rs
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ use uv_resolver::{
use uv_settings::PythonInstallMirrors;
use uv_torch::{TorchMode, TorchSource, TorchStrategy};
use uv_types::HashStrategy;
use uv_warnings::{warn_user, warn_user_once};
use uv_warnings::warn_user;
use uv_workspace::WorkspaceCache;
use uv_workspace::pyproject::ExtraBuildDependencies;

Expand Down Expand Up @@ -106,15 +106,6 @@ pub(crate) async fn pip_install(
) -> anyhow::Result<ExitStatus> {
let start = std::time::Instant::now();

if !preview.is_enabled(PreviewFeature::ExtraBuildDependencies)
&& !extra_build_dependencies.is_empty()
{
warn_user_once!(
"The `extra-build-dependencies` option is experimental and may change without warning. Pass `--preview-features {}` to disable this warning.",
PreviewFeature::ExtraBuildDependencies
);
}

let client_builder = client_builder.clone().keyring(keyring_provider);

// Read all requirements from the provided sources.
Expand Down
11 changes: 1 addition & 10 deletions crates/uv/src/commands/pip/sync.rs
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ use uv_resolver::{
use uv_settings::PythonInstallMirrors;
use uv_torch::{TorchMode, TorchSource, TorchStrategy};
use uv_types::HashStrategy;
use uv_warnings::{warn_user, warn_user_once};
use uv_warnings::warn_user;
use uv_workspace::WorkspaceCache;
use uv_workspace::pyproject::ExtraBuildDependencies;

Expand Down Expand Up @@ -93,15 +93,6 @@ pub(crate) async fn pip_sync(
printer: Printer,
preview: Preview,
) -> Result<ExitStatus> {
if !preview.is_enabled(PreviewFeature::ExtraBuildDependencies)
&& !extra_build_dependencies.is_empty()
{
warn_user_once!(
"The `extra-build-dependencies` option is experimental and may change without warning. Pass `--preview-features {}` to disable this warning.",
PreviewFeature::ExtraBuildDependencies
);
}

let client_builder = client_builder.clone().keyring(keyring_provider);

// Initialize a few defaults.
Expand Down
11 changes: 1 addition & 10 deletions crates/uv/src/commands/project/add.rs
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ use uv_fs::{LockedFile, LockedFileError, Simplified};
use uv_git::GIT_STORE;
use uv_normalize::{DEV_DEPENDENCIES, DefaultExtras, DefaultGroups, ExtraName, PackageName};
use uv_pep508::{MarkerTree, VersionOrUrl};
use uv_preview::{Preview, PreviewFeature};
use uv_preview::Preview;
use uv_python::{Interpreter, PythonDownloads, PythonEnvironment, PythonPreference, PythonRequest};
use uv_redacted::DisplaySafeUrl;
use uv_requirements::{NamedRequirementsResolver, RequirementsSource, RequirementsSpecification};
Expand Down Expand Up @@ -103,15 +103,6 @@ pub(crate) async fn add(
printer: Printer,
preview: Preview,
) -> Result<ExitStatus> {
if !preview.is_enabled(PreviewFeature::ExtraBuildDependencies)
&& !settings.resolver.extra_build_dependencies.is_empty()
{
warn_user_once!(
"The `extra-build-dependencies` option is experimental and may change without warning. Pass `--preview-features {}` to disable this warning.",
PreviewFeature::ExtraBuildDependencies
);
}

for source in &requirements {
match source {
RequirementsSource::PyprojectToml(_) => {
Expand Down
9 changes: 0 additions & 9 deletions crates/uv/src/commands/project/lock.rs
Original file line number Diff line number Diff line change
Expand Up @@ -472,15 +472,6 @@ async fn do_lock(
torch_backend: _,
} = settings;

if !preview.is_enabled(PreviewFeature::ExtraBuildDependencies)
&& !extra_build_dependencies.is_empty()
{
warn_user_once!(
"The `extra-build-dependencies` option is experimental and may change without warning. Pass `--preview-features {}` to disable this warning.",
PreviewFeature::ExtraBuildDependencies
);
}

// Collect the requirements, etc.
let members = target.members();
let packages = target.packages();
Expand Down
11 changes: 1 addition & 10 deletions crates/uv/src/commands/project/sync.rs
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ use uv_resolver::{FlatIndex, ForkStrategy, Installable, Lock, PrereleaseMode, Re
use uv_scripts::Pep723Script;
use uv_settings::PythonInstallMirrors;
use uv_types::{BuildIsolation, HashStrategy};
use uv_warnings::{warn_user, warn_user_once};
use uv_warnings::warn_user;
use uv_workspace::pyproject::Source;
use uv_workspace::{DiscoveryOptions, MemberDiscovery, VirtualProject, Workspace, WorkspaceCache};

Expand Down Expand Up @@ -639,15 +639,6 @@ pub(super) async fn do_sync(
sources,
} = settings;

if !preview.is_enabled(PreviewFeature::ExtraBuildDependencies)
&& !extra_build_dependencies.is_empty()
{
warn_user_once!(
"The `extra-build-dependencies` option is experimental and may change without warning. Pass `--preview-features {}` to disable this warning.",
PreviewFeature::ExtraBuildDependencies
);
}

// Lower the extra build dependencies with source resolution.
let extra_build_requires = match &target {
InstallTarget::Workspace { workspace, .. }
Expand Down
27 changes: 3 additions & 24 deletions crates/uv/tests/it/pip_install.rs
Original file line number Diff line number Diff line change
Expand Up @@ -13002,13 +13002,12 @@ fn pip_install_build_dependencies_respect_locked_versions() -> Result<()> {
"#})?;

// The child should be built with anyio 4.0
uv_snapshot!(context.filters(), context.pip_install().arg(".").env(EnvVars::EXPECTED_ANYIO_VERSION, "4.0"), @"
uv_snapshot!(context.filters(), context.pip_install().arg(".").env(EnvVars::EXPECTED_ANYIO_VERSION, "4.0"), @r"
success: true
exit_code: 0
----- stdout -----

----- stderr -----
warning: The `extra-build-dependencies` option is experimental and may change without warning. Pass `--preview-features extra-build-dependencies` to disable this warning.
Resolved [N] packages in [TIME]
Prepared [N] packages in [TIME]
Installed [N] packages in [TIME]
Expand Down Expand Up @@ -13036,13 +13035,12 @@ fn pip_install_build_dependencies_respect_locked_versions() -> Result<()> {

// The child should be rebuilt with anyio 3.7, without `--reinstall`
uv_snapshot!(context.filters(), context.pip_install().arg(".")
.arg("--reinstall-package").arg("child").env(EnvVars::EXPECTED_ANYIO_VERSION, "4.0"), @"
.arg("--reinstall-package").arg("child").env(EnvVars::EXPECTED_ANYIO_VERSION, "4.0"), @r"
success: false
exit_code: 1
----- stdout -----

----- stderr -----
warning: The `extra-build-dependencies` option is experimental and may change without warning. Pass `--preview-features extra-build-dependencies` to disable this warning.
Resolved [N] packages in [TIME]
× Failed to build `child @ file://[TEMP_DIR]/child`
├─▶ The build backend returned an error
Expand All @@ -13056,13 +13054,12 @@ fn pip_install_build_dependencies_respect_locked_versions() -> Result<()> {
");

uv_snapshot!(context.filters(), context.pip_install().arg(".")
.arg("--reinstall-package").arg("child").env(EnvVars::EXPECTED_ANYIO_VERSION, "3.7"), @"
.arg("--reinstall-package").arg("child").env(EnvVars::EXPECTED_ANYIO_VERSION, "3.7"), @r"
success: true
exit_code: 0
----- stdout -----

----- stderr -----
warning: The `extra-build-dependencies` option is experimental and may change without warning. Pass `--preview-features extra-build-dependencies` to disable this warning.
Resolved [N] packages in [TIME]
Prepared [N] packages in [TIME]
Uninstalled [N] packages in [TIME]
Expand All @@ -13073,24 +13070,6 @@ fn pip_install_build_dependencies_respect_locked_versions() -> Result<()> {
~ parent==0.1.0 (from file://[TEMP_DIR]/)
");

// With preview enabled, there's no warning
uv_snapshot!(context.filters(), context.pip_install().arg(".")
.arg("--preview-features").arg("extra-build-dependencies")
.arg("--reinstall-package").arg("child")
.env(EnvVars::EXPECTED_ANYIO_VERSION, "3.7"), @"
success: true
exit_code: 0
----- stdout -----

----- stderr -----
Resolved [N] packages in [TIME]
Prepared [N] packages in [TIME]
Uninstalled [N] packages in [TIME]
Installed [N] packages in [TIME]
~ child==0.1.0 (from file://[TEMP_DIR]/child)
~ parent==0.1.0 (from file://[TEMP_DIR]/)
");

Ok(())
}

Expand Down
Loading
Loading