Skip to content

Add --show-with to uv tool list to list packages included by --with #13264

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 14 commits into from
May 6, 2025

Conversation

gaardhus
Copy link
Contributor

@gaardhus gaardhus commented May 2, 2025

Summary

Add a --show-extras argument to the uv tool list cli, to show which extra dependencies were installed with the tool.

i.e.

$ uv tool install fastapi --with requests --with typer==0.14
$ uv tool list --show-extras
fastapi v0.115.12 [extras: requests, typer==0.14]
- fastapi

Test Plan

Added a new test function based on the others in the same file, with the other arguments tested with the new argument as well.

@zanieb
Copy link
Member

zanieb commented May 2, 2025

Thanks for contributing! Is there an issue discussing this feature?

@gaardhus
Copy link
Contributor Author

gaardhus commented May 2, 2025

Tried looking but I couldn't find any; I needed the functionality my self so I just went ahead an implemented it.

@zanieb
Copy link
Member

zanieb commented May 2, 2025

Thanks for checking. Given that there wasn't prior discussion, we'll need to figure out what we want the user experience to look like here.

e.g., for:

[extras: requests, typer==0.14]

Should we show the extras after the --with dependencies? or add with: ? It seems confusing as-is.

Another option... should we just render it as fastapi[requests] v0.115.12?

What's the motivation for making this opt-in? Should we always show these?

@gaardhus
Copy link
Contributor Author

gaardhus commented May 2, 2025

Sure thing!

Thanks for checking. Given that there wasn't prior discussion, we'll need to figure out what we want the user experience to look like here.

e.g., for:

[extras: requests, typer==0.14]

Should we show the extras after the --with dependencies? or add with: ? It seems confusing as-is.

Currently I thought the terminology was that you installed extras with with in the case of uv tool install, if that makes sense?

https://docs.astral.sh/uv/concepts/tools/#including-additional-dependencies

However, renaming my implementation to --show-with and [with: requests] I think is fine.

Another option... should we just render it as fastapi[requests] v0.115.12?

What's the motivation for making this opt-in? Should we always show these?

I made it optional since I mainly needed it for debugging I guess? So if I just need to know which tools I have installed and are available, I don't really need to know the specific requirements, (i.e. also why I guess the --show-version-specifiers is also an argument). Also, it might get super cluttered if you have a lot of specified extras.

@zanieb
Copy link
Member

zanieb commented May 2, 2025

Oh, sorry I totally misunderstood. We can't say extras here as that term is a bit overloaded, i.e., it means a set of optional dependency for a package (see https://packaging.python.org/en/latest/guides/writing-pyproject-toml/#dependencies-optional-dependencies and https://packaging.python.org/en/latest/tutorials/installing-packages/#installing-extras). I should have read more carefully.

I think it's okay to do [with: ...] excluding version specifiers by default? --show-version-specifiers is indeed behind a flag because it adds a lot of visual noise, but [with: ] seems less likely to do that? My main concern would be users that do like... --with-requirements <file> and include a lot of additional dependencies. I'm not sure how we want to render that, even if it's opt-in.

@zanieb
Copy link
Member

zanieb commented May 2, 2025

(If we leave it opt-in, we need another flag name. Maybe just --show-with but that feels clunky to me for some reason)

@gaardhus
Copy link
Contributor Author

gaardhus commented May 2, 2025

Oh, sorry I totally misunderstood. We can't say extras here as that term is a bit overloaded, i.e., it means a set of optional dependency for a package (see https://packaging.python.org/en/latest/guides/writing-pyproject-toml/#dependencies-optional-dependencies and https://packaging.python.org/en/latest/tutorials/installing-packages/#installing-extras). I should have read more carefully.

