Move preview features into a dedicated crate (#15482)

## Summary

This is causing some cyclic dependencies issues for me, because these
can be used in virtually _any_ crate (like `uv-install-wheel`), which
then means that all of `uv-configuration` becomes a dependency, etc. I
think this should be a leaf crate so that we can safely depend on it
anywhere.
This commit is contained in:
Charlie Marsh 2025-08-24 09:55:30 -04:00 committed by GitHub
parent f1647838ae
commit ac84f5aedc
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
68 changed files with 145 additions and 76 deletions

26
Cargo.lock generated
View file

@ -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",

View file

@ -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" }

View file

@ -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 }

View file

@ -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::{

View file

@ -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 }

View file

@ -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;

View file

@ -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 }

View file

@ -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;

View file

@ -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 }

View file

@ -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;

View file

@ -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"] }

View file

@ -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)]

View file

@ -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 }

View file

@ -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::{

View file

@ -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 }

View file

@ -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;

View file

@ -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 }

View file

@ -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> {

View file

@ -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 = []

View file

@ -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 }

View file

@ -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;

View file

@ -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;

View file

@ -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,

View file

@ -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;

View file

@ -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;

View file

@ -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 }

View file

@ -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;

View file

@ -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 }

View file

@ -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};

View file

@ -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};

View file

@ -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"] }

View file

@ -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,

View file

@ -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};

View file

@ -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,

View file

@ -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};

View file

@ -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,

View file

@ -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};

View file

@ -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<Changelog, Error> {
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<CachedDist>, Vec<InstalledDist>), Error> {
let Plan {
cached,

View file

@ -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;

View file

@ -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,

View file

@ -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};

View file

@ -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};

View file

@ -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;

View file

@ -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.

View file

@ -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};

View file

@ -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};

View file

@ -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,

View file

@ -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;

View file

@ -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,

View file

@ -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;

View file

@ -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,

View file

@ -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};

View file

@ -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;

View file

@ -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;

View file

@ -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,
};

View file

@ -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,
};

View file

@ -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;

View file

@ -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,

View file

@ -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,

View file

@ -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,

View file

@ -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.

View file

@ -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,
};

View file

@ -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,

View file

@ -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,

View file

@ -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,
};

View file

@ -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;

View file

@ -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,