-
Notifications
You must be signed in to change notification settings - Fork 2.5k
Allow --constraints and --overrides in uvx
#10207
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
Conversation
| { | ||
| debug!("Using existing tool `{}`", from.name); | ||
| return Ok((from, environment)); | ||
| } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't know if this is a good change. Previously, we just checked if the environment was compatible with the request. Now, we check if the receipt contained the exact same requested dependencies. This is consistent with uv tool install, but it's also "stricter".
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@zanieb -- Did you have an opinion on this? Or too hard to say without more context?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I didn't think about it too hard, but I think it's basically okay. What motivates the change?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We can't use satisfies with overrides, so we'd need to two branches.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hm, why can' we use satisfies with overrides? Aren't they just equivalent to constraints w.r.t. environments?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No, but we had an extensive conversation about this in the past... I'd have to dig it up.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'll look at it separately. The current API definitely doesn't support it though and I think I determined that it was non-trivial when we tried in the past. (Note that everywhere that we use satisfies, we skip if overrides is non-empty.)
b5f4395 to
93004c7
Compare
93004c7 to
5443d5b
Compare
zanieb
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah I wanted this just the other day
5443d5b to
26f0fc7
Compare
26f0fc7 to
24d42c3
Compare
This MR contains the following updates: | Package | Update | Change | |---|---|---| | [astral-sh/uv](https://github.com/astral-sh/uv) | patch | `0.6.4` -> `0.6.5` | 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.6.5`](https://github.com/astral-sh/uv/blob/HEAD/CHANGELOG.md#065) [Compare Source](astral-sh/uv@0.6.4...0.6.5) ##### Enhancements - Allow `--constraints` and `--overrides` in `uvx` ([#​10207](astral-sh/uv#10207)) - Allow overrides in `satisfies` check for `uv tool run` ([#​11994](astral-sh/uv#11994)) - Allow users to set `package = true` on `tool.uv.sources` ([#​12014](astral-sh/uv#12014)) - Add support for Windows legacy scripts via `uv run` ([#​11888](astral-sh/uv#11888)) - Return error when running uvx with a `.py` script ([#​11623](astral-sh/uv#11623)) - Warn user on use of `uvx run` ([#​11992](astral-sh/uv#11992)) ##### Configuration - Add `NO_BUILD` and `NO_BUILD_PACKAGE` environment variables ([#​11968](astral-sh/uv#11968)) ##### Performance - Allow overrides in all satisfies checks ([#​11995](astral-sh/uv#11995)) - Respect markers on constraints when validating current environment ([#​11976](astral-sh/uv#11976)) ##### Bug fixes - Compare major-minor specifiers when filtering interpreters ([#​11952](astral-sh/uv#11952)) - Fix system site packages detection default ([#​11956](astral-sh/uv#11956)) - Invalidate lockfile when empty dependency groups are added or removed ([#​12010](astral-sh/uv#12010)) - Remove prepended sys.path ([#​11954](astral-sh/uv#11954)) - Fix PyPy Python version label ([#​11965](astral-sh/uv#11965)) - Fix error message suggesting `--user` instead of `--username` ([#​11947](astral-sh/uv#11947)) ##### Preview - Move the uv build backend into a separate, minimal `uv_build` package ([#​11446](astral-sh/uv#11446)) </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:eyJjcmVhdGVkSW5WZXIiOiIzOS4xODguMyIsInVwZGF0ZWRJblZlciI6IjM5LjE4OC4zIiwidGFyZ2V0QnJhbmNoIjoibWFpbiIsImxhYmVscyI6WyJSZW5vdmF0ZSBCb3QiXX0=-->
Summary
Closes #9813.