diff --git a/.github/workflows/sync-python-releases.yml b/.github/workflows/sync-python-releases.yml index bc54925ccda5..dbe92e918749 100644 --- a/.github/workflows/sync-python-releases.yml +++ b/.github/workflows/sync-python-releases.yml @@ -20,8 +20,8 @@ jobs: - uses: hynek/setup-cached-uv@v1 - name: Sync Python Releases run: | - uv run --isolated -- fetch-download-metadata.py - uv run --isolated -- template-download-metadata.py + uv run --no-workspace -- fetch-download-metadata.py + uv run --no-workspace -- template-download-metadata.py working-directory: ./crates/uv-python env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} diff --git a/crates/uv-cli/src/lib.rs b/crates/uv-cli/src/lib.rs index 4faa6cf3492d..40bf4d3f2ea5 100644 --- a/crates/uv-cli/src/lib.rs +++ b/crates/uv-cli/src/lib.rs @@ -154,7 +154,7 @@ pub struct GlobalArgs { /// Avoid discovering a `pyproject.toml` or `uv.toml` file in the current directory or any /// parent directories. - #[arg(global = true, long)] + #[arg(global = true, long, hide = true)] pub isolated: bool, /// Show the resolved settings for the current command. diff --git a/crates/uv-python/fetch-download-metadata.py b/crates/uv-python/fetch-download-metadata.py index 1715a967e807..dd532f07e34e 100755 --- a/crates/uv-python/fetch-download-metadata.py +++ b/crates/uv-python/fetch-download-metadata.py @@ -11,7 +11,7 @@ Usage: - uv run --isolated -- crates/uv-python/fetch-download-metadata.py + uv run --no-workspace -- crates/uv-python/fetch-download-metadata.py Acknowledgements: diff --git a/crates/uv-python/template-download-metadata.py b/crates/uv-python/template-download-metadata.py index 6f21855a1578..1c8c4e3d4833 100755 --- a/crates/uv-python/template-download-metadata.py +++ b/crates/uv-python/template-download-metadata.py @@ -11,7 +11,7 @@ Usage: - uv run --isolated -- crates/uv-python/template-download-metadata.py + uv run --no-workspace -- crates/uv-python/template-download-metadata.py """ import argparse diff --git a/crates/uv/src/lib.rs b/crates/uv/src/lib.rs index 45d949582cef..fc9c4a207546 100644 --- a/crates/uv/src/lib.rs +++ b/crates/uv/src/lib.rs @@ -23,6 +23,7 @@ use uv_cli::{SelfCommand, SelfNamespace}; use uv_configuration::Concurrency; use uv_requirements::RequirementsSource; use uv_settings::{Combine, FilesystemOptions}; +use uv_warnings::warn_user; use uv_workspace::{DiscoveryOptions, Workspace}; use crate::commands::{ExitStatus, ToolRunCommand}; @@ -136,6 +137,14 @@ async fn run(cli: Cli) -> Result { ) }))?; + if globals.isolated { + if globals.preview.is_enabled() { + warn_user!("The `--isolated` flag is deprecated. Instead, use `--no-config` to prevent uv from discovering configuration files, or `--no-workspace` to prevent uv from discovering a workspace in `uv run` and other commands."); + } else { + warn_user!("The `--isolated` flag is deprecated. Instead, use `--no-config` to prevent uv from discovering configuration files."); + } + } + debug!("uv {}", version::version()); // Write out any resolved settings. diff --git a/crates/uv/tests/help.rs b/crates/uv/tests/help.rs index ae95fa5834f4..3178c148dd5a 100644 --- a/crates/uv/tests/help.rs +++ b/crates/uv/tests/help.rs @@ -43,9 +43,6 @@ fn help() { --python-fetch Whether to automatically download Python when required [possible values: automatic, manual] - --isolated - Avoid discovering a `pyproject.toml` or `uv.toml` file in the current directory or any - parent directories --no-progress Hides all progress outputs when set -n, --no-cache @@ -109,9 +106,6 @@ fn help_flag() { --python-fetch Whether to automatically download Python when required [possible values: automatic, manual] - --isolated - Avoid discovering a `pyproject.toml` or `uv.toml` file in the current directory or any - parent directories --no-progress Hides all progress outputs when set -n, --no-cache @@ -174,9 +168,6 @@ fn help_short_flag() { --python-fetch Whether to automatically download Python when required [possible values: automatic, manual] - --isolated - Avoid discovering a `pyproject.toml` or `uv.toml` file in the current directory or any - parent directories --no-progress Hides all progress outputs when set -n, --no-cache @@ -280,10 +271,6 @@ fn help_subcommand() { - manual: Do not automatically fetch managed Python installations; require explicit installation - --isolated - Avoid discovering a `pyproject.toml` or `uv.toml` file in the current directory or any - parent directories - --no-progress Hides all progress outputs when set @@ -408,10 +395,6 @@ fn help_subsubcommand() { - manual: Do not automatically fetch managed Python installations; require explicit installation - --isolated - Avoid discovering a `pyproject.toml` or `uv.toml` file in the current directory or any - parent directories - --no-progress Hides all progress outputs when set @@ -490,9 +473,6 @@ fn help_flag_subcommand() { --python-fetch Whether to automatically download Python when required [possible values: automatic, manual] - --isolated - Avoid discovering a `pyproject.toml` or `uv.toml` file in the current directory or any - parent directories --no-progress Hides all progress outputs when set -n, --no-cache @@ -552,9 +532,6 @@ fn help_flag_subsubcommand() { --python-fetch Whether to automatically download Python when required [possible values: automatic, manual] - --isolated - Avoid discovering a `pyproject.toml` or `uv.toml` file in the current directory or any - parent directories --no-progress Hides all progress outputs when set -n, --no-cache @@ -671,9 +648,6 @@ fn help_with_global_option() { --python-fetch Whether to automatically download Python when required [possible values: automatic, manual] - --isolated - Avoid discovering a `pyproject.toml` or `uv.toml` file in the current directory or any - parent directories --no-progress Hides all progress outputs when set -n, --no-cache @@ -770,9 +744,6 @@ fn test_with_no_pager() { --python-fetch Whether to automatically download Python when required [possible values: automatic, manual] - --isolated - Avoid discovering a `pyproject.toml` or `uv.toml` file in the current directory or any - parent directories --no-progress Hides all progress outputs when set -n, --no-cache diff --git a/crates/uv/tests/init.rs b/crates/uv/tests/init.rs index 55ebd47308bc..3338c1f9db3f 100644 --- a/crates/uv/tests/init.rs +++ b/crates/uv/tests/init.rs @@ -580,6 +580,7 @@ fn init_isolated() -> Result<()> { ----- stdout ----- ----- stderr ----- + warning: The `--isolated` flag is deprecated. Instead, use `--no-config` to prevent uv from discovering configuration files. warning: `uv init` is experimental and may change without warning Initialized project `foo` "###); diff --git a/scripts/release.sh b/scripts/release.sh index f5ba61fb6d57..de3ff0b916b4 100755 --- a/scripts/release.sh +++ b/scripts/release.sh @@ -11,14 +11,14 @@ echo "Updating metadata with rooster..." cd "$project_root" # Update the preview changelog -uv tool run --from 'rooster-blue>=0.0.7' --python 3.12 --isolated -- \ +uv tool run --from 'rooster-blue>=0.0.7' --python 3.12 --isolate -- \ rooster release "$@" \ --only-sections preview \ --changelog-file PREVIEW-CHANGELOG.md \ --no-update-pyproject --no-update-version-files # Update the real changelog -uv tool run --from 'rooster-blue>=0.0.7' --python 3.12 --isolated -- \ +uv tool run --from 'rooster-blue>=0.0.7' --python 3.12 --isolate -- \ rooster release "$@" --without-sections preview echo "Updating lockfile..."