diff --git a/Cargo.lock b/Cargo.lock index 3c3c9895d..5d54e27cf 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -5069,6 +5069,7 @@ dependencies = [ "uv-performance-memory-allocator", "uv-platform", "uv-platform-tags", + "uv-preview", "uv-publish", "uv-pypi-types", "uv-python", @@ -5148,6 +5149,7 @@ dependencies = [ "uv-pep440", "uv-pep508", "uv-platform-tags", + "uv-preview", "uv-pypi-types", "uv-python", "uv-resolver", @@ -5254,6 +5256,7 @@ dependencies = [ "uv-normalize", "uv-pep440", "uv-pep508", + "uv-preview", "uv-pypi-types", "uv-python", "uv-static", @@ -5334,6 +5337,7 @@ dependencies = [ "uv-install-wheel", "uv-normalize", "uv-pep508", + "uv-preview", "uv-pypi-types", "uv-python", "uv-redacted", @@ -5408,7 +5412,6 @@ name = "uv-configuration" version = "0.0.1" dependencies = [ "anyhow", - "bitflags 2.9.1", "clap", "either", "fs-err", @@ -5431,7 +5434,6 @@ dependencies = [ "uv-pep508", "uv-platform-tags", "uv-static", - "uv-warnings", ] [[package]] @@ -5481,6 +5483,7 @@ dependencies = [ "uv-options-metadata", "uv-pep508", "uv-performance-memory-allocator", + "uv-preview", "uv-pypi-types", "uv-python", "uv-settings", @@ -5524,6 +5527,7 @@ dependencies = [ "uv-install-wheel", "uv-installer", "uv-platform-tags", + "uv-preview", "uv-pypi-types", "uv-python", "uv-resolver", @@ -5764,11 +5768,11 @@ dependencies = [ "tempfile", "thiserror 2.0.12", "tracing", - "uv-configuration", "uv-distribution-filename", "uv-fs", "uv-normalize", "uv-pep440", + "uv-preview", "uv-pypi-types", "uv-shell", "uv-trampoline-builder", @@ -5807,6 +5811,7 @@ dependencies = [ "uv-pep440", "uv-pep508", "uv-platform-tags", + "uv-preview", "uv-pypi-types", "uv-python", "uv-redacted", @@ -5965,6 +5970,15 @@ dependencies = [ "uv-small-str", ] +[[package]] +name = "uv-preview" +version = "0.0.1" +dependencies = [ + "bitflags 2.9.1", + "thiserror 2.0.12", + "uv-warnings", +] + [[package]] name = "uv-publish" version = "0.1.0" @@ -6077,7 +6091,6 @@ dependencies = [ "uv-cache-info", "uv-cache-key", "uv-client", - "uv-configuration", "uv-dirs", "uv-distribution-filename", "uv-extract", @@ -6087,6 +6100,7 @@ dependencies = [ "uv-pep508", "uv-platform", "uv-platform-tags", + "uv-preview", "uv-pypi-types", "uv-redacted", "uv-state", @@ -6347,7 +6361,6 @@ dependencies = [ "toml_edit 0.23.2", "tracing", "uv-cache", - "uv-configuration", "uv-dirs", "uv-distribution-types", "uv-fs", @@ -6356,6 +6369,7 @@ dependencies = [ "uv-normalize", "uv-pep440", "uv-pep508", + "uv-preview", "uv-pypi-types", "uv-python", "uv-settings", @@ -6435,9 +6449,9 @@ dependencies = [ "self-replace", "thiserror 2.0.12", "tracing", - "uv-configuration", "uv-console", "uv-fs", + "uv-preview", "uv-pypi-types", "uv-python", "uv-shell", diff --git a/Cargo.toml b/Cargo.toml index 41f8b5d65..fae199a2f 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -52,6 +52,7 @@ uv-pep440 = { path = "crates/uv-pep440", features = ["tracing", "rkyv", "version uv-pep508 = { path = "crates/uv-pep508", features = ["non-pep508-extensions"] } uv-platform = { path = "crates/uv-platform" } uv-platform-tags = { path = "crates/uv-platform-tags" } +uv-preview = { path = "crates/uv-preview" } uv-publish = { path = "crates/uv-publish" } uv-pypi-types = { path = "crates/uv-pypi-types" } uv-python = { path = "crates/uv-python" } diff --git a/crates/uv-bench/Cargo.toml b/crates/uv-bench/Cargo.toml index e2664bf9c..05d06b960 100644 --- a/crates/uv-bench/Cargo.toml +++ b/crates/uv-bench/Cargo.toml @@ -35,6 +35,7 @@ uv-install-wheel = { workspace = true } uv-pep440 = { workspace = true } uv-pep508 = { workspace = true } uv-platform-tags = { workspace = true } +uv-preview = { workspace = true } uv-pypi-types = { workspace = true } uv-python = { workspace = true } uv-resolver = { workspace = true } diff --git a/crates/uv-bench/benches/uv.rs b/crates/uv-bench/benches/uv.rs index 62d122abb..edfcefa83 100644 --- a/crates/uv-bench/benches/uv.rs +++ b/crates/uv-bench/benches/uv.rs @@ -85,9 +85,7 @@ mod resolver { use uv_cache::Cache; use uv_client::RegistryClient; - use uv_configuration::{ - BuildOptions, Concurrency, Constraints, IndexStrategy, Preview, SourceStrategy, - }; + use uv_configuration::{BuildOptions, Concurrency, Constraints, IndexStrategy, SourceStrategy}; use uv_dispatch::{BuildDispatch, SharedState}; use uv_distribution::DistributionDatabase; use uv_distribution_types::{ @@ -98,6 +96,7 @@ mod resolver { use uv_pep440::Version; use uv_pep508::{MarkerEnvironment, MarkerEnvironmentBuilder}; use uv_platform_tags::{Arch, Os, Platform, Tags}; + use uv_preview::Preview; use uv_pypi_types::{Conflicts, ResolverMarkerEnvironment}; use uv_python::Interpreter; use uv_resolver::{ diff --git a/crates/uv-build-frontend/Cargo.toml b/crates/uv-build-frontend/Cargo.toml index 381aa2d81..5fd724f04 100644 --- a/crates/uv-build-frontend/Cargo.toml +++ b/crates/uv-build-frontend/Cargo.toml @@ -25,6 +25,7 @@ uv-fs = { workspace = true } uv-normalize = { workspace = true } uv-pep440 = { workspace = true } uv-pep508 = { workspace = true } +uv-preview = { workspace = true } uv-pypi-types = { workspace = true } uv-python = { workspace = true } uv-static = { workspace = true } diff --git a/crates/uv-build-frontend/src/lib.rs b/crates/uv-build-frontend/src/lib.rs index 1535b3f6c..987735b54 100644 --- a/crates/uv-build-frontend/src/lib.rs +++ b/crates/uv-build-frontend/src/lib.rs @@ -30,7 +30,6 @@ use tokio::sync::{Mutex, Semaphore}; use tracing::{Instrument, debug, info_span, instrument, warn}; use uv_cache_key::cache_digest; -use uv_configuration::Preview; use uv_configuration::{BuildKind, BuildOutput, SourceStrategy}; use uv_distribution::BuildRequires; use uv_distribution_types::{ @@ -41,6 +40,7 @@ use uv_fs::LockedFile; use uv_fs::{PythonExt, Simplified}; use uv_normalize::PackageName; use uv_pep440::Version; +use uv_preview::Preview; use uv_pypi_types::VerbatimParsedUrl; use uv_python::{Interpreter, PythonEnvironment}; use uv_static::EnvVars; diff --git a/crates/uv-cli/Cargo.toml b/crates/uv-cli/Cargo.toml index f0536951f..b9bc64797 100644 --- a/crates/uv-cli/Cargo.toml +++ b/crates/uv-cli/Cargo.toml @@ -23,6 +23,7 @@ uv-distribution-types = { workspace = true } uv-install-wheel = { workspace = true, features = ["clap"], default-features = false } uv-normalize = { workspace = true } uv-pep508 = { workspace = true } +uv-preview = { workspace = true } uv-pypi-types = { workspace = true } uv-python = { workspace = true, features = ["clap", "schemars"]} uv-redacted = { workspace = true } diff --git a/crates/uv-cli/src/lib.rs b/crates/uv-cli/src/lib.rs index 98c881add..c5c0bd3cb 100644 --- a/crates/uv-cli/src/lib.rs +++ b/crates/uv-cli/src/lib.rs @@ -10,8 +10,8 @@ use clap::{Args, Parser, Subcommand}; use uv_cache::CacheArgs; use uv_configuration::{ - ExportFormat, IndexStrategy, KeyringProviderType, PackageNameSpecifier, PreviewFeatures, - ProjectBuildBackend, TargetTriple, TrustedHost, TrustedPublishing, VersionControlSystem, + ExportFormat, IndexStrategy, KeyringProviderType, PackageNameSpecifier, ProjectBuildBackend, + TargetTriple, TrustedHost, TrustedPublishing, VersionControlSystem, }; use uv_distribution_types::{ ConfigSettingEntry, ConfigSettingPackageEntry, Index, IndexUrl, Origin, PipExtraIndex, @@ -19,6 +19,7 @@ use uv_distribution_types::{ }; use uv_normalize::{ExtraName, GroupName, PackageName, PipGroupName}; use uv_pep508::{MarkerTree, Requirement}; +use uv_preview::PreviewFeatures; use uv_pypi_types::VerbatimParsedUrl; use uv_python::{PythonDownloads, PythonPreference, PythonVersion}; use uv_redacted::DisplaySafeUrl; diff --git a/crates/uv-configuration/Cargo.toml b/crates/uv-configuration/Cargo.toml index 515ac217c..655a115a9 100644 --- a/crates/uv-configuration/Cargo.toml +++ b/crates/uv-configuration/Cargo.toml @@ -26,9 +26,6 @@ uv-pep440 = { workspace = true } uv-pep508 = { workspace = true, features = ["schemars"] } uv-platform-tags = { workspace = true } uv-static = { workspace = true } -uv-warnings = { workspace = true } - -bitflags = { workspace = true } clap = { workspace = true, features = ["derive"], optional = true } either = { workspace = true } fs-err = { workspace = true } diff --git a/crates/uv-configuration/src/lib.rs b/crates/uv-configuration/src/lib.rs index 7ba32e716..ec5514bf0 100644 --- a/crates/uv-configuration/src/lib.rs +++ b/crates/uv-configuration/src/lib.rs @@ -12,7 +12,6 @@ pub use install_options::*; pub use name_specifiers::*; pub use overrides::*; pub use package_options::*; -pub use preview::*; pub use project_build_backend::*; pub use required_version::*; pub use sources::*; @@ -36,7 +35,6 @@ mod install_options; mod name_specifiers; mod overrides; mod package_options; -mod preview; mod project_build_backend; mod required_version; mod sources; diff --git a/crates/uv-dev/Cargo.toml b/crates/uv-dev/Cargo.toml index 37fa0140a..23b571c6f 100644 --- a/crates/uv-dev/Cargo.toml +++ b/crates/uv-dev/Cargo.toml @@ -27,6 +27,7 @@ uv-installer = { workspace = true } uv-macros = { workspace = true } uv-options-metadata = { workspace = true } uv-pep508 = { workspace = true } +uv-preview = { workspace = true } uv-pypi-types = { workspace = true } uv-python = { workspace = true } uv-settings = { workspace = true, features = ["schemars"] } diff --git a/crates/uv-dev/src/compile.rs b/crates/uv-dev/src/compile.rs index af0e66339..9134a66a1 100644 --- a/crates/uv-dev/src/compile.rs +++ b/crates/uv-dev/src/compile.rs @@ -4,7 +4,8 @@ use clap::Parser; use tracing::info; use uv_cache::{Cache, CacheArgs}; -use uv_configuration::{Concurrency, Preview}; +use uv_configuration::Concurrency; +use uv_preview::Preview; use uv_python::{EnvironmentPreference, PythonEnvironment, PythonPreference, PythonRequest}; #[derive(Parser)] diff --git a/crates/uv-dispatch/Cargo.toml b/crates/uv-dispatch/Cargo.toml index 06cb2db15..fb9d572ed 100644 --- a/crates/uv-dispatch/Cargo.toml +++ b/crates/uv-dispatch/Cargo.toml @@ -29,6 +29,7 @@ uv-git = { workspace = true } uv-install-wheel = { workspace = true } uv-installer = { workspace = true } uv-platform-tags = { workspace = true } +uv-preview = { workspace = true } uv-pypi-types = { workspace = true } uv-python = { workspace = true } uv-resolver = { workspace = true } diff --git a/crates/uv-dispatch/src/lib.rs b/crates/uv-dispatch/src/lib.rs index f5b5f9f0f..a20c26ffb 100644 --- a/crates/uv-dispatch/src/lib.rs +++ b/crates/uv-dispatch/src/lib.rs @@ -17,7 +17,7 @@ use uv_build_frontend::{SourceBuild, SourceBuildContext}; use uv_cache::Cache; use uv_client::RegistryClient; use uv_configuration::{ - BuildKind, BuildOptions, Constraints, IndexStrategy, Preview, Reinstall, SourceStrategy, + BuildKind, BuildOptions, Constraints, IndexStrategy, Reinstall, SourceStrategy, }; use uv_configuration::{BuildOutput, Concurrency}; use uv_distribution::DistributionDatabase; @@ -29,6 +29,7 @@ use uv_distribution_types::{ }; use uv_git::GitResolver; use uv_installer::{Installer, Plan, Planner, Preparer, SitePackages}; +use uv_preview::Preview; use uv_pypi_types::Conflicts; use uv_python::{Interpreter, PythonEnvironment}; use uv_resolver::{ diff --git a/crates/uv-install-wheel/Cargo.toml b/crates/uv-install-wheel/Cargo.toml index e14bd348d..5af347ff4 100644 --- a/crates/uv-install-wheel/Cargo.toml +++ b/crates/uv-install-wheel/Cargo.toml @@ -21,11 +21,11 @@ doctest = false name = "uv_install_wheel" [dependencies] -uv-configuration = { workspace = true } uv-distribution-filename = { workspace = true } uv-fs = { workspace = true } uv-normalize = { workspace = true } uv-pep440 = { workspace = true } +uv-preview = { workspace = true } uv-pypi-types = { workspace = true } uv-shell = { workspace = true } uv-trampoline-builder = { workspace = true } diff --git a/crates/uv-install-wheel/src/linker.rs b/crates/uv-install-wheel/src/linker.rs index 93077e0f9..37b0590dc 100644 --- a/crates/uv-install-wheel/src/linker.rs +++ b/crates/uv-install-wheel/src/linker.rs @@ -10,9 +10,9 @@ use std::sync::{Arc, Mutex}; use std::time::SystemTime; use tempfile::tempdir_in; use tracing::{debug, instrument, trace}; -use uv_configuration::{Preview, PreviewFeatures}; use uv_distribution_filename::WheelFilename; use uv_fs::Simplified; +use uv_preview::{Preview, PreviewFeatures}; use uv_warnings::{warn_user, warn_user_once}; use walkdir::WalkDir; diff --git a/crates/uv-installer/Cargo.toml b/crates/uv-installer/Cargo.toml index de28a7252..1fe32ebe2 100644 --- a/crates/uv-installer/Cargo.toml +++ b/crates/uv-installer/Cargo.toml @@ -30,6 +30,7 @@ uv-normalize = { workspace = true } uv-pep440 = { workspace = true } uv-pep508 = { workspace = true } uv-platform-tags = { workspace = true } +uv-preview = { workspace = true } uv-pypi-types = { workspace = true } uv-python = { workspace = true } uv-redacted = { workspace = true } diff --git a/crates/uv-installer/src/installer.rs b/crates/uv-installer/src/installer.rs index 2fda2f32f..48c4275a1 100644 --- a/crates/uv-installer/src/installer.rs +++ b/crates/uv-installer/src/installer.rs @@ -7,9 +7,10 @@ use tokio::sync::oneshot; use tracing::instrument; use uv_cache::Cache; -use uv_configuration::{Preview, RAYON_INITIALIZE}; +use uv_configuration::RAYON_INITIALIZE; use uv_distribution_types::CachedDist; use uv_install_wheel::{Layout, LinkMode}; +use uv_preview::Preview; use uv_python::PythonEnvironment; pub struct Installer<'a> { diff --git a/crates/uv-preview/Cargo.toml b/crates/uv-preview/Cargo.toml new file mode 100644 index 000000000..c764093dc --- /dev/null +++ b/crates/uv-preview/Cargo.toml @@ -0,0 +1,27 @@ +[package] +name = "uv-preview" +version = "0.0.1" +edition = { workspace = true } +rust-version = { workspace = true } +homepage = { workspace = true } +documentation = { workspace = true } +repository = { workspace = true } +authors = { workspace = true } +license = { workspace = true } + +[lib] +doctest = false + +[lints] +workspace = true + +[dependencies] +uv-warnings = { workspace = true } + +bitflags = { workspace = true } +thiserror = { workspace = true } + +[dev-dependencies] + +[features] +default = [] diff --git a/crates/uv-configuration/src/preview.rs b/crates/uv-preview/src/lib.rs similarity index 100% rename from crates/uv-configuration/src/preview.rs rename to crates/uv-preview/src/lib.rs diff --git a/crates/uv-python/Cargo.toml b/crates/uv-python/Cargo.toml index 1c6f09b15..4e18d5337 100644 --- a/crates/uv-python/Cargo.toml +++ b/crates/uv-python/Cargo.toml @@ -20,7 +20,6 @@ uv-cache = { workspace = true } uv-cache-info = { workspace = true } uv-cache-key = { workspace = true } uv-client = { workspace = true } -uv-configuration = { workspace = true } uv-dirs = { workspace = true } uv-distribution-filename = { workspace = true } uv-extract = { workspace = true } @@ -30,6 +29,7 @@ uv-pep440 = { workspace = true } uv-pep508 = { workspace = true } uv-platform = { workspace = true } uv-platform-tags = { workspace = true } +uv-preview = { workspace = true } uv-pypi-types = { workspace = true } uv-redacted = { workspace = true } uv-state = { workspace = true } diff --git a/crates/uv-python/src/discovery.rs b/crates/uv-python/src/discovery.rs index d52563052..20a2fd2fb 100644 --- a/crates/uv-python/src/discovery.rs +++ b/crates/uv-python/src/discovery.rs @@ -8,7 +8,7 @@ use std::{env, io, iter}; use std::{path::Path, path::PathBuf, str::FromStr}; use thiserror::Error; use tracing::{debug, instrument, trace}; -use uv_configuration::Preview; +use uv_preview::Preview; use which::{which, which_all}; use uv_cache::Cache; diff --git a/crates/uv-python/src/environment.rs b/crates/uv-python/src/environment.rs index 5b880f317..88e306bc0 100644 --- a/crates/uv-python/src/environment.rs +++ b/crates/uv-python/src/environment.rs @@ -7,9 +7,9 @@ use owo_colors::OwoColorize; use tracing::debug; use uv_cache::Cache; -use uv_configuration::Preview; use uv_fs::{LockedFile, Simplified}; use uv_pep440::Version; +use uv_preview::Preview; use crate::discovery::find_python_installation; use crate::installation::PythonInstallation; diff --git a/crates/uv-python/src/installation.rs b/crates/uv-python/src/installation.rs index 6c4e59b3a..92585dd18 100644 --- a/crates/uv-python/src/installation.rs +++ b/crates/uv-python/src/installation.rs @@ -9,9 +9,9 @@ use tracing::{debug, info}; use uv_cache::Cache; use uv_client::BaseClientBuilder; -use uv_configuration::Preview; use uv_pep440::{Prerelease, Version}; use uv_platform::{Arch, Libc, Os, Platform}; +use uv_preview::Preview; use crate::discovery::{ EnvironmentPreference, PythonRequest, find_best_python_installation, find_python_installation, diff --git a/crates/uv-python/src/lib.rs b/crates/uv-python/src/lib.rs index a775c5df4..41d5ced80 100644 --- a/crates/uv-python/src/lib.rs +++ b/crates/uv-python/src/lib.rs @@ -132,7 +132,7 @@ mod tests { use indoc::{formatdoc, indoc}; use temp_env::with_vars; use test_log::test; - use uv_configuration::Preview; + use uv_preview::Preview; use uv_static::EnvVars; use uv_cache::Cache; diff --git a/crates/uv-python/src/managed.rs b/crates/uv-python/src/managed.rs index bedbcb4fe..d6b0f2fd5 100644 --- a/crates/uv-python/src/managed.rs +++ b/crates/uv-python/src/managed.rs @@ -13,7 +13,7 @@ use itertools::Itertools; use same_file::is_same_file; use thiserror::Error; use tracing::{debug, warn}; -use uv_configuration::{Preview, PreviewFeatures}; +use uv_preview::{Preview, PreviewFeatures}; #[cfg(windows)] use windows_sys::Win32::Storage::FileSystem::FILE_ATTRIBUTE_REPARSE_POINT; diff --git a/crates/uv-tool/Cargo.toml b/crates/uv-tool/Cargo.toml index 433caa997..108692cfa 100644 --- a/crates/uv-tool/Cargo.toml +++ b/crates/uv-tool/Cargo.toml @@ -17,7 +17,6 @@ workspace = true [dependencies] uv-cache = { workspace = true } -uv-configuration = { workspace = true } uv-dirs = { workspace = true } uv-distribution-types = { workspace = true } uv-fs = { workspace = true } @@ -26,6 +25,7 @@ uv-installer = { workspace = true } uv-normalize = { workspace = true } uv-pep440 = { workspace = true } uv-pep508 = { workspace = true } +uv-preview = { workspace = true } uv-pypi-types = { workspace = true } uv-python = { workspace = true } uv-settings = { workspace = true } diff --git a/crates/uv-tool/src/lib.rs b/crates/uv-tool/src/lib.rs index c2af9a5d2..2702fda6e 100644 --- a/crates/uv-tool/src/lib.rs +++ b/crates/uv-tool/src/lib.rs @@ -8,13 +8,13 @@ use thiserror::Error; use tracing::{debug, warn}; use uv_cache::Cache; -use uv_configuration::Preview; use uv_dirs::user_executable_directory; use uv_fs::{LockedFile, Simplified}; use uv_install_wheel::read_record_file; use uv_installer::SitePackages; use uv_normalize::{InvalidNameError, PackageName}; use uv_pep440::Version; +use uv_preview::Preview; use uv_python::{Interpreter, PythonEnvironment}; use uv_state::{StateBucket, StateStore}; use uv_static::EnvVars; diff --git a/crates/uv-virtualenv/Cargo.toml b/crates/uv-virtualenv/Cargo.toml index 84cb774b4..8c98f9ac3 100644 --- a/crates/uv-virtualenv/Cargo.toml +++ b/crates/uv-virtualenv/Cargo.toml @@ -20,9 +20,9 @@ doctest = false workspace = true [dependencies] -uv-configuration = { workspace = true } uv-console = { workspace = true } uv-fs = { workspace = true } +uv-preview = { workspace = true } uv-pypi-types = { workspace = true } uv-python = { workspace = true } uv-shell = { workspace = true } diff --git a/crates/uv-virtualenv/src/lib.rs b/crates/uv-virtualenv/src/lib.rs index 7c682627b..bf06c331f 100644 --- a/crates/uv-virtualenv/src/lib.rs +++ b/crates/uv-virtualenv/src/lib.rs @@ -3,7 +3,7 @@ use std::path::Path; use thiserror::Error; -use uv_configuration::Preview; +use uv_preview::Preview; use uv_python::{Interpreter, PythonEnvironment}; pub use virtualenv::{OnExisting, remove_virtualenv}; diff --git a/crates/uv-virtualenv/src/virtualenv.rs b/crates/uv-virtualenv/src/virtualenv.rs index fd0b64d4f..5b0c3cb34 100644 --- a/crates/uv-virtualenv/src/virtualenv.rs +++ b/crates/uv-virtualenv/src/virtualenv.rs @@ -12,8 +12,8 @@ use itertools::Itertools; use owo_colors::OwoColorize; use tracing::{debug, trace}; -use uv_configuration::Preview; use uv_fs::{CWD, Simplified, cachedir}; +use uv_preview::Preview; use uv_pypi_types::Scheme; use uv_python::managed::{PythonMinorVersionLink, create_link_to_executable}; use uv_python::{Interpreter, VirtualEnvironment}; diff --git a/crates/uv/Cargo.toml b/crates/uv/Cargo.toml index 501763ad2..e71c587ed 100644 --- a/crates/uv/Cargo.toml +++ b/crates/uv/Cargo.toml @@ -41,6 +41,7 @@ uv-pep508 = { workspace = true } uv-performance-memory-allocator = { path = "../uv-performance-memory-allocator", optional = true } uv-platform = { workspace = true } uv-platform-tags = { workspace = true } +uv-preview = { workspace = true } uv-publish = { workspace = true } uv-pypi-types = { workspace = true } uv-python = { workspace = true, features = ["schemars"] } diff --git a/crates/uv/src/commands/build_frontend.rs b/crates/uv/src/commands/build_frontend.rs index 61564ec99..b90ae0283 100644 --- a/crates/uv/src/commands/build_frontend.rs +++ b/crates/uv/src/commands/build_frontend.rs @@ -15,7 +15,7 @@ use uv_cache::{Cache, CacheBucket}; use uv_client::{BaseClientBuilder, FlatIndexClient, RegistryClientBuilder}; use uv_configuration::{ BuildIsolation, BuildKind, BuildOptions, BuildOutput, Concurrency, Constraints, - DependencyGroupsWithDefaults, HashCheckingMode, IndexStrategy, KeyringProviderType, Preview, + DependencyGroupsWithDefaults, HashCheckingMode, IndexStrategy, KeyringProviderType, SourceStrategy, }; use uv_dispatch::{BuildDispatch, SharedState}; @@ -31,6 +31,7 @@ use uv_fs::{Simplified, relative_to}; use uv_install_wheel::LinkMode; use uv_normalize::PackageName; use uv_pep440::Version; +use uv_preview::Preview; use uv_python::{ EnvironmentPreference, PythonDownloads, PythonEnvironment, PythonInstallation, PythonPreference, PythonRequest, PythonVariant, PythonVersionFile, VersionFileDiscoveryOptions, diff --git a/crates/uv/src/commands/pip/check.rs b/crates/uv/src/commands/pip/check.rs index 86c00885d..aa19af3b1 100644 --- a/crates/uv/src/commands/pip/check.rs +++ b/crates/uv/src/commands/pip/check.rs @@ -5,9 +5,9 @@ use anyhow::Result; use owo_colors::OwoColorize; use uv_cache::Cache; -use uv_configuration::Preview; use uv_distribution_types::{Diagnostic, InstalledDist}; use uv_installer::{SitePackages, SitePackagesDiagnostic}; +use uv_preview::Preview; use uv_python::PythonPreference; use uv_python::{EnvironmentPreference, PythonEnvironment, PythonRequest}; diff --git a/crates/uv/src/commands/pip/compile.rs b/crates/uv/src/commands/pip/compile.rs index 5b1a32400..9c705aa2a 100644 --- a/crates/uv/src/commands/pip/compile.rs +++ b/crates/uv/src/commands/pip/compile.rs @@ -14,7 +14,7 @@ use uv_cache::Cache; use uv_client::{BaseClientBuilder, FlatIndexClient, RegistryClientBuilder}; use uv_configuration::{ BuildIsolation, BuildOptions, Concurrency, Constraints, ExportFormat, ExtrasSpecification, - IndexStrategy, NoBinary, NoBuild, Preview, PreviewFeatures, Reinstall, SourceStrategy, Upgrade, + IndexStrategy, NoBinary, NoBuild, Reinstall, SourceStrategy, Upgrade, }; use uv_configuration::{KeyringProviderType, TargetTriple}; use uv_dispatch::{BuildDispatch, SharedState}; @@ -28,6 +28,7 @@ use uv_fs::{CWD, Simplified}; use uv_git::ResolvedRepositoryReference; use uv_install_wheel::LinkMode; use uv_normalize::PackageName; +use uv_preview::{Preview, PreviewFeatures}; use uv_pypi_types::{Conflicts, SupportedEnvironments}; use uv_python::{ EnvironmentPreference, PythonEnvironment, PythonInstallation, PythonPreference, PythonRequest, diff --git a/crates/uv/src/commands/pip/freeze.rs b/crates/uv/src/commands/pip/freeze.rs index 87be582e6..8070b72a9 100644 --- a/crates/uv/src/commands/pip/freeze.rs +++ b/crates/uv/src/commands/pip/freeze.rs @@ -6,9 +6,9 @@ use itertools::Itertools; use owo_colors::OwoColorize; use uv_cache::Cache; -use uv_configuration::Preview; use uv_distribution_types::{Diagnostic, InstalledDist, Name}; use uv_installer::SitePackages; +use uv_preview::Preview; use uv_python::PythonPreference; use uv_python::{EnvironmentPreference, PythonEnvironment, PythonRequest}; diff --git a/crates/uv/src/commands/pip/install.rs b/crates/uv/src/commands/pip/install.rs index 456e664e6..0fca63c1a 100644 --- a/crates/uv/src/commands/pip/install.rs +++ b/crates/uv/src/commands/pip/install.rs @@ -10,7 +10,7 @@ use uv_cache::Cache; use uv_client::{BaseClientBuilder, FlatIndexClient, RegistryClientBuilder}; use uv_configuration::{ BuildIsolation, BuildOptions, Concurrency, Constraints, DryRun, ExtrasSpecification, - HashCheckingMode, IndexStrategy, Preview, PreviewFeatures, Reinstall, SourceStrategy, Upgrade, + HashCheckingMode, IndexStrategy, Reinstall, SourceStrategy, Upgrade, }; use uv_configuration::{KeyringProviderType, TargetTriple}; use uv_dispatch::{BuildDispatch, SharedState}; @@ -24,6 +24,7 @@ use uv_fs::Simplified; use uv_install_wheel::LinkMode; use uv_installer::{SatisfiesResult, SitePackages}; use uv_normalize::{DefaultExtras, DefaultGroups}; +use uv_preview::{Preview, PreviewFeatures}; use uv_pypi_types::Conflicts; use uv_python::{ EnvironmentPreference, Prefix, PythonEnvironment, PythonInstallation, PythonPreference, diff --git a/crates/uv/src/commands/pip/list.rs b/crates/uv/src/commands/pip/list.rs index 95c1aa372..3c6061d97 100644 --- a/crates/uv/src/commands/pip/list.rs +++ b/crates/uv/src/commands/pip/list.rs @@ -15,7 +15,7 @@ use uv_cache::{Cache, Refresh}; use uv_cache_info::Timestamp; use uv_cli::ListFormat; use uv_client::{BaseClientBuilder, RegistryClientBuilder}; -use uv_configuration::{Concurrency, IndexStrategy, KeyringProviderType, Preview}; +use uv_configuration::{Concurrency, IndexStrategy, KeyringProviderType}; use uv_distribution_filename::DistFilename; use uv_distribution_types::{ Diagnostic, IndexCapabilities, IndexLocations, InstalledDist, Name, RequiresPython, @@ -24,6 +24,7 @@ use uv_fs::Simplified; use uv_installer::SitePackages; use uv_normalize::PackageName; use uv_pep440::Version; +use uv_preview::Preview; use uv_python::PythonRequest; use uv_python::{EnvironmentPreference, PythonEnvironment, PythonPreference}; use uv_resolver::{ExcludeNewer, PrereleaseMode}; diff --git a/crates/uv/src/commands/pip/operations.rs b/crates/uv/src/commands/pip/operations.rs index 58a614f6f..f241bfedd 100644 --- a/crates/uv/src/commands/pip/operations.rs +++ b/crates/uv/src/commands/pip/operations.rs @@ -29,6 +29,7 @@ use uv_installer::{Plan, Planner, Preparer, SitePackages}; use uv_normalize::PackageName; use uv_pep508::{MarkerEnvironment, RequirementOrigin}; use uv_platform_tags::Tags; +use uv_preview::Preview; use uv_pypi_types::{Conflicts, ResolverMarkerEnvironment}; use uv_python::{PythonEnvironment, PythonInstallation}; use uv_requirements::{ @@ -449,7 +450,7 @@ pub(crate) async fn install( installer_metadata: bool, dry_run: DryRun, printer: Printer, - preview: uv_configuration::Preview, + preview: Preview, ) -> Result { let start = std::time::Instant::now(); @@ -618,7 +619,7 @@ async fn execute_plan( logger: &dyn InstallLogger, installer_metadata: bool, printer: Printer, - preview: uv_configuration::Preview, + preview: Preview, ) -> Result<(Vec, Vec), Error> { let Plan { cached, diff --git a/crates/uv/src/commands/pip/show.rs b/crates/uv/src/commands/pip/show.rs index 8597f910e..4b412d2b5 100644 --- a/crates/uv/src/commands/pip/show.rs +++ b/crates/uv/src/commands/pip/show.rs @@ -7,12 +7,12 @@ use owo_colors::OwoColorize; use rustc_hash::FxHashMap; use uv_cache::Cache; -use uv_configuration::Preview; use uv_distribution_types::{Diagnostic, Name}; use uv_fs::Simplified; use uv_install_wheel::read_record_file; use uv_installer::SitePackages; use uv_normalize::PackageName; +use uv_preview::Preview; use uv_python::{EnvironmentPreference, PythonEnvironment, PythonPreference, PythonRequest}; use crate::commands::ExitStatus; diff --git a/crates/uv/src/commands/pip/sync.rs b/crates/uv/src/commands/pip/sync.rs index 46d5a5e0e..5e8696413 100644 --- a/crates/uv/src/commands/pip/sync.rs +++ b/crates/uv/src/commands/pip/sync.rs @@ -9,7 +9,7 @@ use uv_cache::Cache; use uv_client::{BaseClientBuilder, FlatIndexClient, RegistryClientBuilder}; use uv_configuration::{ BuildIsolation, BuildOptions, Concurrency, Constraints, DryRun, ExtrasSpecification, - HashCheckingMode, IndexStrategy, Preview, PreviewFeatures, Reinstall, SourceStrategy, Upgrade, + HashCheckingMode, IndexStrategy, Reinstall, SourceStrategy, Upgrade, }; use uv_configuration::{KeyringProviderType, TargetTriple}; use uv_dispatch::{BuildDispatch, SharedState}; @@ -22,6 +22,7 @@ use uv_fs::Simplified; use uv_install_wheel::LinkMode; use uv_installer::SitePackages; use uv_normalize::{DefaultExtras, DefaultGroups}; +use uv_preview::{Preview, PreviewFeatures}; use uv_pypi_types::Conflicts; use uv_python::{ EnvironmentPreference, Prefix, PythonEnvironment, PythonInstallation, PythonPreference, diff --git a/crates/uv/src/commands/pip/tree.rs b/crates/uv/src/commands/pip/tree.rs index be8629d8d..671992543 100644 --- a/crates/uv/src/commands/pip/tree.rs +++ b/crates/uv/src/commands/pip/tree.rs @@ -13,12 +13,13 @@ use tokio::sync::Semaphore; use uv_cache::{Cache, Refresh}; use uv_cache_info::Timestamp; use uv_client::{BaseClientBuilder, RegistryClientBuilder}; -use uv_configuration::{Concurrency, IndexStrategy, KeyringProviderType, Preview}; +use uv_configuration::{Concurrency, IndexStrategy, KeyringProviderType}; use uv_distribution_types::{Diagnostic, IndexCapabilities, IndexLocations, Name, RequiresPython}; use uv_installer::SitePackages; use uv_normalize::PackageName; use uv_pep440::Version; use uv_pep508::{Requirement, VersionOrUrl}; +use uv_preview::Preview; use uv_pypi_types::{ResolutionMetadata, ResolverMarkerEnvironment, VerbatimParsedUrl}; use uv_python::{EnvironmentPreference, PythonEnvironment, PythonPreference, PythonRequest}; use uv_resolver::{ExcludeNewer, PrereleaseMode}; diff --git a/crates/uv/src/commands/pip/uninstall.rs b/crates/uv/src/commands/pip/uninstall.rs index 2c2b617a2..657424a32 100644 --- a/crates/uv/src/commands/pip/uninstall.rs +++ b/crates/uv/src/commands/pip/uninstall.rs @@ -7,11 +7,12 @@ use tracing::{debug, warn}; use uv_cache::Cache; use uv_client::BaseClientBuilder; -use uv_configuration::{DryRun, KeyringProviderType, Preview}; +use uv_configuration::{DryRun, KeyringProviderType}; use uv_distribution_types::Requirement; use uv_distribution_types::{InstalledMetadata, Name, UnresolvedRequirement}; use uv_fs::Simplified; use uv_pep508::UnnamedRequirement; +use uv_preview::Preview; use uv_pypi_types::VerbatimParsedUrl; use uv_python::PythonRequest; use uv_python::{EnvironmentPreference, PythonPreference}; diff --git a/crates/uv/src/commands/project/add.rs b/crates/uv/src/commands/project/add.rs index c6b9a7f94..c383744c9 100644 --- a/crates/uv/src/commands/project/add.rs +++ b/crates/uv/src/commands/project/add.rs @@ -18,8 +18,8 @@ use uv_cache_key::RepositoryUrl; use uv_client::{BaseClientBuilder, FlatIndexClient, RegistryClientBuilder}; use uv_configuration::{ Concurrency, Constraints, DependencyGroups, DependencyGroupsWithDefaults, DevMode, DryRun, - EditableMode, ExtrasSpecification, ExtrasSpecificationWithDefaults, InstallOptions, Preview, - PreviewFeatures, SourceStrategy, + EditableMode, ExtrasSpecification, ExtrasSpecificationWithDefaults, InstallOptions, + SourceStrategy, }; use uv_dispatch::BuildDispatch; use uv_distribution::{DistributionDatabase, LoweredExtraBuildDependencies}; @@ -32,6 +32,7 @@ use uv_git::GIT_STORE; use uv_git_types::GitReference; use uv_normalize::{DEV_DEPENDENCIES, DefaultExtras, DefaultGroups, ExtraName, PackageName}; use uv_pep508::{MarkerTree, UnnamedRequirement, VersionOrUrl}; +use uv_preview::{Preview, PreviewFeatures}; use uv_pypi_types::{ParsedUrl, VerbatimParsedUrl}; use uv_python::{Interpreter, PythonDownloads, PythonEnvironment, PythonPreference, PythonRequest}; use uv_redacted::DisplaySafeUrl; diff --git a/crates/uv/src/commands/project/environment.rs b/crates/uv/src/commands/project/environment.rs index 675b1a960..732b83b56 100644 --- a/crates/uv/src/commands/project/environment.rs +++ b/crates/uv/src/commands/project/environment.rs @@ -12,9 +12,10 @@ use crate::settings::{NetworkSettings, ResolverInstallerSettings}; use uv_cache::{Cache, CacheBucket}; use uv_cache_key::{cache_digest, hash_digest}; -use uv_configuration::{Concurrency, Constraints, Preview}; +use uv_configuration::{Concurrency, Constraints}; use uv_distribution_types::{Name, Resolution}; use uv_fs::PythonExt; +use uv_preview::Preview; use uv_python::{Interpreter, PythonEnvironment, canonicalize_executable}; /// An ephemeral [`PythonEnvironment`] for running an individual command. diff --git a/crates/uv/src/commands/project/export.rs b/crates/uv/src/commands/project/export.rs index 5641ade36..35467df55 100644 --- a/crates/uv/src/commands/project/export.rs +++ b/crates/uv/src/commands/project/export.rs @@ -9,9 +9,9 @@ use owo_colors::OwoColorize; use uv_cache::Cache; use uv_configuration::{ Concurrency, DependencyGroups, EditableMode, ExportFormat, ExtrasSpecification, InstallOptions, - Preview, }; use uv_normalize::{DefaultExtras, DefaultGroups, PackageName}; +use uv_preview::Preview; use uv_python::{PythonDownloads, PythonPreference, PythonRequest}; use uv_requirements::is_pylock_toml; use uv_resolver::{PylockToml, RequirementsTxtExport}; diff --git a/crates/uv/src/commands/project/format.rs b/crates/uv/src/commands/project/format.rs index ceea36135..5cd47806c 100644 --- a/crates/uv/src/commands/project/format.rs +++ b/crates/uv/src/commands/project/format.rs @@ -7,8 +7,8 @@ use tokio::process::Command; use uv_bin_install::{Binary, bin_install}; use uv_cache::Cache; use uv_client::BaseClientBuilder; -use uv_configuration::{Preview, PreviewFeatures}; use uv_pep440::Version; +use uv_preview::{Preview, PreviewFeatures}; use uv_warnings::warn_user; use uv_workspace::{DiscoveryOptions, VirtualProject, WorkspaceCache}; diff --git a/crates/uv/src/commands/project/init.rs b/crates/uv/src/commands/project/init.rs index 1aaa11f3f..257eb7935 100644 --- a/crates/uv/src/commands/project/init.rs +++ b/crates/uv/src/commands/project/init.rs @@ -12,14 +12,14 @@ use uv_cache::Cache; use uv_cli::AuthorFrom; use uv_client::BaseClientBuilder; use uv_configuration::{ - DependencyGroupsWithDefaults, Preview, ProjectBuildBackend, VersionControlError, - VersionControlSystem, + DependencyGroupsWithDefaults, ProjectBuildBackend, VersionControlError, VersionControlSystem, }; use uv_distribution_types::RequiresPython; use uv_fs::{CWD, Simplified}; use uv_git::GIT; use uv_normalize::PackageName; use uv_pep440::Version; +use uv_preview::Preview; use uv_python::{ EnvironmentPreference, PythonDownloads, PythonEnvironment, PythonInstallation, PythonPreference, PythonRequest, PythonVariant, PythonVersionFile, VersionFileDiscoveryOptions, diff --git a/crates/uv/src/commands/project/lock.rs b/crates/uv/src/commands/project/lock.rs index 54c38c589..4dcf9b4a3 100644 --- a/crates/uv/src/commands/project/lock.rs +++ b/crates/uv/src/commands/project/lock.rs @@ -12,8 +12,8 @@ use tracing::debug; use uv_cache::Cache; use uv_client::{BaseClientBuilder, FlatIndexClient, RegistryClientBuilder}; use uv_configuration::{ - Concurrency, Constraints, DependencyGroupsWithDefaults, DryRun, ExtrasSpecification, Preview, - PreviewFeatures, Reinstall, Upgrade, + Concurrency, Constraints, DependencyGroupsWithDefaults, DryRun, ExtrasSpecification, Reinstall, + Upgrade, }; use uv_dispatch::BuildDispatch; use uv_distribution::{DistributionDatabase, LoweredExtraBuildDependencies}; @@ -24,6 +24,7 @@ use uv_distribution_types::{ use uv_git::ResolvedRepositoryReference; use uv_normalize::{GroupName, PackageName}; use uv_pep440::Version; +use uv_preview::{Preview, PreviewFeatures}; use uv_pypi_types::{ConflictKind, Conflicts, SupportedEnvironments}; use uv_python::{Interpreter, PythonDownloads, PythonEnvironment, PythonPreference, PythonRequest}; use uv_requirements::ExtrasResolver; diff --git a/crates/uv/src/commands/project/mod.rs b/crates/uv/src/commands/project/mod.rs index 4807b8fb4..5f125b7d9 100644 --- a/crates/uv/src/commands/project/mod.rs +++ b/crates/uv/src/commands/project/mod.rs @@ -12,8 +12,8 @@ use uv_cache::{Cache, CacheBucket}; use uv_cache_key::cache_digest; use uv_client::{BaseClientBuilder, FlatIndexClient, RegistryClientBuilder}; use uv_configuration::{ - Concurrency, Constraints, DependencyGroupsWithDefaults, DryRun, ExtrasSpecification, Preview, - PreviewFeatures, Reinstall, Upgrade, + Concurrency, Constraints, DependencyGroupsWithDefaults, DryRun, ExtrasSpecification, Reinstall, + Upgrade, }; use uv_dispatch::{BuildDispatch, SharedState}; use uv_distribution::{DistributionDatabase, LoweredExtraBuildDependencies, LoweredRequirement}; @@ -27,6 +27,7 @@ use uv_installer::{SatisfiesResult, SitePackages}; use uv_normalize::{DEV_DEPENDENCIES, DefaultGroups, ExtraName, GroupName, PackageName}; use uv_pep440::{TildeVersionSpecifier, Version, VersionSpecifiers}; use uv_pep508::MarkerTreeContents; +use uv_preview::{Preview, PreviewFeatures}; use uv_pypi_types::{ConflictItem, ConflictKind, ConflictSet, Conflicts}; use uv_python::{ EnvironmentPreference, Interpreter, InvalidEnvironmentKind, PythonDownloads, PythonEnvironment, diff --git a/crates/uv/src/commands/project/remove.rs b/crates/uv/src/commands/project/remove.rs index 0cf840983..ccb05fc02 100644 --- a/crates/uv/src/commands/project/remove.rs +++ b/crates/uv/src/commands/project/remove.rs @@ -10,11 +10,11 @@ use tracing::{debug, warn}; use uv_cache::Cache; use uv_configuration::{ Concurrency, DependencyGroups, DryRun, EditableMode, ExtrasSpecification, InstallOptions, - Preview, }; use uv_fs::Simplified; use uv_normalize::PackageName; use uv_normalize::{DEV_DEPENDENCIES, DefaultExtras, DefaultGroups}; +use uv_preview::Preview; use uv_python::{PythonDownloads, PythonPreference, PythonRequest}; use uv_scripts::{Pep723Metadata, Pep723Script}; use uv_settings::PythonInstallMirrors; diff --git a/crates/uv/src/commands/project/run.rs b/crates/uv/src/commands/project/run.rs index 11d126f74..0bdc071c0 100644 --- a/crates/uv/src/commands/project/run.rs +++ b/crates/uv/src/commands/project/run.rs @@ -19,7 +19,7 @@ use uv_cli::ExternalCommand; use uv_client::BaseClientBuilder; use uv_configuration::{ Concurrency, Constraints, DependencyGroups, DryRun, EditableMode, ExtrasSpecification, - InstallOptions, Preview, + InstallOptions, }; use uv_distribution::LoweredExtraBuildDependencies; use uv_distribution_types::Requirement; @@ -27,6 +27,7 @@ use uv_fs::which::is_executable; use uv_fs::{PythonExt, Simplified, create_symlink}; use uv_installer::{SatisfiesResult, SitePackages}; use uv_normalize::{DefaultExtras, DefaultGroups, PackageName}; +use uv_preview::Preview; use uv_python::{ EnvironmentPreference, Interpreter, PyVenvConfiguration, PythonDownloads, PythonEnvironment, PythonInstallation, PythonPreference, PythonRequest, PythonVersionFile, diff --git a/crates/uv/src/commands/project/sync.rs b/crates/uv/src/commands/project/sync.rs index 3eb07d79b..1d22b852c 100644 --- a/crates/uv/src/commands/project/sync.rs +++ b/crates/uv/src/commands/project/sync.rs @@ -14,7 +14,7 @@ use uv_client::{BaseClientBuilder, FlatIndexClient, RegistryClientBuilder}; use uv_configuration::{ Concurrency, Constraints, DependencyGroups, DependencyGroupsWithDefaults, DryRun, EditableMode, ExtrasSpecification, ExtrasSpecificationWithDefaults, HashCheckingMode, InstallOptions, - Preview, PreviewFeatures, TargetTriple, Upgrade, + TargetTriple, Upgrade, }; use uv_dispatch::BuildDispatch; use uv_distribution::LoweredExtraBuildDependencies; @@ -25,6 +25,7 @@ use uv_fs::{PortablePathBuf, Simplified}; use uv_installer::SitePackages; use uv_normalize::{DefaultExtras, DefaultGroups, PackageName}; use uv_pep508::{MarkerTree, VersionOrUrl}; +use uv_preview::{Preview, PreviewFeatures}; use uv_pypi_types::{ParsedArchiveUrl, ParsedGitUrl, ParsedUrl}; use uv_python::{PythonDownloads, PythonEnvironment, PythonPreference, PythonRequest}; use uv_resolver::{FlatIndex, ForkStrategy, Installable, Lock, PrereleaseMode, ResolutionMode}; diff --git a/crates/uv/src/commands/project/tree.rs b/crates/uv/src/commands/project/tree.rs index ca0ce8660..32cad123d 100644 --- a/crates/uv/src/commands/project/tree.rs +++ b/crates/uv/src/commands/project/tree.rs @@ -7,10 +7,11 @@ use tokio::sync::Semaphore; use uv_cache::{Cache, Refresh}; use uv_cache_info::Timestamp; use uv_client::RegistryClientBuilder; -use uv_configuration::{Concurrency, DependencyGroups, Preview, TargetTriple}; +use uv_configuration::{Concurrency, DependencyGroups, TargetTriple}; use uv_distribution_types::IndexCapabilities; use uv_normalize::DefaultGroups; use uv_normalize::PackageName; +use uv_preview::Preview; use uv_python::{PythonDownloads, PythonPreference, PythonRequest, PythonVersion}; use uv_resolver::{PackageMap, TreeDisplay}; use uv_scripts::Pep723Script; diff --git a/crates/uv/src/commands/project/version.rs b/crates/uv/src/commands/project/version.rs index 8e4454043..18193665f 100644 --- a/crates/uv/src/commands/project/version.rs +++ b/crates/uv/src/commands/project/version.rs @@ -11,12 +11,13 @@ use uv_cli::version::VersionInfo; use uv_cli::{VersionBump, VersionFormat}; use uv_configuration::{ Concurrency, DependencyGroups, DependencyGroupsWithDefaults, DryRun, EditableMode, - ExtrasSpecification, InstallOptions, Preview, + ExtrasSpecification, InstallOptions, }; use uv_fs::Simplified; use uv_normalize::DefaultExtras; use uv_normalize::PackageName; use uv_pep440::{BumpCommand, PrereleaseKind, Version}; +use uv_preview::Preview; use uv_python::{PythonDownloads, PythonPreference, PythonRequest}; use uv_settings::PythonInstallMirrors; use uv_workspace::pyproject_mut::Error; diff --git a/crates/uv/src/commands/python/find.rs b/crates/uv/src/commands/python/find.rs index 806e670a8..8e3c0f6d7 100644 --- a/crates/uv/src/commands/python/find.rs +++ b/crates/uv/src/commands/python/find.rs @@ -3,8 +3,9 @@ use std::fmt::Write; use std::path::Path; use uv_cache::Cache; -use uv_configuration::{DependencyGroupsWithDefaults, Preview}; +use uv_configuration::DependencyGroupsWithDefaults; use uv_fs::Simplified; +use uv_preview::Preview; use uv_python::{ EnvironmentPreference, PythonDownloads, PythonInstallation, PythonPreference, PythonRequest, }; diff --git a/crates/uv/src/commands/python/install.rs b/crates/uv/src/commands/python/install.rs index 4bdeab474..e6db0e8d7 100644 --- a/crates/uv/src/commands/python/install.rs +++ b/crates/uv/src/commands/python/install.rs @@ -14,9 +14,9 @@ use owo_colors::{AnsiColors, OwoColorize}; use rustc_hash::{FxHashMap, FxHashSet}; use tracing::{debug, trace}; -use uv_configuration::{Preview, PreviewFeatures}; use uv_fs::Simplified; use uv_platform::{Arch, Libc}; +use uv_preview::{Preview, PreviewFeatures}; use uv_python::downloads::{ self, ArchRequest, DownloadResult, ManagedPythonDownload, PythonDownloadRequest, }; diff --git a/crates/uv/src/commands/python/list.rs b/crates/uv/src/commands/python/list.rs index c30eecf83..03f8b2584 100644 --- a/crates/uv/src/commands/python/list.rs +++ b/crates/uv/src/commands/python/list.rs @@ -2,8 +2,8 @@ use serde::Serialize; use std::collections::BTreeSet; use std::fmt::Write; use uv_cli::PythonListFormat; -use uv_configuration::Preview; use uv_pep440::Version; +use uv_preview::Preview; use anyhow::Result; use itertools::Either; diff --git a/crates/uv/src/commands/python/pin.rs b/crates/uv/src/commands/python/pin.rs index 064cc780c..07b0cd090 100644 --- a/crates/uv/src/commands/python/pin.rs +++ b/crates/uv/src/commands/python/pin.rs @@ -8,8 +8,9 @@ use tracing::debug; use uv_cache::Cache; use uv_client::BaseClientBuilder; -use uv_configuration::{DependencyGroupsWithDefaults, Preview}; +use uv_configuration::DependencyGroupsWithDefaults; use uv_fs::Simplified; +use uv_preview::Preview; use uv_python::{ EnvironmentPreference, PYTHON_VERSION_FILENAME, PythonDownloads, PythonInstallation, PythonPreference, PythonRequest, PythonVersionFile, VersionFileDiscoveryOptions, diff --git a/crates/uv/src/commands/python/uninstall.rs b/crates/uv/src/commands/python/uninstall.rs index b58b5831a..bb4bc5a15 100644 --- a/crates/uv/src/commands/python/uninstall.rs +++ b/crates/uv/src/commands/python/uninstall.rs @@ -11,8 +11,8 @@ use owo_colors::OwoColorize; use rustc_hash::{FxHashMap, FxHashSet}; use tracing::{debug, warn}; -use uv_configuration::Preview; use uv_fs::Simplified; +use uv_preview::Preview; use uv_python::downloads::PythonDownloadRequest; use uv_python::managed::{ ManagedPythonInstallations, PythonMinorVersionLink, python_executable_dir, diff --git a/crates/uv/src/commands/tool/common.rs b/crates/uv/src/commands/tool/common.rs index 245b0ee2c..8368548a9 100644 --- a/crates/uv/src/commands/tool/common.rs +++ b/crates/uv/src/commands/tool/common.rs @@ -10,7 +10,6 @@ use std::{ use tracing::{debug, warn}; use uv_cache::Cache; use uv_client::BaseClientBuilder; -use uv_configuration::Preview; use uv_distribution_types::Requirement; use uv_distribution_types::{InstalledDist, Name}; use uv_fs::Simplified; @@ -19,6 +18,7 @@ use uv_fs::replace_symlink; use uv_installer::SitePackages; use uv_normalize::PackageName; use uv_pep440::{Version, VersionSpecifier, VersionSpecifiers}; +use uv_preview::Preview; use uv_python::{ EnvironmentPreference, Interpreter, PythonDownloads, PythonEnvironment, PythonInstallation, PythonPreference, PythonRequest, PythonVariant, VersionRequest, diff --git a/crates/uv/src/commands/tool/dir.rs b/crates/uv/src/commands/tool/dir.rs index 7f937e35e..d08f27199 100644 --- a/crates/uv/src/commands/tool/dir.rs +++ b/crates/uv/src/commands/tool/dir.rs @@ -2,8 +2,8 @@ use anstream::println; use anyhow::Context; use owo_colors::OwoColorize; -use uv_configuration::Preview; use uv_fs::Simplified; +use uv_preview::Preview; use uv_tool::{InstalledTools, tool_executable_dir}; /// Show the tool directory. diff --git a/crates/uv/src/commands/tool/install.rs b/crates/uv/src/commands/tool/install.rs index d464aca8c..43e627ffe 100644 --- a/crates/uv/src/commands/tool/install.rs +++ b/crates/uv/src/commands/tool/install.rs @@ -8,7 +8,7 @@ use tracing::{debug, trace}; use uv_cache::{Cache, Refresh}; use uv_cache_info::Timestamp; use uv_client::BaseClientBuilder; -use uv_configuration::{Concurrency, Constraints, DryRun, Preview, Reinstall, Upgrade}; +use uv_configuration::{Concurrency, Constraints, DryRun, Reinstall, Upgrade}; use uv_distribution_types::{ ExtraBuildRequires, NameRequirementSpecification, Requirement, RequirementSource, UnresolvedRequirementSpecification, @@ -16,6 +16,7 @@ use uv_distribution_types::{ use uv_normalize::PackageName; use uv_pep440::{VersionSpecifier, VersionSpecifiers}; use uv_pep508::MarkerTree; +use uv_preview::Preview; use uv_python::{ EnvironmentPreference, PythonDownloads, PythonInstallation, PythonPreference, PythonRequest, }; diff --git a/crates/uv/src/commands/tool/run.rs b/crates/uv/src/commands/tool/run.rs index 09c1ced26..89c3ed79c 100644 --- a/crates/uv/src/commands/tool/run.rs +++ b/crates/uv/src/commands/tool/run.rs @@ -16,8 +16,8 @@ use uv_cache::{Cache, Refresh}; use uv_cache_info::Timestamp; use uv_cli::ExternalCommand; use uv_client::BaseClientBuilder; +use uv_configuration::Concurrency; use uv_configuration::Constraints; -use uv_configuration::{Concurrency, Preview}; use uv_distribution::LoweredExtraBuildDependencies; use uv_distribution_types::InstalledDist; use uv_distribution_types::{ @@ -29,6 +29,7 @@ use uv_installer::{SatisfiesResult, SitePackages}; use uv_normalize::PackageName; use uv_pep440::{VersionSpecifier, VersionSpecifiers}; use uv_pep508::MarkerTree; +use uv_preview::Preview; use uv_python::{ EnvironmentPreference, PythonDownloads, PythonEnvironment, PythonInstallation, PythonPreference, PythonRequest, diff --git a/crates/uv/src/commands/tool/upgrade.rs b/crates/uv/src/commands/tool/upgrade.rs index 4c62e15d6..b84aca3e8 100644 --- a/crates/uv/src/commands/tool/upgrade.rs +++ b/crates/uv/src/commands/tool/upgrade.rs @@ -8,10 +8,11 @@ use tracing::{debug, trace}; use uv_cache::Cache; use uv_client::BaseClientBuilder; -use uv_configuration::{Concurrency, Constraints, DryRun, Preview}; +use uv_configuration::{Concurrency, Constraints, DryRun}; use uv_distribution_types::{ExtraBuildRequires, Requirement}; use uv_fs::CWD; use uv_normalize::PackageName; +use uv_preview::Preview; use uv_python::{ EnvironmentPreference, Interpreter, PythonDownloads, PythonInstallation, PythonPreference, PythonRequest, diff --git a/crates/uv/src/commands/venv.rs b/crates/uv/src/commands/venv.rs index f54f3be59..c47ee7d58 100644 --- a/crates/uv/src/commands/venv.rs +++ b/crates/uv/src/commands/venv.rs @@ -11,7 +11,7 @@ use uv_cache::Cache; use uv_client::{BaseClientBuilder, FlatIndexClient, RegistryClientBuilder}; use uv_configuration::{ BuildOptions, Concurrency, Constraints, DependencyGroups, IndexStrategy, KeyringProviderType, - NoBinary, NoBuild, Preview, PreviewFeatures, SourceStrategy, + NoBinary, NoBuild, SourceStrategy, }; use uv_dispatch::{BuildDispatch, SharedState}; use uv_distribution_types::{ @@ -21,6 +21,7 @@ use uv_distribution_types::{ use uv_fs::Simplified; use uv_install_wheel::LinkMode; use uv_normalize::DefaultGroups; +use uv_preview::{Preview, PreviewFeatures}; use uv_python::{ EnvironmentPreference, PythonDownloads, PythonInstallation, PythonPreference, PythonRequest, }; diff --git a/crates/uv/src/settings.rs b/crates/uv/src/settings.rs index 7f3ec45d3..8cfe44013 100644 --- a/crates/uv/src/settings.rs +++ b/crates/uv/src/settings.rs @@ -23,9 +23,8 @@ use uv_client::Connectivity; use uv_configuration::{ BuildIsolation, BuildOptions, Concurrency, DependencyGroups, DryRun, EditableMode, ExportFormat, ExtrasSpecification, HashCheckingMode, IndexStrategy, InstallOptions, - KeyringProviderType, NoBinary, NoBuild, Preview, ProjectBuildBackend, Reinstall, - RequiredVersion, SourceStrategy, TargetTriple, TrustedHost, TrustedPublishing, Upgrade, - VersionControlSystem, + KeyringProviderType, NoBinary, NoBuild, ProjectBuildBackend, Reinstall, RequiredVersion, + SourceStrategy, TargetTriple, TrustedHost, TrustedPublishing, Upgrade, VersionControlSystem, }; use uv_distribution_types::{ ConfigSettings, DependencyMetadata, ExtraBuildVariables, Index, IndexLocations, IndexUrl, @@ -34,6 +33,7 @@ use uv_distribution_types::{ use uv_install_wheel::LinkMode; use uv_normalize::{ExtraName, PackageName, PipGroupName}; use uv_pep508::{MarkerTree, RequirementOrigin}; +use uv_preview::Preview; use uv_pypi_types::SupportedEnvironments; use uv_python::{Prefix, PythonDownloads, PythonPreference, PythonVersion, Target}; use uv_redacted::DisplaySafeUrl; diff --git a/crates/uv/tests/it/common/mod.rs b/crates/uv/tests/it/common/mod.rs index 8809906cf..b6f1336c9 100644 --- a/crates/uv/tests/it/common/mod.rs +++ b/crates/uv/tests/it/common/mod.rs @@ -21,8 +21,8 @@ use regex::Regex; use tokio::io::AsyncWriteExt; use uv_cache::{Cache, CacheBucket}; -use uv_configuration::Preview; use uv_fs::Simplified; +use uv_preview::Preview; use uv_python::managed::ManagedPythonInstallations; use uv_python::{ EnvironmentPreference, PythonInstallation, PythonPreference, PythonRequest, PythonVersion,