mirror of
https://github.com/astral-sh/uv.git
synced 2025-08-04 19:08:04 +00:00
Move workspace abstractions to uv-workspace
crate (#5236)
## Summary These are really different from the rest of the existing crate as evidenced by the bifurcation in the requirements.
This commit is contained in:
parent
1243c5e28c
commit
841edc3718
32 changed files with 142 additions and 73 deletions
45
Cargo.lock
generated
45
Cargo.lock
generated
|
@ -4498,6 +4498,7 @@ dependencies = [
|
|||
"uv-types",
|
||||
"uv-virtualenv",
|
||||
"uv-warnings",
|
||||
"uv-workspace",
|
||||
"which",
|
||||
]
|
||||
|
||||
|
@ -4707,7 +4708,6 @@ dependencies = [
|
|||
"uv-client",
|
||||
"uv-configuration",
|
||||
"uv-dispatch",
|
||||
"uv-distribution",
|
||||
"uv-git",
|
||||
"uv-installer",
|
||||
"uv-macros",
|
||||
|
@ -4716,6 +4716,7 @@ dependencies = [
|
|||
"uv-resolver",
|
||||
"uv-settings",
|
||||
"uv-types",
|
||||
"uv-workspace",
|
||||
"walkdir",
|
||||
]
|
||||
|
||||
|
@ -4750,34 +4751,27 @@ dependencies = [
|
|||
"anyhow",
|
||||
"distribution-filename",
|
||||
"distribution-types",
|
||||
"either",
|
||||
"fs-err",
|
||||
"futures",
|
||||
"glob",
|
||||
"indoc",
|
||||
"insta",
|
||||
"install-wheel-rs",
|
||||
"nanoid",
|
||||
"once_cell",
|
||||
"path-absolutize",
|
||||
"path-slash",
|
||||
"pep440_rs",
|
||||
"pep508_rs",
|
||||
"platform-tags",
|
||||
"pypi-types",
|
||||
"regex",
|
||||
"reqwest",
|
||||
"reqwest-middleware",
|
||||
"rmp-serde",
|
||||
"rustc-hash 2.0.0",
|
||||
"schemars",
|
||||
"serde",
|
||||
"tempfile",
|
||||
"thiserror",
|
||||
"tokio",
|
||||
"tokio-util",
|
||||
"toml",
|
||||
"toml_edit",
|
||||
"tracing",
|
||||
"url",
|
||||
"uv-cache",
|
||||
|
@ -4786,11 +4780,10 @@ dependencies = [
|
|||
"uv-extract",
|
||||
"uv-fs",
|
||||
"uv-git",
|
||||
"uv-macros",
|
||||
"uv-normalize",
|
||||
"uv-options-metadata",
|
||||
"uv-types",
|
||||
"uv-warnings",
|
||||
"uv-workspace",
|
||||
"zip",
|
||||
]
|
||||
|
||||
|
@ -5001,6 +4994,7 @@ dependencies = [
|
|||
"uv-resolver",
|
||||
"uv-types",
|
||||
"uv-warnings",
|
||||
"uv-workspace",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
|
@ -5052,6 +5046,7 @@ dependencies = [
|
|||
"uv-python",
|
||||
"uv-types",
|
||||
"uv-warnings",
|
||||
"uv-workspace",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
|
@ -5192,6 +5187,36 @@ dependencies = [
|
|||
"rustc-hash 2.0.0",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "uv-workspace"
|
||||
version = "0.0.1"
|
||||
dependencies = [
|
||||
"either",
|
||||
"fs-err",
|
||||
"glob",
|
||||
"insta",
|
||||
"path-slash",
|
||||
"pep440_rs",
|
||||
"pep508_rs",
|
||||
"pypi-types",
|
||||
"regex",
|
||||
"rustc-hash 2.0.0",
|
||||
"schemars",
|
||||
"serde",
|
||||
"thiserror",
|
||||
"tokio",
|
||||
"toml",
|
||||
"toml_edit",
|
||||
"tracing",
|
||||
"url",
|
||||
"uv-fs",
|
||||
"uv-git",
|
||||
"uv-macros",
|
||||
"uv-normalize",
|
||||
"uv-options-metadata",
|
||||
"uv-warnings",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "valuable"
|
||||
version = "0.1.0"
|
||||
|
|
|
@ -54,6 +54,7 @@ uv-types = { path = "crates/uv-types" }
|
|||
uv-version = { path = "crates/uv-version" }
|
||||
uv-virtualenv = { path = "crates/uv-virtualenv" }
|
||||
uv-warnings = { path = "crates/uv-warnings" }
|
||||
uv-workspace = { path = "crates/uv-workspace" }
|
||||
|
||||
anstream = { version = "0.6.13" }
|
||||
anyhow = { version = "1.0.80" }
|
||||
|
|
|
@ -129,6 +129,10 @@ A `venv` replacement to create virtual environments in Rust.
|
|||
|
||||
User-facing warnings for uv.
|
||||
|
||||
## [uv-workspace](./uv-workspace)
|
||||
|
||||
Workspace abstractions for uv.
|
||||
|
||||
## [requirements-txt](./requirements-txt)
|
||||
|
||||
Functionality for parsing `requirements.txt` files.
|
||||
|
|
|
@ -26,7 +26,6 @@ uv-cache = { workspace = true, features = ["clap"] }
|
|||
uv-client = { workspace = true }
|
||||
uv-configuration = { workspace = true }
|
||||
uv-dispatch = { workspace = true }
|
||||
uv-distribution = { workspace = true, features = ["schemars"] }
|
||||
uv-git = { workspace = true }
|
||||
uv-installer = { workspace = true }
|
||||
uv-macros = { workspace = true }
|
||||
|
@ -35,6 +34,7 @@ uv-python = { workspace = true }
|
|||
uv-resolver = { workspace = true }
|
||||
uv-settings = { workspace = true, features = ["schemars"] }
|
||||
uv-types = { workspace = true }
|
||||
uv-workspace = { workspace = true, features = ["schemars"] }
|
||||
|
||||
# Any dependencies that are exclusively used in `uv-dev` should be listed as non-workspace
|
||||
# dependencies, to ensure that we're forced to think twice before including them in other crates.
|
||||
|
|
|
@ -6,8 +6,8 @@ use pretty_assertions::StrComparison;
|
|||
use schemars::{schema_for, JsonSchema};
|
||||
use serde::Deserialize;
|
||||
|
||||
use uv_distribution::pyproject::ToolUv as WorkspaceOptions;
|
||||
use uv_settings::Options as SettingsOptions;
|
||||
use uv_workspace::pyproject::ToolUv as WorkspaceOptions;
|
||||
|
||||
use crate::generate_all::Mode;
|
||||
use crate::ROOT_DIR;
|
||||
|
|
|
@ -11,10 +11,10 @@ use pretty_assertions::StrComparison;
|
|||
use schemars::JsonSchema;
|
||||
use serde::Deserialize;
|
||||
|
||||
use uv_distribution::pyproject::ToolUv as WorkspaceOptions;
|
||||
use uv_macros::OptionsMetadata;
|
||||
use uv_options_metadata::{OptionField, OptionSet, OptionsMetadata, Visit};
|
||||
use uv_settings::Options as SettingsOptions;
|
||||
use uv_workspace::pyproject::ToolUv as WorkspaceOptions;
|
||||
|
||||
use crate::generate_all::Mode;
|
||||
use crate::ROOT_DIR;
|
||||
|
|
|
@ -26,33 +26,26 @@ uv-configuration = { workspace = true }
|
|||
uv-extract = { workspace = true }
|
||||
uv-fs = { workspace = true, features = ["tokio"] }
|
||||
uv-git = { workspace = true }
|
||||
uv-macros = { workspace = true }
|
||||
uv-normalize = { workspace = true }
|
||||
uv-options-metadata = { workspace = true }
|
||||
uv-types = { workspace = true }
|
||||
uv-warnings = { workspace = true }
|
||||
uv-workspace = { workspace = true }
|
||||
|
||||
anyhow = { workspace = true }
|
||||
either = { workspace = true }
|
||||
fs-err = { workspace = true }
|
||||
futures = { workspace = true }
|
||||
glob = { workspace = true }
|
||||
nanoid = { workspace = true }
|
||||
once_cell = { workspace = true }
|
||||
path-absolutize = { workspace = true }
|
||||
path-slash = { workspace = true }
|
||||
reqwest = { workspace = true }
|
||||
reqwest-middleware = { workspace = true }
|
||||
rmp-serde = { workspace = true }
|
||||
rustc-hash = { workspace = true }
|
||||
schemars = { workspace = true, optional = true }
|
||||
serde = { workspace = true, features = ["derive"] }
|
||||
tempfile = { workspace = true }
|
||||
thiserror = { workspace = true }
|
||||
tokio = { workspace = true }
|
||||
tokio-util = { workspace = true, features = ["compat"] }
|
||||
toml = { workspace = true }
|
||||
toml_edit = { workspace = true }
|
||||
tracing = { workspace = true }
|
||||
url = { workspace = true }
|
||||
zip = { workspace = true }
|
||||
|
@ -60,10 +53,3 @@ zip = { workspace = true }
|
|||
[dev-dependencies]
|
||||
indoc = { version = "2.0.5" }
|
||||
insta = { version = "1.39.0", features = ["filters", "json", "redactions"] }
|
||||
regex = { workspace = true }
|
||||
|
||||
[features]
|
||||
schemars = ["dep:schemars"]
|
||||
|
||||
[package.metadata.cargo-shear]
|
||||
ignored = ["uv-options-metadata"]
|
||||
|
|
|
@ -4,7 +4,6 @@ pub use error::Error;
|
|||
pub use index::{BuiltWheelIndex, RegistryWheelIndex};
|
||||
pub use metadata::{ArchiveMetadata, Metadata, RequiresDist, DEV_DEPENDENCIES};
|
||||
pub use reporter::Reporter;
|
||||
pub use workspace::{ProjectWorkspace, VirtualProject, Workspace, WorkspaceError, WorkspaceMember};
|
||||
|
||||
mod archive;
|
||||
mod distribution_database;
|
||||
|
@ -13,8 +12,5 @@ mod error;
|
|||
mod index;
|
||||
mod locks;
|
||||
mod metadata;
|
||||
pub mod pyproject;
|
||||
pub mod pyproject_mut;
|
||||
mod reporter;
|
||||
mod source;
|
||||
mod workspace;
|
||||
|
|
|
@ -14,9 +14,8 @@ use uv_fs::{relative_to, Simplified};
|
|||
use uv_git::GitReference;
|
||||
use uv_normalize::PackageName;
|
||||
use uv_warnings::warn_user_once;
|
||||
|
||||
use crate::pyproject::Source;
|
||||
use crate::Workspace;
|
||||
use uv_workspace::pyproject::Source;
|
||||
use uv_workspace::Workspace;
|
||||
|
||||
/// An error parsing and merging `tool.uv.sources` with
|
||||
/// `project.{dependencies,optional-dependencies}`.
|
||||
|
|
|
@ -3,14 +3,13 @@ use std::path::Path;
|
|||
|
||||
use thiserror::Error;
|
||||
|
||||
use crate::metadata::lowering::LoweringError;
|
||||
pub use crate::metadata::requires_dist::{RequiresDist, DEV_DEPENDENCIES};
|
||||
use pep440_rs::{Version, VersionSpecifiers};
|
||||
use pypi_types::{HashDigest, Metadata23};
|
||||
use uv_configuration::PreviewMode;
|
||||
use uv_normalize::{ExtraName, GroupName, PackageName};
|
||||
|
||||
use crate::metadata::lowering::LoweringError;
|
||||
pub use crate::metadata::requires_dist::{RequiresDist, DEV_DEPENDENCIES};
|
||||
use crate::WorkspaceError;
|
||||
use uv_workspace::WorkspaceError;
|
||||
|
||||
mod lowering;
|
||||
mod requires_dist;
|
||||
|
|
|
@ -1,13 +1,15 @@
|
|||
use once_cell::sync::Lazy;
|
||||
use std::collections::BTreeMap;
|
||||
use std::path::Path;
|
||||
|
||||
use once_cell::sync::Lazy;
|
||||
|
||||
use uv_configuration::PreviewMode;
|
||||
use uv_normalize::{ExtraName, GroupName, PackageName};
|
||||
use uv_workspace::ProjectWorkspace;
|
||||
|
||||
use crate::metadata::lowering::lower_requirement;
|
||||
use crate::metadata::MetadataError;
|
||||
use crate::{Metadata, ProjectWorkspace};
|
||||
use crate::Metadata;
|
||||
|
||||
/// The name of the global `dev-dependencies` group.
|
||||
///
|
||||
|
@ -152,9 +154,10 @@ mod test {
|
|||
use insta::assert_snapshot;
|
||||
|
||||
use uv_configuration::PreviewMode;
|
||||
use uv_workspace::pyproject::PyProjectToml;
|
||||
use uv_workspace::ProjectWorkspace;
|
||||
|
||||
use crate::pyproject::PyProjectToml;
|
||||
use crate::{ProjectWorkspace, RequiresDist};
|
||||
use crate::RequiresDist;
|
||||
|
||||
async fn requires_dist_from_pyproject_toml(contents: &str) -> anyhow::Result<RequiresDist> {
|
||||
let pyproject_toml = PyProjectToml::from_string(contents.to_string())?;
|
||||
|
|
|
@ -28,6 +28,7 @@ uv-normalize = { workspace = true }
|
|||
uv-resolver = { workspace = true, features = ["clap"] }
|
||||
uv-types = { workspace = true }
|
||||
uv-warnings = { workspace = true }
|
||||
uv-workspace = { workspace = true }
|
||||
|
||||
anyhow = { workspace = true }
|
||||
configparser = { workspace = true }
|
||||
|
|
|
@ -43,9 +43,9 @@ use pypi_types::VerbatimParsedUrl;
|
|||
use requirements_txt::{RequirementsTxt, RequirementsTxtRequirement};
|
||||
use uv_client::BaseClientBuilder;
|
||||
use uv_configuration::{NoBinary, NoBuild};
|
||||
use uv_distribution::pyproject::PyProjectToml;
|
||||
use uv_fs::Simplified;
|
||||
use uv_normalize::{ExtraName, PackageName};
|
||||
use uv_workspace::pyproject::PyProjectToml;
|
||||
|
||||
use crate::RequirementsSource;
|
||||
|
||||
|
|
|
@ -31,6 +31,7 @@ uv-python = { workspace = true }
|
|||
uv-normalize = { workspace = true }
|
||||
uv-types = { workspace = true }
|
||||
uv-warnings = { workspace = true }
|
||||
uv-workspace = { workspace = true }
|
||||
|
||||
anyhow = { workspace = true }
|
||||
chrono = { workspace = true }
|
||||
|
|
|
@ -34,9 +34,10 @@ use pypi_types::{
|
|||
HashDigest, ParsedArchiveUrl, ParsedGitUrl, ParsedUrl, Requirement, RequirementSource,
|
||||
};
|
||||
use uv_configuration::{ExtrasSpecification, Upgrade};
|
||||
use uv_distribution::{ArchiveMetadata, Metadata, VirtualProject};
|
||||
use uv_distribution::{ArchiveMetadata, Metadata};
|
||||
use uv_git::{GitReference, GitSha, RepositoryReference, ResolvedRepositoryReference};
|
||||
use uv_normalize::{ExtraName, GroupName, PackageName};
|
||||
use uv_workspace::VirtualProject;
|
||||
|
||||
use crate::resolution::{AnnotatedDist, ResolutionGraphNode};
|
||||
use crate::resolver::FxOnceMap;
|
||||
|
|
45
crates/uv-workspace/Cargo.toml
Normal file
45
crates/uv-workspace/Cargo.toml
Normal file
|
@ -0,0 +1,45 @@
|
|||
[package]
|
||||
name = "uv-workspace"
|
||||
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 }
|
||||
|
||||
[lints]
|
||||
workspace = true
|
||||
|
||||
[dependencies]
|
||||
pep440_rs = { workspace = true }
|
||||
pep508_rs = { workspace = true }
|
||||
pypi-types = { workspace = true }
|
||||
uv-fs = { workspace = true, features = ["tokio"] }
|
||||
uv-git = { workspace = true }
|
||||
uv-macros = { workspace = true }
|
||||
uv-normalize = { workspace = true }
|
||||
uv-warnings = { workspace = true }
|
||||
uv-options-metadata = { workspace = true }
|
||||
|
||||
either = { workspace = true }
|
||||
fs-err = { workspace = true }
|
||||
glob = { workspace = true }
|
||||
path-slash = { workspace = true }
|
||||
rustc-hash = { workspace = true }
|
||||
schemars = { workspace = true, optional = true }
|
||||
serde = { workspace = true, features = ["derive"] }
|
||||
thiserror = { workspace = true }
|
||||
tokio = { workspace = true }
|
||||
toml = { workspace = true }
|
||||
toml_edit = { workspace = true }
|
||||
tracing = { workspace = true }
|
||||
url = { workspace = true }
|
||||
|
||||
[dev-dependencies]
|
||||
insta = { version = "1.39.0", features = ["filters", "json", "redactions"] }
|
||||
regex = { workspace = true }
|
||||
|
||||
[package.metadata.cargo-shear]
|
||||
ignored = ["uv-options-metadata"]
|
5
crates/uv-workspace/src/lib.rs
Normal file
5
crates/uv-workspace/src/lib.rs
Normal file
|
@ -0,0 +1,5 @@
|
|||
pub use workspace::{ProjectWorkspace, VirtualProject, Workspace, WorkspaceError, WorkspaceMember};
|
||||
|
||||
pub mod pyproject;
|
||||
pub mod pyproject_mut;
|
||||
mod workspace;
|
|
@ -42,6 +42,7 @@ uv-tool = { workspace = true }
|
|||
uv-types = { workspace = true }
|
||||
uv-virtualenv = { workspace = true }
|
||||
uv-warnings = { workspace = true }
|
||||
uv-workspace = { workspace = true }
|
||||
|
||||
anstream = { workspace = true }
|
||||
anyhow = { workspace = true }
|
||||
|
|
|
@ -5,16 +5,16 @@ use uv_cache::Cache;
|
|||
use uv_client::{BaseClientBuilder, Connectivity, FlatIndexClient, RegistryClientBuilder};
|
||||
use uv_configuration::{Concurrency, ExtrasSpecification, PreviewMode, SetupPyStrategy};
|
||||
use uv_dispatch::BuildDispatch;
|
||||
use uv_distribution::pyproject::{DependencyType, Source, SourceError};
|
||||
use uv_distribution::pyproject_mut::PyProjectTomlMut;
|
||||
use uv_distribution::{DistributionDatabase, ProjectWorkspace, VirtualProject, Workspace};
|
||||
use uv_distribution::DistributionDatabase;
|
||||
use uv_normalize::PackageName;
|
||||
use uv_python::{PythonFetch, PythonPreference, PythonRequest};
|
||||
|
||||
use uv_requirements::{NamedRequirementsResolver, RequirementsSource, RequirementsSpecification};
|
||||
use uv_resolver::FlatIndex;
|
||||
use uv_types::{BuildIsolation, HashStrategy};
|
||||
use uv_warnings::warn_user_once;
|
||||
use uv_workspace::pyproject::{DependencyType, Source, SourceError};
|
||||
use uv_workspace::pyproject_mut::PyProjectTomlMut;
|
||||
use uv_workspace::{ProjectWorkspace, VirtualProject, Workspace};
|
||||
|
||||
use crate::commands::pip::operations::Modifications;
|
||||
use crate::commands::pip::resolution_environment;
|
||||
|
|
|
@ -2,14 +2,14 @@ use std::fmt::Write;
|
|||
use std::path::PathBuf;
|
||||
|
||||
use anyhow::Result;
|
||||
|
||||
use owo_colors::OwoColorize;
|
||||
|
||||
use pep508_rs::PackageName;
|
||||
use uv_configuration::PreviewMode;
|
||||
use uv_distribution::pyproject_mut::PyProjectTomlMut;
|
||||
use uv_distribution::{ProjectWorkspace, WorkspaceError};
|
||||
use uv_fs::Simplified;
|
||||
use uv_warnings::warn_user_once;
|
||||
use uv_workspace::pyproject_mut::PyProjectTomlMut;
|
||||
use uv_workspace::{ProjectWorkspace, WorkspaceError};
|
||||
|
||||
use crate::commands::ExitStatus;
|
||||
use crate::printer::Printer;
|
||||
|
|
|
@ -1,18 +1,20 @@
|
|||
#![allow(clippy::single_match_else)]
|
||||
|
||||
use anstream::eprint;
|
||||
use distribution_types::{Diagnostic, UnresolvedRequirementSpecification, VersionId};
|
||||
use owo_colors::OwoColorize;
|
||||
use pep440_rs::Version;
|
||||
use rustc_hash::{FxBuildHasher, FxHashMap};
|
||||
use std::collections::BTreeSet;
|
||||
use std::{fmt::Write, path::Path};
|
||||
|
||||
use anstream::eprint;
|
||||
use owo_colors::OwoColorize;
|
||||
use rustc_hash::{FxBuildHasher, FxHashMap};
|
||||
use tracing::debug;
|
||||
|
||||
use distribution_types::{Diagnostic, UnresolvedRequirementSpecification, VersionId};
|
||||
use pep440_rs::Version;
|
||||
use uv_cache::Cache;
|
||||
use uv_client::{Connectivity, FlatIndexClient, RegistryClientBuilder};
|
||||
use uv_configuration::{Concurrency, ExtrasSpecification, PreviewMode, Reinstall, SetupPyStrategy};
|
||||
use uv_dispatch::BuildDispatch;
|
||||
use uv_distribution::{Workspace, DEV_DEPENDENCIES};
|
||||
use uv_distribution::DEV_DEPENDENCIES;
|
||||
use uv_git::ResolvedRepositoryReference;
|
||||
use uv_normalize::PackageName;
|
||||
use uv_python::{Interpreter, PythonFetch, PythonPreference, PythonRequest};
|
||||
|
@ -22,6 +24,7 @@ use uv_resolver::{
|
|||
};
|
||||
use uv_types::{BuildIsolation, EmptyInstalledPackages, HashStrategy};
|
||||
use uv_warnings::{warn_user, warn_user_once};
|
||||
use uv_workspace::Workspace;
|
||||
|
||||
use crate::commands::project::{find_requires_python, FoundInterpreter, ProjectError, SharedState};
|
||||
use crate::commands::{pip, ExitStatus};
|
||||
|
|
|
@ -13,7 +13,7 @@ use uv_configuration::{
|
|||
Concurrency, ExtrasSpecification, PreviewMode, Reinstall, SetupPyStrategy, Upgrade,
|
||||
};
|
||||
use uv_dispatch::BuildDispatch;
|
||||
use uv_distribution::{DistributionDatabase, Workspace};
|
||||
use uv_distribution::DistributionDatabase;
|
||||
use uv_fs::Simplified;
|
||||
use uv_installer::{SatisfiesResult, SitePackages};
|
||||
use uv_python::{
|
||||
|
@ -26,6 +26,7 @@ use uv_resolver::{
|
|||
};
|
||||
use uv_types::{BuildIsolation, EmptyInstalledPackages, HashStrategy};
|
||||
use uv_warnings::warn_user;
|
||||
use uv_workspace::Workspace;
|
||||
|
||||
use crate::commands::pip::operations::Modifications;
|
||||
use crate::commands::reporters::{PythonDownloadReporter, ResolverReporter};
|
||||
|
|
|
@ -4,11 +4,11 @@ use pep508_rs::PackageName;
|
|||
use uv_cache::Cache;
|
||||
use uv_client::Connectivity;
|
||||
use uv_configuration::{Concurrency, ExtrasSpecification, PreviewMode};
|
||||
use uv_distribution::pyproject::DependencyType;
|
||||
use uv_distribution::pyproject_mut::PyProjectTomlMut;
|
||||
use uv_distribution::{ProjectWorkspace, VirtualProject, Workspace};
|
||||
use uv_python::{PythonFetch, PythonPreference, PythonRequest};
|
||||
use uv_warnings::{warn_user, warn_user_once};
|
||||
use uv_workspace::pyproject::DependencyType;
|
||||
use uv_workspace::pyproject_mut::PyProjectTomlMut;
|
||||
use uv_workspace::{ProjectWorkspace, VirtualProject, Workspace};
|
||||
|
||||
use crate::commands::pip::operations::Modifications;
|
||||
use crate::commands::{project, ExitStatus, SharedState};
|
||||
|
|
|
@ -14,7 +14,6 @@ use uv_cache::Cache;
|
|||
use uv_cli::ExternalCommand;
|
||||
use uv_client::{BaseClientBuilder, Connectivity};
|
||||
use uv_configuration::{Concurrency, ExtrasSpecification, PreviewMode};
|
||||
use uv_distribution::{VirtualProject, Workspace, WorkspaceError};
|
||||
use uv_fs::Simplified;
|
||||
use uv_installer::{SatisfiesResult, SitePackages};
|
||||
use uv_normalize::PackageName;
|
||||
|
@ -22,9 +21,9 @@ use uv_python::{
|
|||
request_from_version_file, EnvironmentPreference, Interpreter, PythonEnvironment, PythonFetch,
|
||||
PythonInstallation, PythonPreference, PythonRequest, VersionRequest,
|
||||
};
|
||||
|
||||
use uv_requirements::{RequirementsSource, RequirementsSpecification};
|
||||
use uv_warnings::warn_user_once;
|
||||
use uv_workspace::{VirtualProject, Workspace, WorkspaceError};
|
||||
|
||||
use crate::commands::pip::operations::Modifications;
|
||||
use crate::commands::project::environment::CachedEnvironment;
|
||||
|
|
|
@ -6,13 +6,13 @@ use uv_configuration::{
|
|||
Concurrency, ExtrasSpecification, HashCheckingMode, PreviewMode, SetupPyStrategy,
|
||||
};
|
||||
use uv_dispatch::BuildDispatch;
|
||||
use uv_distribution::{VirtualProject, DEV_DEPENDENCIES};
|
||||
use uv_distribution::DEV_DEPENDENCIES;
|
||||
use uv_installer::SitePackages;
|
||||
use uv_python::{PythonEnvironment, PythonFetch, PythonPreference, PythonRequest};
|
||||
|
||||
use uv_resolver::{FlatIndex, Lock};
|
||||
use uv_types::{BuildIsolation, HashStrategy};
|
||||
use uv_warnings::warn_user_once;
|
||||
use uv_workspace::VirtualProject;
|
||||
|
||||
use crate::commands::pip::operations::Modifications;
|
||||
use crate::commands::project::lock::do_safe_lock;
|
||||
|
|
|
@ -1,17 +1,16 @@
|
|||
use std::fmt::Write;
|
||||
|
||||
use anyhow::Result;
|
||||
|
||||
use indexmap::IndexMap;
|
||||
use owo_colors::OwoColorize;
|
||||
|
||||
use pep508_rs::PackageName;
|
||||
use uv_cache::Cache;
|
||||
use uv_client::Connectivity;
|
||||
use uv_configuration::{Concurrency, PreviewMode};
|
||||
use uv_distribution::Workspace;
|
||||
use uv_python::{PythonFetch, PythonPreference, PythonRequest};
|
||||
|
||||
use uv_warnings::warn_user_once;
|
||||
use uv_workspace::Workspace;
|
||||
|
||||
use crate::commands::pip::tree::DisplayDependencyGraph;
|
||||
use crate::commands::project::FoundInterpreter;
|
||||
|
|
|
@ -3,11 +3,10 @@ use std::str::FromStr;
|
|||
|
||||
use anyhow::{bail, Result};
|
||||
use owo_colors::OwoColorize;
|
||||
|
||||
use tracing::debug;
|
||||
|
||||
use uv_cache::Cache;
|
||||
use uv_configuration::PreviewMode;
|
||||
use uv_distribution::VirtualProject;
|
||||
use uv_fs::Simplified;
|
||||
use uv_python::{
|
||||
request_from_version_file, requests_from_version_file, write_version_file,
|
||||
|
@ -15,6 +14,7 @@ use uv_python::{
|
|||
PYTHON_VERSION_FILENAME,
|
||||
};
|
||||
use uv_warnings::warn_user_once;
|
||||
use uv_workspace::VirtualProject;
|
||||
|
||||
use crate::commands::{project::find_requires_python, ExitStatus};
|
||||
use crate::printer::Printer;
|
||||
|
|
|
@ -22,9 +22,9 @@ use uv_cli::{PythonCommand, PythonNamespace, ToolCommand, ToolNamespace};
|
|||
#[cfg(feature = "self-update")]
|
||||
use uv_cli::{SelfCommand, SelfNamespace};
|
||||
use uv_configuration::Concurrency;
|
||||
use uv_distribution::Workspace;
|
||||
use uv_requirements::RequirementsSource;
|
||||
use uv_settings::{Combine, FilesystemOptions};
|
||||
use uv_workspace::Workspace;
|
||||
|
||||
use crate::commands::{ExitStatus, ToolRunCommand};
|
||||
use crate::printer::Printer;
|
||||
|
|
|
@ -23,7 +23,6 @@ use uv_configuration::{
|
|||
IndexStrategy, KeyringProviderType, NoBinary, NoBuild, PreviewMode, Reinstall, SetupPyStrategy,
|
||||
TargetTriple, Upgrade,
|
||||
};
|
||||
use uv_distribution::pyproject::DependencyType;
|
||||
use uv_normalize::PackageName;
|
||||
use uv_python::{Prefix, PythonFetch, PythonPreference, PythonVersion, Target};
|
||||
use uv_requirements::RequirementsSource;
|
||||
|
@ -31,6 +30,7 @@ use uv_resolver::{AnnotationStyle, DependencyMode, ExcludeNewer, PreReleaseMode,
|
|||
use uv_settings::{
|
||||
Combine, FilesystemOptions, Options, PipOptions, ResolverInstallerOptions, ResolverOptions,
|
||||
};
|
||||
use uv_workspace::pyproject::DependencyType;
|
||||
|
||||
use crate::commands::pip::operations::Modifications;
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue