diff --git a/crates/uv/tests/it/ecosystem.rs b/crates/uv/tests/it/ecosystem.rs index 939224df3..8237986b6 100644 --- a/crates/uv/tests/it/ecosystem.rs +++ b/crates/uv/tests/it/ecosystem.rs @@ -92,18 +92,9 @@ fn lock_ecosystem_package(python_version: &str, name: &str) -> Result<()> { // Custom command since we need to change the cache dir. let mut command = Command::new(get_bin()); - command - .arg("lock") - .arg("--cache-dir") - .arg(&cache_dir) - // When running the tests in a venv, ignore that venv, otherwise we'll capture warnings. - .env_remove(EnvVars::VIRTUAL_ENV) - .env(EnvVars::UV_NO_WRAP, "1") - .env(EnvVars::HOME, context.home_dir.as_os_str()) - .env(EnvVars::UV_PYTHON_INSTALL_DIR, "") - .env(EnvVars::UV_TEST_PYTHON_PATH, context.python_path()) - .env(EnvVars::UV_EXCLUDE_NEWER, EXCLUDE_NEWER) - .current_dir(context.temp_dir.path()); + context.add_shared_env(&mut command, false); + command.env(EnvVars::UV_EXCLUDE_NEWER, EXCLUDE_NEWER); + command.arg("lock").arg("--cache-dir").arg(&cache_dir); let (snapshot, _) = common::run_and_format( &mut command, diff --git a/crates/uv/tests/it/show_settings.rs b/crates/uv/tests/it/show_settings.rs index 43b11e8e3..2727d6441 100644 --- a/crates/uv/tests/it/show_settings.rs +++ b/crates/uv/tests/it/show_settings.rs @@ -1,4 +1,3 @@ -use std::path::Path; use std::process::Command; use assert_fs::prelude::*; @@ -10,17 +9,14 @@ use crate::common::{TestContext, uv_snapshot}; /// /// In particular, remove any user-defined environment variables and set any machine-specific /// environment variables to static values. -fn add_shared_args(mut command: Command, cwd: &Path) -> Command { +fn add_shared_args(mut command: Command) -> Command { command - .env_clear() .env(EnvVars::UV_LINK_MODE, "clone") .env(EnvVars::UV_CONCURRENT_DOWNLOADS, "50") .env(EnvVars::UV_CONCURRENT_BUILDS, "16") .env(EnvVars::UV_CONCURRENT_INSTALLS, "8") - // Set an explicit `XDG_CONFIG_DIRS` to avoid loading system configuration. - .env(EnvVars::XDG_CONFIG_DIRS, cwd) - // Set an explicit `XDG_CONFIG_HOME` to avoid loading user configuration. - .env(EnvVars::XDG_CONFIG_HOME, cwd); + .env_remove(EnvVars::UV_EXCLUDE_NEWER) + .env_remove(EnvVars::UV_PYTHON_DOWNLOADS); if cfg!(unix) { // Avoid locale issues in tests @@ -51,7 +47,7 @@ fn resolve_uv_toml() -> anyhow::Result<()> { requirements_in.write_str("anyio>3.0.0")?; // Resolution should use the lowest direct version, and generate hashes. - uv_snapshot!(context.filters(), add_shared_args(context.pip_compile(), context.temp_dir.path()) + uv_snapshot!(context.filters(), add_shared_args(context.pip_compile()) .arg("--show-settings") .arg("requirements.in"), @r#" success: true @@ -257,7 +253,7 @@ fn resolve_uv_toml() -> anyhow::Result<()> { ); // Resolution should use the highest version, and generate hashes. - uv_snapshot!(context.filters(), add_shared_args(context.pip_compile(), context.temp_dir.path()) + uv_snapshot!(context.filters(), add_shared_args(context.pip_compile()) .arg("--show-settings") .arg("requirements.in") .arg("--resolution=highest"), @r#" @@ -464,7 +460,7 @@ fn resolve_uv_toml() -> anyhow::Result<()> { ); // Resolution should use the highest version, and omit hashes. - uv_snapshot!(context.filters(), add_shared_args(context.pip_compile(), context.temp_dir.path()) + uv_snapshot!(context.filters(), add_shared_args(context.pip_compile()) .arg("--show-settings") .arg("requirements.in") .arg("--resolution=highest") @@ -706,7 +702,7 @@ fn resolve_pyproject_toml() -> anyhow::Result<()> { requirements_in.write_str("anyio>3.0.0")?; // Resolution should use the lowest direct version, and generate hashes. - uv_snapshot!(context.filters(), add_shared_args(context.pip_compile(), context.temp_dir.path()) + uv_snapshot!(context.filters(), add_shared_args(context.pip_compile()) .arg("--show-settings") .arg("requirements.in"), @r#" success: true @@ -915,7 +911,7 @@ fn resolve_pyproject_toml() -> anyhow::Result<()> { fs_err::remove_file(config.path())?; // Resolution should use the highest version, and omit hashes. - uv_snapshot!(context.filters(), add_shared_args(context.pip_compile(), context.temp_dir.path()) + uv_snapshot!(context.filters(), add_shared_args(context.pip_compile()) .arg("--show-settings") .arg("requirements.in"), @r#" success: true @@ -1100,7 +1096,7 @@ fn resolve_pyproject_toml() -> anyhow::Result<()> { "#})?; // Resolution should use the lowest direct version, and generate hashes. - uv_snapshot!(context.filters(), add_shared_args(context.pip_compile(), context.temp_dir.path()) + uv_snapshot!(context.filters(), add_shared_args(context.pip_compile()) .arg("--show-settings") .arg("requirements.in"), @r#" success: true @@ -1334,7 +1330,7 @@ fn resolve_index_url() -> anyhow::Result<()> { let requirements_in = context.temp_dir.child("requirements.in"); requirements_in.write_str("anyio>3.0.0")?; - uv_snapshot!(context.filters(), add_shared_args(context.pip_compile(), context.temp_dir.path()) + uv_snapshot!(context.filters(), add_shared_args(context.pip_compile()) .arg("--show-settings") .arg("requirements.in"), @r#" success: true @@ -1574,7 +1570,7 @@ fn resolve_index_url() -> anyhow::Result<()> { // Providing an additional index URL on the command-line should be merged with the // configuration file. - uv_snapshot!(context.filters(), add_shared_args(context.pip_compile(), context.temp_dir.path()) + uv_snapshot!(context.filters(), add_shared_args(context.pip_compile()) .arg("--show-settings") .arg("requirements.in") .arg("--extra-index-url") @@ -1876,7 +1872,7 @@ fn resolve_find_links() -> anyhow::Result<()> { let requirements_in = context.temp_dir.child("requirements.in"); requirements_in.write_str("tqdm")?; - uv_snapshot!(context.filters(), add_shared_args(context.pip_compile(), context.temp_dir.path()) + uv_snapshot!(context.filters(), add_shared_args(context.pip_compile()) .arg("--show-settings") .arg("requirements.in"), @r#" success: true @@ -2107,7 +2103,7 @@ fn resolve_top_level() -> anyhow::Result<()> { let requirements_in = context.temp_dir.child("requirements.in"); requirements_in.write_str("anyio>3.0.0")?; - uv_snapshot!(context.filters(), add_shared_args(context.pip_compile(), context.temp_dir.path()) + uv_snapshot!(context.filters(), add_shared_args(context.pip_compile()) .arg("--show-settings") .arg("requirements.in"), @r#" success: true @@ -2297,7 +2293,7 @@ fn resolve_top_level() -> anyhow::Result<()> { let requirements_in = context.temp_dir.child("requirements.in"); requirements_in.write_str("anyio>3.0.0")?; - uv_snapshot!(context.filters(), add_shared_args(context.pip_compile(), context.temp_dir.path()) + uv_snapshot!(context.filters(), add_shared_args(context.pip_compile()) .arg("--show-settings") .arg("requirements.in"), @r#" success: true @@ -2536,7 +2532,7 @@ fn resolve_top_level() -> anyhow::Result<()> { ); // But the command-line should take precedence over both. - uv_snapshot!(context.filters(), add_shared_args(context.pip_compile(), context.temp_dir.path()) + uv_snapshot!(context.filters(), add_shared_args(context.pip_compile()) .arg("--show-settings") .arg("requirements.in") .arg("--resolution=lowest-direct"), @r#" @@ -2799,7 +2795,7 @@ fn resolve_user_configuration() -> anyhow::Result<()> { requirements_in.write_str("anyio>3.0.0")?; // Resolution should use the lowest direct version. - uv_snapshot!(context.filters(), add_shared_args(context.pip_compile(), context.temp_dir.path()) + uv_snapshot!(context.filters(), add_shared_args(context.pip_compile()) .arg("--show-settings") .arg("requirements.in") .env(EnvVars::XDG_CONFIG_HOME, xdg.path()), @r#" @@ -2979,7 +2975,7 @@ fn resolve_user_configuration() -> anyhow::Result<()> { "})?; // Resolution should use the lowest direct version and generate hashes. - uv_snapshot!(context.filters(), add_shared_args(context.pip_compile(), context.temp_dir.path()) + uv_snapshot!(context.filters(), add_shared_args(context.pip_compile()) .arg("--show-settings") .arg("requirements.in") .env(EnvVars::XDG_CONFIG_HOME, xdg.path()), @r#" @@ -3159,7 +3155,7 @@ fn resolve_user_configuration() -> anyhow::Result<()> { "#})?; // Resolution should use the highest version. - uv_snapshot!(context.filters(), add_shared_args(context.pip_compile(), context.temp_dir.path()) + uv_snapshot!(context.filters(), add_shared_args(context.pip_compile()) .arg("--show-settings") .arg("requirements.in") .env(EnvVars::XDG_CONFIG_HOME, xdg.path()), @r#" @@ -3341,7 +3337,7 @@ fn resolve_user_configuration() -> anyhow::Result<()> { "#})?; // Resolution should use the highest version. - uv_snapshot!(context.filters(), add_shared_args(context.pip_compile(), context.temp_dir.path()) + uv_snapshot!(context.filters(), add_shared_args(context.pip_compile()) .arg("--show-settings") .arg("requirements.in") .env(EnvVars::XDG_CONFIG_HOME, xdg.path()), @r#" @@ -3542,7 +3538,7 @@ fn resolve_tool() -> anyhow::Result<()> { // If we're running a user-level command, like `uv tool install`, we should use lowest direct, // but retain build isolation (since we ignore the local configuration). - uv_snapshot!(context.filters(), add_shared_args(context.tool_install(), context.temp_dir.path()) + uv_snapshot!(context.filters(), add_shared_args(context.tool_install()) .arg("--show-settings") .arg("requirements.in") .env(EnvVars::XDG_CONFIG_HOME, xdg.path()), @r#" @@ -3739,7 +3735,7 @@ fn resolve_poetry_toml() -> anyhow::Result<()> { requirements_in.write_str("anyio>3.0.0")?; // Resolution should use the lowest direct version, and generate hashes. - uv_snapshot!(context.filters(), add_shared_args(context.pip_compile(), context.temp_dir.path()) + uv_snapshot!(context.filters(), add_shared_args(context.pip_compile()) .arg("--show-settings") .arg("requirements.in"), @r#" success: true @@ -3953,7 +3949,7 @@ fn resolve_both() -> anyhow::Result<()> { requirements_in.write_str("anyio>3.0.0")?; // Resolution should succeed, but warn that the `pip` section in `pyproject.toml` is ignored. - uv_snapshot!(context.filters(), add_shared_args(context.pip_compile(), context.temp_dir.path()) + uv_snapshot!(context.filters(), add_shared_args(context.pip_compile()) .arg("--show-settings") .arg("requirements.in"), @r#" success: true @@ -4206,7 +4202,7 @@ fn resolve_both_special_fields() -> anyhow::Result<()> { requirements_in.write_str("anyio>3.0.0")?; // Resolution should succeed, but warn that the `pip` section in `pyproject.toml` is ignored. - uv_snapshot!(context.filters(), add_shared_args(context.pip_compile(), context.temp_dir.path()) + uv_snapshot!(context.filters(), add_shared_args(context.pip_compile()) .arg("--show-settings") .arg("requirements.in"), @r#" success: true @@ -4435,7 +4431,7 @@ fn invalid_conflicts() -> anyhow::Result<()> { "#})?; // The file should be rejected for violating the schema. - uv_snapshot!(context.filters(), add_shared_args(context.lock(), context.temp_dir.path()), @" + uv_snapshot!(context.filters(), add_shared_args(context.lock()), @" success: false exit_code: 2 ----- stdout ----- @@ -4462,7 +4458,7 @@ fn invalid_conflicts() -> anyhow::Result<()> { "#})?; // The file should be rejected for violating the schema. - uv_snapshot!(context.filters(), add_shared_args(context.lock(), context.temp_dir.path()), @" + uv_snapshot!(context.filters(), add_shared_args(context.lock()), @" success: false exit_code: 2 ----- stdout ----- @@ -4499,7 +4495,7 @@ fn valid_conflicts() -> anyhow::Result<()> { [{extra = "x1"}, {extra = "x2"}], ] "#})?; - uv_snapshot!(context.filters(), add_shared_args(context.lock(), context.temp_dir.path()) + uv_snapshot!(context.filters(), add_shared_args(context.lock()) .env(EnvVars::XDG_CONFIG_HOME, xdg.path()), @" success: true exit_code: 0 @@ -4536,7 +4532,7 @@ fn resolve_config_file() -> anyhow::Result<()> { let requirements_in = context.temp_dir.child("requirements.in"); requirements_in.write_str("anyio>3.0.0")?; - uv_snapshot!(context.filters(), add_shared_args(context.pip_compile(), context.temp_dir.path()) + uv_snapshot!(context.filters(), add_shared_args(context.pip_compile()) .arg("--show-settings") .arg("--config-file") .arg(config.path()) @@ -4756,7 +4752,7 @@ fn resolve_config_file() -> anyhow::Result<()> { "#})?; // The file should be rejected for violating the schema. - uv_snapshot!(context.filters(), add_shared_args(context.pip_compile(), context.temp_dir.path()) + uv_snapshot!(context.filters(), add_shared_args(context.pip_compile()) .arg("--show-settings") .arg("--config-file") .arg(config.path()) @@ -4790,7 +4786,7 @@ fn resolve_config_file() -> anyhow::Result<()> { })?; // The file should be rejected for violating the schema, with a custom warning. - uv_snapshot!(context.filters(), add_shared_args(context.pip_compile(), context.temp_dir.path()) + uv_snapshot!(context.filters(), add_shared_args(context.pip_compile()) .arg("--show-settings") .arg("--config-file") .arg(config.path()) @@ -4844,7 +4840,7 @@ fn resolve_skip_empty() -> anyhow::Result<()> { // Resolution in `child` should use lowest-direct, skipping the `pyproject.toml`, which lacks a // `tool.uv`. - uv_snapshot!(context.filters(), add_shared_args(context.pip_compile(), context.temp_dir.path()) + uv_snapshot!(context.filters(), add_shared_args(context.pip_compile()) .arg("--show-settings") .arg("requirements.in") .current_dir(&child), @r#" @@ -5027,7 +5023,7 @@ fn resolve_skip_empty() -> anyhow::Result<()> { [tool.uv] "#})?; - uv_snapshot!(context.filters(), add_shared_args(context.pip_compile(), context.temp_dir.path()) + uv_snapshot!(context.filters(), add_shared_args(context.pip_compile()) .arg("--show-settings") .arg("requirements.in") .current_dir(&child), @r#" @@ -5219,7 +5215,7 @@ fn allow_insecure_host() -> anyhow::Result<()> { let requirements_in = context.temp_dir.child("requirements.in"); requirements_in.write_str("anyio>3.0.0")?; - uv_snapshot!(context.filters(), add_shared_args(context.pip_compile(), context.temp_dir.path()) + uv_snapshot!(context.filters(), add_shared_args(context.pip_compile()) .arg("--show-settings") .arg("requirements.in"), @r#" success: true @@ -5422,7 +5418,7 @@ fn index_priority() -> anyhow::Result<()> { let requirements_in = context.temp_dir.child("requirements.in"); requirements_in.write_str("anyio>3.0.0")?; - uv_snapshot!(context.filters(), add_shared_args(context.pip_compile(), context.temp_dir.path()) + uv_snapshot!(context.filters(), add_shared_args(context.pip_compile()) .arg("requirements.in") .arg("--show-settings") .arg("--index-url") @@ -5664,7 +5660,7 @@ fn index_priority() -> anyhow::Result<()> { "# ); - uv_snapshot!(context.filters(), add_shared_args(context.pip_compile(), context.temp_dir.path()) + uv_snapshot!(context.filters(), add_shared_args(context.pip_compile()) .arg("requirements.in") .arg("--show-settings") .arg("--default-index") @@ -5912,7 +5908,7 @@ fn index_priority() -> anyhow::Result<()> { "#})?; // Prefer the `--default-index` from the CLI, and treat it as the default. - uv_snapshot!(context.filters(), add_shared_args(context.pip_compile(), context.temp_dir.path()) + uv_snapshot!(context.filters(), add_shared_args(context.pip_compile()) .arg("requirements.in") .arg("--show-settings") .arg("--default-index") @@ -6155,7 +6151,7 @@ fn index_priority() -> anyhow::Result<()> { ); // Prefer the `--index` from the CLI, but treat the index from the file as the default. - uv_snapshot!(context.filters(), add_shared_args(context.pip_compile(), context.temp_dir.path()) + uv_snapshot!(context.filters(), add_shared_args(context.pip_compile()) .arg("requirements.in") .arg("--show-settings") .arg("--index") @@ -6405,7 +6401,7 @@ fn index_priority() -> anyhow::Result<()> { "#})?; // Prefer the `--index-url` from the CLI, and treat it as the default. - uv_snapshot!(context.filters(), add_shared_args(context.pip_compile(), context.temp_dir.path()) + uv_snapshot!(context.filters(), add_shared_args(context.pip_compile()) .arg("requirements.in") .arg("--show-settings") .arg("--index-url") @@ -6648,7 +6644,7 @@ fn index_priority() -> anyhow::Result<()> { ); // Prefer the `--extra-index-url` from the CLI, but not as the default. - uv_snapshot!(context.filters(), add_shared_args(context.pip_compile(), context.temp_dir.path()) + uv_snapshot!(context.filters(), add_shared_args(context.pip_compile()) .arg("requirements.in") .arg("--show-settings") .arg("--extra-index-url") @@ -6905,7 +6901,7 @@ fn verify_hashes() -> anyhow::Result<()> { let requirements_in = context.temp_dir.child("requirements.in"); requirements_in.write_str("anyio>3.0.0")?; - uv_snapshot!(context.filters(), add_shared_args(context.pip_install(), context.temp_dir.path()) + uv_snapshot!(context.filters(), add_shared_args(context.pip_install()) .arg("-r") .arg("requirements.in") .arg("--show-settings"), @r#" @@ -7077,7 +7073,7 @@ fn verify_hashes() -> anyhow::Result<()> { "# ); - uv_snapshot!(context.filters(), add_shared_args(context.pip_install(), context.temp_dir.path()) + uv_snapshot!(context.filters(), add_shared_args(context.pip_install()) .arg("-r") .arg("requirements.in") .arg("--no-verify-hashes") @@ -7248,7 +7244,7 @@ fn verify_hashes() -> anyhow::Result<()> { "# ); - uv_snapshot!(context.filters(), add_shared_args(context.pip_install(), context.temp_dir.path()) + uv_snapshot!(context.filters(), add_shared_args(context.pip_install()) .arg("-r") .arg("requirements.in") .arg("--require-hashes") @@ -7421,7 +7417,7 @@ fn verify_hashes() -> anyhow::Result<()> { "# ); - uv_snapshot!(context.filters(), add_shared_args(context.pip_install(), context.temp_dir.path()) + uv_snapshot!(context.filters(), add_shared_args(context.pip_install()) .arg("-r") .arg("requirements.in") .arg("--no-require-hashes") @@ -7592,7 +7588,7 @@ fn verify_hashes() -> anyhow::Result<()> { "# ); - uv_snapshot!(context.filters(), add_shared_args(context.pip_install(), context.temp_dir.path()) + uv_snapshot!(context.filters(), add_shared_args(context.pip_install()) .arg("-r") .arg("requirements.in") .env(EnvVars::UV_NO_VERIFY_HASHES, "1") @@ -7763,7 +7759,7 @@ fn verify_hashes() -> anyhow::Result<()> { "# ); - uv_snapshot!(context.filters(), add_shared_args(context.pip_install(), context.temp_dir.path()) + uv_snapshot!(context.filters(), add_shared_args(context.pip_install()) .arg("-r") .arg("requirements.in") .arg("--verify-hashes") @@ -7952,7 +7948,7 @@ fn preview_features() { let cmd = || { let mut cmd = context.version(); cmd.arg("--show-settings"); - add_shared_args(cmd, context.temp_dir.path()) + add_shared_args(cmd) }; uv_snapshot!(context.filters(), cmd().arg("--preview"), @r#" @@ -8687,7 +8683,7 @@ fn upgrade_pip_cli_config_interaction() -> anyhow::Result<()> { // `--no-upgrade` overrides `--upgrade-package`. // TODO(charlie): This should mark `sniffio` for upgrade, but it doesn't. - uv_snapshot!(context.filters(), add_shared_args(context.pip_compile(), context.temp_dir.path()) + uv_snapshot!(context.filters(), add_shared_args(context.pip_compile()) .arg("--no-upgrade") .arg("--upgrade-package") .arg("sniffio") @@ -8869,7 +8865,7 @@ fn upgrade_pip_cli_config_interaction() -> anyhow::Result<()> { "})?; // Despite `upgrade = false` in the configuration file, we should mark `idna` for upgrade. - uv_snapshot!(context.filters(), add_shared_args(context.pip_compile(), context.temp_dir.path()) + uv_snapshot!(context.filters(), add_shared_args(context.pip_compile()) .arg("--upgrade-package") .arg("idna") .arg("--show-settings") @@ -9073,7 +9069,7 @@ fn upgrade_pip_cli_config_interaction() -> anyhow::Result<()> { "})?; // Despite `--upgrade-package idna` in the command line, we should upgrade all packages. - uv_snapshot!(context.filters(), add_shared_args(context.pip_compile(), context.temp_dir.path()) + uv_snapshot!(context.filters(), add_shared_args(context.pip_compile()) .arg("--upgrade-package") .arg("idna") .arg("--show-settings") @@ -9253,7 +9249,7 @@ fn upgrade_pip_cli_config_interaction() -> anyhow::Result<()> { "#})?; // Despite `upgrade-package = ["idna"]` in the configuration file, we should disable upgrades. - uv_snapshot!(context.filters(), add_shared_args(context.pip_compile(), context.temp_dir.path()) + uv_snapshot!(context.filters(), add_shared_args(context.pip_compile()) .arg("--no-upgrade") .arg("--show-settings") .arg("requirements.in"), @r#" @@ -9426,7 +9422,7 @@ fn upgrade_pip_cli_config_interaction() -> anyhow::Result<()> { ); // Despite `upgrade-package = ["idna"]` in the configuration file, we should enable all upgrades. - uv_snapshot!(context.filters(), add_shared_args(context.pip_compile(), context.temp_dir.path()) + uv_snapshot!(context.filters(), add_shared_args(context.pip_compile()) .arg("--upgrade") .arg("--show-settings") .arg("requirements.in"), @r#" @@ -9599,7 +9595,7 @@ fn upgrade_pip_cli_config_interaction() -> anyhow::Result<()> { ); // Mark both `sniffio` and `idna` for upgrade. - uv_snapshot!(context.filters(), add_shared_args(context.pip_compile(), context.temp_dir.path()) + uv_snapshot!(context.filters(), add_shared_args(context.pip_compile()) .arg("--upgrade-package") .arg("sniffio") .arg("--show-settings") @@ -9838,7 +9834,7 @@ fn upgrade_project_cli_config_interaction() -> anyhow::Result<()> { // `--no-upgrade` overrides `--upgrade-package`. // TODO(charlie): This should mark `sniffio` for upgrade, but it doesn't. - uv_snapshot!(context.filters(), add_shared_args(context.lock(), context.temp_dir.path()) + uv_snapshot!(context.filters(), add_shared_args(context.lock()) .arg("--no-upgrade") .arg("--upgrade-package") .arg("sniffio") @@ -9963,7 +9959,7 @@ fn upgrade_project_cli_config_interaction() -> anyhow::Result<()> { "#})?; // Despite `upgrade = false` in the configuration file, we should mark `idna` for upgrade. - uv_snapshot!(context.filters(), add_shared_args(context.lock(), context.temp_dir.path()) + uv_snapshot!(context.filters(), add_shared_args(context.lock()) .arg("--upgrade-package") .arg("idna") .arg("--show-settings"), @r#" @@ -10110,7 +10106,7 @@ fn upgrade_project_cli_config_interaction() -> anyhow::Result<()> { "#})?; // Despite `--upgrade-package idna` on the CLI, we should upgrade all packages. - uv_snapshot!(context.filters(), add_shared_args(context.lock(), context.temp_dir.path()) + uv_snapshot!(context.filters(), add_shared_args(context.lock()) .arg("--upgrade-package") .arg("idna") .arg("--show-settings"), @r#" @@ -10233,7 +10229,7 @@ fn upgrade_project_cli_config_interaction() -> anyhow::Result<()> { "#})?; // Despite `upgrade-package = ["idna"]` in the configuration file, we should disable upgrades. - uv_snapshot!(context.filters(), add_shared_args(context.lock(), context.temp_dir.path()) + uv_snapshot!(context.filters(), add_shared_args(context.lock()) .arg("--no-upgrade") .arg("--show-settings"), @r#" success: true @@ -10345,7 +10341,7 @@ fn upgrade_project_cli_config_interaction() -> anyhow::Result<()> { ); // Despite `upgrade-package = ["idna"]` in the configuration file, we should enable all upgrades. - uv_snapshot!(context.filters(), add_shared_args(context.lock(), context.temp_dir.path()) + uv_snapshot!(context.filters(), add_shared_args(context.lock()) .arg("--upgrade") .arg("--show-settings"), @r#" success: true @@ -10457,7 +10453,7 @@ fn upgrade_project_cli_config_interaction() -> anyhow::Result<()> { ); // Mark both `sniffio` and `idna` for upgrade. - uv_snapshot!(context.filters(), add_shared_args(context.lock(), context.temp_dir.path()) + uv_snapshot!(context.filters(), add_shared_args(context.lock()) .arg("--upgrade-package") .arg("sniffio") .arg("--show-settings"), @r#" @@ -10634,7 +10630,7 @@ fn build_isolation_override() -> anyhow::Result<()> { let requirements_in = context.temp_dir.child("requirements.in"); requirements_in.write_str("numpy")?; - uv_snapshot!(context.filters(), add_shared_args(context.pip_compile(), context.temp_dir.path()) + uv_snapshot!(context.filters(), add_shared_args(context.pip_compile()) .arg("--show-settings") .arg("requirements.in") .arg("--no-build-isolation-package").arg("numpy"), @r#" @@ -10810,7 +10806,7 @@ fn build_isolation_override() -> anyhow::Result<()> { no-build-isolation = false "})?; - uv_snapshot!(context.filters(), add_shared_args(context.pip_compile(), context.temp_dir.path()) + uv_snapshot!(context.filters(), add_shared_args(context.pip_compile()) .arg("--show-settings") .arg("requirements.in") .arg("--no-build-isolation-package").arg("numpy"), @r#"