Always use exact semantics in update_environment (#4790)

## Summary

We don't need to expose this -- these are always environments that we
want to be perfectly synced.
This commit is contained in:
Charlie Marsh 2024-07-03 17:23:21 -04:00 committed by GitHub
parent 814b3c45bc
commit 6a4c4ace2b
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
4 changed files with 1 additions and 8 deletions

View file

@ -361,7 +361,6 @@ pub(crate) async fn resolve_names(
pub(crate) async fn update_environment( pub(crate) async fn update_environment(
venv: PythonEnvironment, venv: PythonEnvironment,
spec: RequirementsSpecification, spec: RequirementsSpecification,
modifications: Modifications,
settings: &ResolverInstallerSettings, settings: &ResolverInstallerSettings,
state: &SharedState, state: &SharedState,
preview: PreviewMode, preview: PreviewMode,
@ -509,7 +508,7 @@ pub(crate) async fn update_environment(
pip::operations::install( pip::operations::install(
&resolution, &resolution,
site_packages, site_packages,
modifications, Modifications::Exact,
reinstall, reinstall,
build_options, build_options,
*link_mode, *link_mode,

View file

@ -110,7 +110,6 @@ pub(crate) async fn run(
let environment = project::update_environment( let environment = project::update_environment(
venv, venv,
spec, spec,
Modifications::Sufficient,
&settings, &settings,
&state, &state,
preview, preview,
@ -300,7 +299,6 @@ pub(crate) async fn run(
project::update_environment( project::update_environment(
venv, venv,
spec, spec,
Modifications::Sufficient,
&settings, &settings,
&state, &state,
preview, preview,

View file

@ -24,7 +24,6 @@ use uv_requirements::RequirementsSpecification;
use uv_tool::{entrypoint_paths, find_executable_directory, InstalledTools, Tool, ToolEntrypoint}; use uv_tool::{entrypoint_paths, find_executable_directory, InstalledTools, Tool, ToolEntrypoint};
use uv_warnings::warn_user_once; use uv_warnings::warn_user_once;
use crate::commands::pip::operations::Modifications;
use crate::commands::project::update_environment; use crate::commands::project::update_environment;
use crate::commands::tool::common::resolve_requirements; use crate::commands::tool::common::resolve_requirements;
use crate::commands::{ExitStatus, SharedState}; use crate::commands::{ExitStatus, SharedState};
@ -211,7 +210,6 @@ pub(crate) async fn install(
let environment = update_environment( let environment = update_environment(
environment, environment,
spec, spec,
Modifications::Exact,
&settings, &settings,
&state, &state,
preview, preview,

View file

@ -25,7 +25,6 @@ use uv_requirements::RequirementsSpecification;
use uv_tool::InstalledTools; use uv_tool::InstalledTools;
use uv_warnings::warn_user_once; use uv_warnings::warn_user_once;
use crate::commands::pip::operations::Modifications;
use crate::commands::project::update_environment; use crate::commands::project::update_environment;
use crate::commands::tool::common::resolve_requirements; use crate::commands::tool::common::resolve_requirements;
use crate::commands::{ExitStatus, SharedState}; use crate::commands::{ExitStatus, SharedState};
@ -286,7 +285,6 @@ async fn get_or_create_environment(
let ephemeral_env = update_environment( let ephemeral_env = update_environment(
venv, venv,
spec, spec,
Modifications::Exact,
settings, settings,
&state, &state,
preview, preview,