Yeah, I was just about to say that: I see that extra(s) may not be that precise, since they are more directly tied with the actual dependencies of the package (https://docs.astral.sh/uv/pip/dependencies/#using-pyprojecttoml https://docs.astral.sh/uv/guides/integration/fastapi/#migrating-an-existing-fastapi-project).

I think it's okay to do [with: ...] excluding version specifiers by default? --show-version-specifiers is indeed behind a flag because it adds a lot of visual noise, but [with: ] seems less likely to do that? My main concern would be users that do like... --with-requirements <file> and include a lot of additional dependencies. I'm not sure how we want to render that, even if it's opt-in.

For my use cases I would still think it should be an argument rather than default behavior. Running uv tool list to get a very brief and minimal overview of the tools and their executeables is nice, and when I need more information (which will generally be for some form of debugging?) its nice to have the arguments.

(If we leave it opt-in, we need another flag name. Maybe just --show-with but that feels clunky to me for some reason)

Agree, maybe that's also why I went with --show-extras. Could be --show-with-requirements or --show-extra-requirements?

@gaardhus
Copy link
Contributor Author

gaardhus commented May 2, 2025

I think it's okay to do [with: ...] excluding version specifiers by default? --show-version-specifiers is indeed behind a flag because it adds a lot of visual noise, but [with: ] seems less likely to do that? My main concern would be users that do like... --with-requirements <file> and include a lot of additional dependencies. I'm not sure how we want to render that, even if it's opt-in.

For my use cases I would still think it should be an argument rather than default behavior. Running uv tool list to get a very brief and minimal overview of the tools and their executeables is nice, and when I need more information (which will generally be for some form of debugging?) its nice to have the arguments.

Also, I have a hard time imagining the new argument to show less visual noise than --show-version-specifiers does?

(If we leave it opt-in, we need another flag name. Maybe just --show-with but that feels clunky to me for some reason)

Agree, maybe that's also why I went with --show-extras. Could be --show-with-requirements or --show-extra-requirements?

Or maybe the super verbose --show-with-extra-requirements

@gaardhus
Copy link
Contributor Author

gaardhus commented May 2, 2025

Just throwing in another solution: To merge the --show-version-specifiers with my argument into --show-specifiers or --show-all-specifiers

@zanieb
Copy link
Member

zanieb commented May 2, 2025

I don't think --show-specifiers makes sense for including these "additional" package names.

I think --show-with makes the most sense for now. I think we can easily rename it in the future if we want.

@gaardhus
Copy link
Contributor Author

gaardhus commented May 2, 2025

Last suggestion would be to reword extra to additional, also in uv tool install --help

      --with <WITH>
          Include the following additional requirements

and then for uv tool list --help

  --show-additional-requirements              Whether to display the additional requirements installed with
                             each tool

and maybe still [with: ...] in the output of the actual command?

I don't feel strong about either, so up to you what I should implement.

and rename extras to extra requirements in code and doc
.iter()
.filter(|req| req.name != name)
.map(|req| {
if !req.source.to_string().is_empty() {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is the requirement source display ever empty?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I just copied the filtering from the code block above, but removing any if them doesn't change the output or the status of the tests? So I guess either remove them, or if the are required ideally add test cases to capture that?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think it's possible for it to be empty from looking at the implementation 🤷‍♀️ not sure why it's that way.

}
} else {
String::new()
};
Copy link
Member

@zanieb zanieb May 6, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think you could rewrite this entire block as something like

        let extra_requirements = (show_with && !tool.requirements().is_empty())
            .then(|| {
                let requirements = tool
                    .requirements()
                    .iter()
                    // Exclude the package itself
                    .filter(|req| req.name != name)
                    .map(|req| format!("{}{}", req.name, req.source))
                    .join(", ");
                format!(" [with: {requirements}]")
            })
            .unwrap_or_default();

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Okay that broke some stuff, need to add a check that requirements exists, I guess since installing without any --with requirements still returns the original package, and hence returns an empty [width: ] string. Will add the original test without any --with requirements which I was supposed to test this back in the test suite.

Copy link
Contributor Author

@gaardhus gaardhus May 6, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm super new to rust, so sorry if there is something I don't ace.

Since the requirements array may be empty, I think we do need an if else clause here before inserting the values?

So currently working implementation would be

        let with_requirements = (show_with && !tool.requirements().is_empty())
            .then(|| {
                let requirements = tool
                    .requirements()
                    .iter()
                    .filter(|req| req.name != name)
                    .map(|req| format!("{}{}", req.name, req.source))
                    .join(", ");
                if requirements.is_empty() {
                    String::new()
                } else {
                    format!(" [with: {requirements}]")
                }
            })
            .unwrap_or_default();

My initial implementation was based on the version_specifier parsing on the lines above. So if you prefer unwrap_or_default should I also change that chunk to mirror that, ie.

        let version_specifier = show_version_specifiers
            .then(|| {
                let specifiers = tool
                    .requirements()
                    .iter()
                    .filter(|req| req.name == name)
                    .map(|req| req.source.to_string())
                    .filter(|s| !s.is_empty())
                    .join(", ");
                if specifiers.is_empty() {
                    String::new()
                } else {
                    format!(" [required: {specifiers}]")
                }
            })
            .unwrap_or_default();

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You could just do (show_with && tool.requirements().len() > 1), though it's a bit less elegant since it doesn't capture that after the filter.

The prettier way is like..

        let extra_requirements = show_with
            .then(|| {
                tool.requirements()
                    .iter()
                    // Exclude the package itself
                    .filter(|req| req.name != name)
                    .peekable()
            })
            // Omit the `[with: ...]` if there are no extra requirements
            .filter(|requirements| requirements.peek().is_some())
            .map(|requirements| {
                let requirements = requirements
                    .iter()
                    .map(|req| format!("{}{}", req.name, req.source))
                    .join(", ");
                format!(" [with: {requirements}]")
            })
            .unwrap_or_default();

Copy link
Member

@zanieb zanieb May 6, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You could just do (show_with && tool.requirements().len() > 1), though it's a bit less elegant since overlaps with the logic encoded in the filter.

The prettier way is like..

        let extra_requirements = show_with
            .then(|| {
                tool.requirements()
                    .iter()
                    // Exclude the package itself
                    .filter(|req| req.name != name)
                    .peekable()
            })
            // Omit the `[with: ...]` if there are no extra requirements
            .filter(|requirements| requirements.peek().is_some())
            .map(|requirements| {
                let requirements = requirements
                    .iter()
                    .map(|req| format!("{}{}", req.name, req.source))
                    .join(", ");
                format!(" [with: {requirements}]")
            })
            .unwrap_or_default();

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for your suggestions and detailed review!

I couldn't make the peekable work, the compiler kept throwing errors about mutability.

So I tried reimplementing and unifying the two functions like this

        let tool_requirements = (show_version_specifiers | show_with)
            .then(|| tool.requirements())
            .unwrap_or_default();

        let version_specifier = show_version_specifiers
            .then(|| {
                let specifiers = tool_requirements
                    .iter()
                    .filter(|req| req.name == name)
                    .map(|req| req.source.to_string())
                    .filter(|s| !s.is_empty())
                    .join(", ");
                (!specifiers.is_empty())
                    .then(|| format!(" [required: {specifiers}]"))
                    .unwrap_or_default()
            })
            .unwrap_or_default();

        let with_requirements = (show_with && tool_requirements.len() > 1)
            .then(|| {
                let requirements = tool_requirements
                    .iter()
                    .filter(|req| req.name != name)
                    .map(|req| format!("{}{}", req.name, req.source))
                    .join(", ");
                format!(" [with: {requirements}]")
            })
            .unwrap_or_default();

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah sorry about that, the mutable reference thing is annoying... I'm not sure if there's a fix for that (but I'll ask someone who knows more than me).

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah .take_if(|requirements| requirements.peek().is_some()) works instead of .filter(...)

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

(Rust's idioms around options take a while to learn, but they are nice once you get the hang of it)

Copy link
Contributor Author

@gaardhus gaardhus May 6, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Then they become

        let version_specifier = show_version_specifiers
            .then(|| {
                tool.requirements()
                    .iter()
                    .filter(|req| req.name == name)
                    .map(|req| req.source.to_string())
                    .filter(|s| !s.is_empty())
                    .peekable()
            })
            .take_if(|specifiers| specifiers.peek().is_some())
            .map(|mut specifiers| {
                let specifiers = specifiers.join(", ");
                format!(" [required: {specifiers}]")
            })
            .unwrap_or_default();

        let with_requirements = show_with
            .then(|| {
                tool.requirements()
                    .iter()
                    .filter(|req| req.name != name)
                    .peekable()
            })
            .take_if(|requirements| requirements.peek().is_some())
            .map(|requirements| {
                let requirements = requirements
                    .map(|req| format!("{}{}", req.name, req.source))
                    .join(", ");
                format!(" [with: {requirements}]")
            })
            .unwrap_or_default();

if I'm not mistaken?

@zanieb zanieb changed the title Add --show-extras argument to uv tool list cli Add --show-with to uv tool list to list packages included by --with May 6, 2025
- blackd
flask v3.0.2 [with: requests, black==24.2.0]
- flask
ruff v0.3.4 [required: ==0.3.4] [with: requests]
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do you think these should be separate blocks? Should it be [required: ..., with: ...]?

There's no need for this stylistic nit to block this pull request, we can address this afterwards if we want.

cc @charliermarsh curious if you have a stance.

Copy link
Member

@zanieb zanieb left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for your patience!

@zanieb zanieb added the cli Related to the command line interface label May 6, 2025
gaardhus added 2 commits May 6, 2025 21:23
my auto formatter deleted the whitespace when I saved other changes to
the file...
@zanieb zanieb merged commit 5e7f3d2 into astral-sh:main May 6, 2025
86 checks passed
tmeijn pushed a commit to tmeijn/dotfiles that referenced this pull request May 10, 2025
This MR contains the following updates:

| Package | Update | Change |
|---|---|---|
| [astral-sh/uv](https://github.com/astral-sh/uv) | minor | `0.6.16` -> `0.7.3` |

MR created with the help of [el-capitano/tools/renovate-bot](https://gitlab.com/el-capitano/tools/renovate-bot).

**Proposed changes to behavior should be submitted there as MRs.**

---

### Release Notes

<details>
<summary>astral-sh/uv (astral-sh/uv)</summary>

### [`v0.7.3`](https://github.com/astral-sh/uv/blob/HEAD/CHANGELOG.md#073)

[Compare Source](astral-sh/uv@0.7.2...0.7.3)

##### Enhancements

-   Add `--dry-run` support to `uv self update` ([#&#8203;9829](astral-sh/uv#9829))
-   Add `--show-with` to `uv tool list` to list packages included by `--with` ([#&#8203;13264](astral-sh/uv#13264))
-   De-duplicate fetched index URLs ([#&#8203;13205](astral-sh/uv#13205))
-   Support more zip compression formats: bzip2, lzma, xz, zstd ([#&#8203;13285](astral-sh/uv#13285))
-   Add support for downloading GraalPy ([#&#8203;13172](astral-sh/uv#13172))
-   Improve error message when a virtual environment Python symlink is broken ([#&#8203;12168](astral-sh/uv#12168))
-   Use `fs_err` for paths in symlinking errors ([#&#8203;13303](astral-sh/uv#13303))
-   Minify and embed managed Python JSON at compile time ([#&#8203;12967](astral-sh/uv#12967))

##### Preview features

-   Build backend: Make preview default and add configuration docs ([#&#8203;12804](astral-sh/uv#12804))
-   Build backend: Allow escaping in globs ([#&#8203;13313](astral-sh/uv#13313))
-   Build backend: Make builds reproducible across operating systems ([#&#8203;13171](astral-sh/uv#13171))

##### Configuration

-   Add `python-downloads-json-url` option for `uv.toml` to configure custom Python installations via JSON URL ([#&#8203;12974](astral-sh/uv#12974))

##### Bug fixes

-   Check nested IO errors for retries ([#&#8203;13260](astral-sh/uv#13260))
-   Accept `musllinux_1_0` as a valid platform tag ([#&#8203;13289](astral-sh/uv#13289))
-   Fix discovery of pre-release managed Python versions in range requests ([#&#8203;13330](astral-sh/uv#13330))
-   Respect locked script preferences in `uv run --with` ([#&#8203;13283](astral-sh/uv#13283))
-   Retry streaming downloads on broken pipe errors ([#&#8203;13281](astral-sh/uv#13281))
-   Treat already-installed base environment packages as preferences in `uv run --with` ([#&#8203;13284](astral-sh/uv#13284))
-   Avoid enumerating sources in errors for path Python requests ([#&#8203;13335](astral-sh/uv#13335))
-   Avoid re-creating virtual environment with `--no-sync` ([#&#8203;13287](astral-sh/uv#13287))

##### Documentation

-   Remove outdated description of index strategy ([#&#8203;13326](astral-sh/uv#13326))
-   Update "Viewing the version" docs ([#&#8203;13241](astral-sh/uv#13241))

### [`v0.7.2`](https://github.com/astral-sh/uv/blob/HEAD/CHANGELOG.md#072)

[Compare Source](astral-sh/uv@0.7.1...0.7.2)

##### Enhancements

-   Improve trace log for retryable errors ([#&#8203;13228](astral-sh/uv#13228))
-   Use "error" instead of "warning" for self-update message ([#&#8203;13229](astral-sh/uv#13229))
-   Error when `uv version` is used with project-specific flags but no project is found ([#&#8203;13203](astral-sh/uv#13203))

##### Bug fixes

-   Fix incorrect virtual environment invalidation for pre-release Python versions ([#&#8203;13234](astral-sh/uv#13234))
-   Fix patching of `clang` in managed Python sysconfig ([#&#8203;13237](astral-sh/uv#13237))
-   Respect `--project` in `uv version` ([#&#8203;13230](astral-sh/uv#13230))

### [`v0.7.1`](https://github.com/astral-sh/uv/blob/HEAD/CHANGELOG.md#071)

[Compare Source](astral-sh/uv@0.7.0...0.7.1)

##### Enhancement

-   Add support for BLAKE2b-256 ([#&#8203;13204](astral-sh/uv#13204))

##### Bugfix

-   Revert fix handling of authentication when encountering redirects ([#&#8203;13215](astral-sh/uv#13215))

### [`v0.7.0`](https://github.com/astral-sh/uv/blob/HEAD/CHANGELOG.md#070)

[Compare Source](astral-sh/uv@0.6.17...0.7.0)

This release contains various changes that improve correctness and user experience, but could break some workflows; many changes have been marked as breaking out of an abundance of caution. We expect most users to be able to upgrade without making changes.

##### Breaking changes

-   **Update `uv version` to display and update project versions ([#&#8203;12349](astral-sh/uv#12349

    Previously, `uv version` displayed uv's version. Now, `uv version` will display or update the project's version. This interface was [heavily requested](astral-sh/uv#6298) and, after much consideration, we decided that transitioning the top-level command was the best option.

    Here's a brief example:

    ```console
    $ uv init example
    Initialized project `example` at `./example`
    $ cd example
    $ uv version
    example 0.1.0
    $ uv version --bump major
    example 0.1.0 => 1.0.0
    $ uv version --short
    1.0.0
    ```

    If used outside of a project, uv will fallback to showing its own version still:

    ```console
    $ uv version
    warning: failed to read project: No `pyproject.toml` found in current directory or any parent directory
      running `uv self version` for compatibility with old `uv version` command.
      this fallback will be removed soon, pass `--preview` to make this an error.

    uv 0.7.0 (4433f41c9 2025-04-29)
    ```

    As described in the warning, `--preview` can be used to error instead:

    ```console
    $ uv version --preview
    error: No `pyproject.toml` found in current directory or any parent directory
    ```

    The previous functionality of `uv version` was moved to `uv self version`.
-   **Avoid fallback to subsequent indexes on authentication failure ([#&#8203;12805](astral-sh/uv#12805

    When using the `first-index` strategy (the default), uv will stop searching indexes for a package once it is found on a single index. Previously, uv considered a package as "missing" from an index during authentication failures, such as an HTTP 401 or HTTP 403 (normally, missing packages are represented by an HTTP 404). This behavior was motivated by unusual responses from some package indexes, but reduces the safety of uv's index strategy when authentication fails. Now, uv will consider an authentication failure as a stop-point when searching for a package across indexes. The `index.ignore-error-codes` option can be used to recover the existing behavior, e.g.:

    ```toml
    [[tool.uv.index]]
    name = "pytorch"
    url = "https://download.pytorch.org/whl/cpu"
    ignore-error-codes = [401, 403]
    ```

    Since PyTorch's indexes always return a HTTP 403 for missing packages, uv special-cases indexes on the `pytorch.org` domain to ignore that error code by default.
-   **Require the command in `uvx <name>` to be available in the Python environment ([#&#8203;11603](astral-sh/uv#11603

    Previously, `uvx` would attempt to execute a command even if it was not provided by a Python package. For example, if we presume `foo` is an empty Python package which provides no command, `uvx foo` would invoke the `foo` command on the `PATH` (if present). Now, uv will error early if the `foo` executable is not provided by the requested Python package. This check is not enforced when `--from` is used, so patterns like `uvx --from foo bash -c "..."` are still valid. uv also still allows `uvx foo` where the `foo` executable is provided by a dependency of `foo` instead of `foo` itself, as this is fairly common for packages which depend on a dedicated package for their command-line interface.
-   **Use index URL instead of package URL for keyring credential lookups ([#&#8203;12651](astral-sh/uv#12651

    When determining credentials for querying a package URL, uv previously sent the full URL to the `keyring` command. However, some keyring plugins expect to receive the *index URL* (which is usually a parent of the package URL). Now, uv requests credentials for the index URL instead. This behavior matches `pip`.
-   **Remove `--version` from subcommands ([#&#8203;13108](astral-sh/uv#13108

    Previously, uv allowed the `--version` flag on arbitrary subcommands, e.g., `uv run --version`. However, the `--version` flag is useful for other operations since uv is a package manager. Consequently, we've removed the `--version` flag from subcommands — it is only available as `uv --version`.
-   **Omit Python 3.7 downloads from managed versions ([#&#8203;13022](astral-sh/uv#13022

    Python 3.7 is EOL and not formally supported by uv; however, Python 3.7 was previously available for download on a subset of platforms.
-   **Reject non-PEP 751 TOML files in install, compile, and export commands ([#&#8203;13120](astral-sh/uv#13120), [#&#8203;13119](astral-sh/uv#13119

    Previously, uv treated arbitrary `.toml` files passed to commands (e.g., `uv pip install -r foo.toml` or `uv pip compile -o foo.toml`) as `requirements.txt`-formatted files. Now, uv will error instead. If using PEP 751 lockfiles, use the standardized format for custom names instead, e.g., `pylock.foo.toml`.
-   **Ignore arbitrary Python requests in version files ([#&#8203;12909](astral-sh/uv#12909

    uv allows arbitrary strings to be used for Python version requests, in which they are treated as an executable name to search for in the `PATH`. However, using this form of request in `.python-version` files is non-standard and conflicts with `pyenv-virtualenv` which writes environment names to `.python-version` files. In this release, uv will now ignore requests that are arbitrary strings when found in `.python-version` files.
-   **Error on unknown dependency object specifiers ([12811](astral-sh/uv#12811

    The `[dependency-groups]` entries can include "object specifiers", e.g. `set-phasers-to = ...` in:

    ```toml
    [dependency-groups]
    foo = ["pyparsing"]
    bar = [{set-phasers-to = "stun"}]
    ```

    However, the only current spec-compliant object specifier is `include-group`. Previously, uv would ignore unknown object specifiers. Now, uv will error.
-   **Make `--frozen` and `--no-sources` conflicting options ([#&#8203;12671](astral-sh/uv#12671

    Using `--no-sources` always requires a new resolution and `--frozen` will always fail when used with it. Now, this conflict is encoded in the CLI options for clarity.
-   **Treat empty `UV_PYTHON_INSTALL_DIR` and `UV_TOOL_DIR` as unset ([#&#8203;12907](astral-sh/uv#12907), [#&#8203;12905](astral-sh/uv#12905

    Previously, these variables were treated as set to the current working directory when set to an empty string. Now, uv will ignore these variables when empty. This matches uv's behavior for other environment variables which configure directories.

##### Enhancements

-   Disallow mixing requirements across PyTorch indexes ([#&#8203;13179](astral-sh/uv#13179))
-   Add optional managed Python archive download cache ([#&#8203;12175](astral-sh/uv#12175))
-   Add `poetry-core` as a `uv init` build backend option ([#&#8203;12781](astral-sh/uv#12781))
-   Show tag hints when failing to find a compatible wheel in `pylock.toml` ([#&#8203;13136](astral-sh/uv#13136))
-   Report Python versions in `pyvenv.cfg` version mismatch ([#&#8203;13027](astral-sh/uv#13027))

##### Bug fixes

-   Avoid erroring on omitted wheel-only packages in `pylock.toml` ([#&#8203;13132](astral-sh/uv#13132))
-   Fix display name for `uvx --version` ([#&#8203;13109](astral-sh/uv#13109))
-   Restore handling of authentication when encountering redirects ([#&#8203;13050](astral-sh/uv#13050))
-   Respect build options (`--no-binary` et al) in `pylock.toml` ([#&#8203;13134](astral-sh/uv#13134))
-   Use `upload-time` rather than `upload_time` in `uv.lock` ([#&#8203;13176](astral-sh/uv#13176))

##### Documentation

-   Changed `fish` completions append `>>` to overwrite `>` ([#&#8203;13130](astral-sh/uv#13130))
-   Add `pylock.toml` mentions where relevant ([#&#8203;13115](astral-sh/uv#13115))
-   Add ROCm example to the PyTorch guide ([#&#8203;13200](astral-sh/uv#13200))
-   Upgrade PyTorch guide to CUDA 12.8 and PyTorch 2.7 ([#&#8203;13199](astral-sh/uv#13199))

### [`v0.6.17`](https://github.com/astral-sh/uv/releases/tag/0.6.17)

[Compare Source](astral-sh/uv@0.6.16...0.6.17)

#### Release Notes

##### Preview features

-   Add PyTorch v2.7.0 to GPU backend ([#&#8203;13072](astral-sh/uv#13072))

##### Bug fixes

-   Avoid panic for invalid Python versions ([#&#8203;13077](astral-sh/uv#13077))
-   Block scripts from overwriting `python` ([#&#8203;13051](astral-sh/uv#13051))
-   Check distribution names to handle invalid redirects ([#&#8203;12917](astral-sh/uv#12917))
-   Check for mismatched package and distribution names on resolver thread ([#&#8203;13088](astral-sh/uv#13088))
-   Fix panic with invalid last character in PEP 508 name ([#&#8203;13105](astral-sh/uv#13105))
-   Reject `requires-python` even if not listed on the index page ([#&#8203;13086](astral-sh/uv#13086))

#### Install uv 0.6.17

##### Install prebuilt binaries via shell script

```sh
curl --proto '=https' --tlsv1.2 -LsSf https://github.com/astral-sh/uv/releases/download/0.6.17/uv-installer.sh | sh
```

##### Install prebuilt binaries via powershell script

```sh
powershell -ExecutionPolicy Bypass -c "irm https://github.com/astral-sh/uv/releases/download/0.6.17/uv-installer.ps1 | iex"
```

#### Download uv 0.6.17

|  File  | Platform | Checksum |
|--------|----------|----------|
| [uv-aarch64-apple-darwin.tar.gz](https://github.com/astral-sh/uv/releases/download/0.6.17/uv-aarch64-apple-darwin.tar.gz) | Apple Silicon macOS | [checksum](https://github.com/astral-sh/uv/releases/download/0.6.17/uv-aarch64-apple-darwin.tar.gz.sha256) |
| [uv-x86\_64-apple-darwin.tar.gz](https://github.com/astral-sh/uv/releases/download/0.6.17/uv-x86\_64-apple-darwin.tar.gz) | Intel macOS | [checksum](https://github.com/astral-sh/uv/releases/download/0.6.17/uv-x86\_64-apple-darwin.tar.gz.sha256) |
| [uv-aarch64-pc-windows-msvc.zip](https://github.com/astral-sh/uv/releases/download/0.6.17/uv-aarch64-pc-windows-msvc.zip) | ARM64 Windows | [checksum](https://github.com/astral-sh/uv/releases/download/0.6.17/uv-aarch64-pc-windows-msvc.zip.sha256) |
| [uv-i686-pc-windows-msvc.zip](https://github.com/astral-sh/uv/releases/download/0.6.17/uv-i686-pc-windows-msvc.zip) | x86 Windows | [checksum](https://github.com/astral-sh/uv/releases/download/0.6.17/uv-i686-pc-windows-msvc.zip.sha256) |
| [uv-x86\_64-pc-windows-msvc.zip](https://github.com/astral-sh/uv/releases/download/0.6.17/uv-x86\_64-pc-windows-msvc.zip) | x64 Windows | [checksum](https://github.com/astral-sh/uv/releases/download/0.6.17/uv-x86\_64-pc-windows-msvc.zip.sha256) |
| [uv-aarch64-unknown-linux-gnu.tar.gz](https://github.com/astral-sh/uv/releases/download/0.6.17/uv-aarch64-unknown-linux-gnu.tar.gz) | ARM64 Linux | [checksum](https://github.com/astral-sh/uv/releases/download/0.6.17/uv-aarch64-unknown-linux-gnu.tar.gz.sha256) |
| [uv-i686-unknown-linux-gnu.tar.gz](https://github.com/astral-sh/uv/releases/download/0.6.17/uv-i686-unknown-linux-gnu.tar.gz) | x86 Linux | [checksum](https://github.com/astral-sh/uv/releases/download/0.6.17/uv-i686-unknown-linux-gnu.tar.gz.sha256) |
| [uv-powerpc64-unknown-linux-gnu.tar.gz](https://github.com/astral-sh/uv/releases/download/0.6.17/uv-powerpc64-unknown-linux-gnu.tar.gz) | PPC64 Linux | [checksum](https://github.com/astral-sh/uv/releases/download/0.6.17/uv-powerpc64-unknown-linux-gnu.tar.gz.sha256) |
| [uv-powerpc64le-unknown-linux-gnu.tar.gz](https://github.com/astral-sh/uv/releases/download/0.6.17/uv-powerpc64le-unknown-linux-gnu.tar.gz) | PPC64LE Linux | [checksum](https://github.com/astral-sh/uv/releases/download/0.6.17/uv-powerpc64le-unknown-linux-gnu.tar.gz.sha256) |
| [uv-s390x-unknown-linux-gnu.tar.gz](https://github.com/astral-sh/uv/releases/download/0.6.17/uv-s390x-unknown-linux-gnu.tar.gz) | S390x Linux | [checksum](https://github.com/astral-sh/uv/releases/download/0.6.17/uv-s390x-unknown-linux-gnu.tar.gz.sha256) |
| [uv-x86\_64-unknown-linux-gnu.tar.gz](https://github.com/astral-sh/uv/releases/download/0.6.17/uv-x86\_64-unknown-linux-gnu.tar.gz) | x64 Linux | [checksum](https://github.com/astral-sh/uv/releases/download/0.6.17/uv-x86\_64-unknown-linux-gnu.tar.gz.sha256) |
| [uv-armv7-unknown-linux-gnueabihf.tar.gz](https://github.com/astral-sh/uv/releases/download/0.6.17/uv-armv7-unknown-linux-gnueabihf.tar.gz) | ARMv7 Linux | [checksum](https://github.com/astral-sh/uv/releases/download/0.6.17/uv-armv7-unknown-linux-gnueabihf.tar.gz.sha256) |
| [uv-aarch64-unknown-linux-musl.tar.gz](https://github.com/astral-sh/uv/releases/download/0.6.17/uv-aarch64-unknown-linux-musl.tar.gz) | ARM64 MUSL Linux | [checksum](https://github.com/astral-sh/uv/releases/download/0.6.17/uv-aarch64-unknown-linux-musl.tar.gz.sha256) |
| [uv-i686-unknown-linux-musl.tar.gz](https://github.com/astral-sh/uv/releases/download/0.6.17/uv-i686-unknown-linux-musl.tar.gz) | x86 MUSL Linux | [checksum](https://github.com/astral-sh/uv/releases/download/0.6.17/uv-i686-unknown-linux-musl.tar.gz.sha256) |
| [uv-x86\_64-unknown-linux-musl.tar.gz](https://github.com/astral-sh/uv/releases/download/0.6.17/uv-x86\_64-unknown-linux-musl.tar.gz) | x64 MUSL Linux | [checksum](https://github.com/astral-sh/uv/releases/download/0.6.17/uv-x86\_64-unknown-linux-musl.tar.gz.sha256) |
| [uv-arm-unknown-linux-musleabihf.tar.gz](https://github.com/astral-sh/uv/releases/download/0.6.17/uv-arm-unknown-linux-musleabihf.tar.gz) | ARMv6 MUSL Linux (Hardfloat) | [checksum](https://github.com/astral-sh/uv/releases/download/0.6.17/uv-arm-unknown-linux-musleabihf.tar.gz.sha256) |
| [uv-armv7-unknown-linux-musleabihf.tar.gz](https://github.com/astral-sh/uv/releases/download/0.6.17/uv-armv7-unknown-linux-musleabihf.tar.gz) | ARMv7 MUSL Linux | [checksum](https://github.com/astral-sh/uv/releases/download/0.6.17/uv-armv7-unknown-linux-musleabihf.tar.gz.sha256) |

</details>

---

### Configuration

📅 **Schedule**: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined).

🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied.

♻ **Rebasing**: Whenever MR becomes conflicted, or you tick the rebase/retry checkbox.

🔕 **Ignore**: Close this MR and you won't be reminded about this update again.

---

 - [ ] <!-- rebase-check -->If you want to rebase/retry this MR, check this box

---

This MR has been generated by [Renovate Bot](https://github.com/renovatebot/renovate).
<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzOS4yNTcuOCIsInVwZGF0ZWRJblZlciI6IjM5LjI2NC4wIiwidGFyZ2V0QnJhbmNoIjoibWFpbiIsImxhYmVscyI6WyJSZW5vdmF0ZSBCb3QiXX0=-->
netbsd-srcmastr pushed a commit to NetBSD/pkgsrc that referenced this pull request May 11, 2025
## 0.7.3

### Enhancements

- Add `--dry-run` support to `uv self update` ([#9829](astral-sh/uv#9829))
- Add `--show-with` to `uv tool list` to list packages included by `--with` ([#13264](astral-sh/uv#13264))
- De-duplicate fetched index URLs ([#13205](astral-sh/uv#13205))
- Support more zip compression formats: bzip2, lzma, xz, zstd ([#13285](astral-sh/uv#13285))
- Add support for downloading GraalPy ([#13172](astral-sh/uv#13172))
- Improve error message when a virtual environment Python symlink is broken ([#12168](astral-sh/uv#12168))
- Use `fs_err` for paths in symlinking errors ([#13303](astral-sh/uv#13303))
- Minify and embed managed Python JSON at compile time ([#12967](astral-sh/uv#12967))

### Preview features

- Build backend: Make preview default and add configuration docs ([#12804](astral-sh/uv#12804))
- Build backend: Allow escaping in globs ([#13313](astral-sh/uv#13313))
- Build backend: Make builds reproducible across operating systems ([#13171](astral-sh/uv#13171))

### Configuration

- Add `python-downloads-json-url` option for `uv.toml` to configure custom Python installations via JSON URL ([#12974](astral-sh/uv#12974))

### Bug fixes

- Check nested IO errors for retries ([#13260](astral-sh/uv#13260))
- Accept `musllinux_1_0` as a valid platform tag ([#13289](astral-sh/uv#13289))
- Fix discovery of pre-release managed Python versions in range requests ([#13330](astral-sh/uv#13330))
- Respect locked script preferences in `uv run --with` ([#13283](astral-sh/uv#13283))
- Retry streaming downloads on broken pipe errors ([#13281](astral-sh/uv#13281))
- Treat already-installed base environment packages as preferences in `uv run --with` ([#13284](astral-sh/uv#13284))
- Avoid enumerating sources in errors for path Python requests ([#13335](astral-sh/uv#13335))
- Avoid re-creating virtual environment with `--no-sync` ([#13287](astral-sh/uv#13287))

### Documentation

- Remove outdated description of index strategy ([#13326](astral-sh/uv#13326))
- Update "Viewing the version" docs ([#13241](astral-sh/uv#13241))
sai-rekhawar pushed a commit to sai-rekhawar/cloe-nessy-py that referenced this pull request Jul 1, 2025
This PR contains the following updates:

| Package | Type | Update | Change |
|---|---|---|---|
| [ghcr.io/astral-sh/uv](https://github.com/astral-sh/uv) | final | patch | `0.7.2` -> `0.7.3` |

---

### Release Notes

<details>
<summary>astral-sh/uv (ghcr.io/astral-sh/uv)</summary>

### [`v0.7.3`](https://github.com/astral-sh/uv/blob/HEAD/CHANGELOG.md#073)

[Compare Source](astral-sh/uv@0.7.2...0.7.3)

##### Enhancements

-   Add `--dry-run` support to `uv self update` ([#&#8203;9829](astral-sh/uv#9829))
-   Add `--show-with` to `uv tool list` to list packages included by `--with` ([#&#8203;13264](astral-sh/uv#13264))
-   De-duplicate fetched index URLs ([#&#8203;13205](astral-sh/uv#13205))
-   Support more zip compression formats: bzip2, lzma, xz, zstd ([#&#8203;13285](astral-sh/uv#13285))
-   Add support for downloading GraalPy ([#&#8203;13172](astral-sh/uv#13172))
-   Improve error message when a virtual environment Python symlink is broken ([#&#8203;12168](astral-sh/uv#12168))
-   Use `fs_err` for paths in symlinking errors ([#&#8203;13303](astral-sh/uv#13303))
-   Minify and embed managed Python JSON at compile time ([#&#8203;12967](astral-sh/uv#12967))

##### Preview features

-   Build backend: Make preview default and add configuration docs ([#&#8203;12804](astral-sh/uv#12804))
-   Build backend: Allow escaping in globs ([#&#8203;13313](astral-sh/uv#13313))
-   Build backend: Make builds reproducible across operating systems ([#&#8203;13171](astral-sh/uv#13171))

##### Configuration

-   Add `python-downloads-json-url` option for `uv.toml` to configure custom Python installations via JSON URL ([#&#8203;12974](astral-sh/uv#12974))

##### Bug fixes

-   Check nested IO errors for retries ([#&#8203;13260](astral-sh/uv#13260))
-   Accept `musllinux_1_0` as a valid platform tag ([#&#8203;13289](astral-sh/uv#13289))
-   Fix discovery of pre-release managed Python versions in range requests ([#&#8203;13330](astral-sh/uv#13330))
-   Respect locked script preferences in `uv run --with` ([#&#8203;13283](astral-sh/uv#13283))
-   Retry streaming downloads on broken pipe errors ([#&#8203;13281](astral-sh/uv#13281))
-   Treat already-installed base environment packages as preferences in `uv run --with` ([#&#8203;13284](astral-sh/uv#13284))
-   Avoid enumerating sources in errors for path Python requests ([#&#8203;13335](astral-sh/uv#13335))
-   Avoid re-creating virtual environment with `--no-sync` ([#&#8203;13287](astral-sh/uv#13287))

##### Documentatio...
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cli Related to the command line interface
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants