Conversation
zanieb
commented
Jul 2, 2025
|
|
||
| // Install an x86_64 version (assuming an aarch64 host) | ||
| uv_snapshot!(context.filters(), context.python_install().arg("cpython-3.13-macos-x86_64"), @r" | ||
| uv_snapshot!(context.filters(), context.python_install().arg("3.13-x86_64"), @r" |
Member
Author
There was a problem hiding this comment.
I used these here as a PoC / integration test!
BurntSushi
reviewed
Jul 2, 2025
| if let Some(err) = state.error { | ||
| return Err(err); | ||
| } | ||
| state.next_part(); |
Member
There was a problem hiding this comment.
This LGTM. Once I figured out how to read one state transition (i.e., the differing behavior based on whether the value parsed or not), I found it easy to pattern match that understanding to the other transitions. So there's a fair bit of code, but it follows a nice repeatable structure that I find easy to digest.
So, nice job!
Member
Author
There was a problem hiding this comment.
<3 I could document how the machine works a little
tmeijn
pushed a commit
to tmeijn/dotfiles
that referenced
this pull request
Aug 16, 2025
This MR contains the following updates: | Package | Update | Change | |---|---|---| | [astral-sh/uv](https://github.com/astral-sh/uv) | patch | `0.8.9` -> `0.8.11` | 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.8.11`](https://github.com/astral-sh/uv/blob/HEAD/CHANGELOG.md#0811) [Compare Source](astral-sh/uv@0.8.10...0.8.11) ##### Python - Add Python 3.14.0rc2 - Update Pyodide to 0.28.1 ##### Enhancements - Add Debian 13 trixie to published Docker images ([#​15269](astral-sh/uv#15269)) - Add `extra-build-dependencies` hint for any missing module on build failure ([#​15252](astral-sh/uv#15252)) - Make 'v' prefix cyan in overlap warnings ([#​15259](astral-sh/uv#15259)) ##### Bug fixes - Fix missing uv version in extended Docker image tags ([#​15263](astral-sh/uv#15263)) - Persist cache info when re-installing cached wheels ([#​15274](astral-sh/uv#15274)) ##### Rust API - Allow passing custom `reqwest` clients to `RegistryClient` ([#​15281](astral-sh/uv#15281)) ### [`v0.8.10`](https://github.com/astral-sh/uv/blob/HEAD/CHANGELOG.md#0810) [Compare Source](astral-sh/uv@0.8.9...0.8.10) ##### Python - Add support for installing Pyodide versions ([#​14518](astral-sh/uv#14518)) ##### Enhancements - Allow Python requests with missing segments, e.g., just `aarch64` ([#​14399](astral-sh/uv#14399)) ##### Preview - Move warnings for conflicting modules into preview ([#​15253](astral-sh/uv#15253)) </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:eyJjcmVhdGVkSW5WZXIiOiI0MS42Ni4yIiwidXBkYXRlZEluVmVyIjoiNDEuNzEuMCIsInRhcmdldEJyYW5jaCI6Im1haW4iLCJsYWJlbHMiOlsiUmVub3ZhdGUgQm90Il19-->
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This allows
PythonDownloadRequestwhich is used for parsing general install key requests to have missing segments, which unblocks requests likewindows-aarch64orcpython-linux(whereas before those would requireany-any-windows-aarch64andcpython-any-linuxrespectively). We still require strict ordering of segments.Previously, we only allowed missing segments at the end of the key.
This uses a state machine for parsing, which is quite a bit more complicated.
I'm a little hesitant about the possibility that this regresses error messages and the complexity of the implementation, but
uv run -p aarch64seems valuable following #13724. The alternative to this would probably be to make these explicit in various places? e.g., expose--python-arch,--python-libc, and--python-os? Or make--python-platform(which already exists) accept a subset of the keys?There is a possibility of regressions here, e.g., if something matches this parser it will not fallback to the
PythonRequest::ExecutableNamecase and we've made this parser more permissive, but I think that should be quite rare?