Change chocolatey system test to ensure uv uses the right python#17533
Change chocolatey system test to ensure uv uses the right python#17533
Conversation
|
Seems like the python path printing is borked now... |
a502bbe to
8c6aba6
Compare
|
I think using |
|
I think the interpreter that invokes the system test script is the one that should be used, right? |
|
The test script interpreter is the one whose parent directory I am putting in As an alternative we could prepend to I think the real weird thing here is that there's no actual guarantee that But at least I feel that setting Lastly, I could try to investigate why chocolatey's path changes aren't being picked up although I have a feeling that the answer is going to be either: "the registry changes can't be propagated to the runner without restarting the runner" or "github runners explicitly sanitize that somehow so the environment change doesn't persist". Footnotes
|
Can't we just use the path that chocolatey is at instead of |
|
But yeah I think a point of these tests is uv's discovery of system Python versions, so overriding that with our custom test path seems janky. That variable shouldn't really be used in more places, it's quite the blemish already imo (I added it, alas) |
Yeah, sorry, I just realised there was a key bit of context I forgot: It seems you can tell chocolatey where you'd like to put the installation, but it won't listen if that version is already installed (it will overwrite at the existing location). There also doesn't seem to be any good way of asking chocolatey where it did install it either. This means using But, having thought about it, prepending What might also work: We could try to set |
e822878 to
67edeea
Compare
67edeea to
ea5d8be
Compare
UV_TEST_PYTHON_PATH for the chocolatey system test to ensure uv uses the right python|
@zanieb I went with the approach of refreshing the path from the registry. Although this means that |
.github/workflows/test-system.yml
Outdated
| echo $(which python) | ||
| $version = python --version | ||
| if ($version -ne "Python $env:TEST_PYTHON_VERSION") { | ||
| echo "Expected Python $env:TEST_PYTHON_VERSION, got $version" | ||
| exit 1 | ||
| } |
There was a problem hiding this comment.
Should we just put this into check_system_python.py with a --python-version flag?
02cad7c to
e8b47ec
Compare
e8b47ec to
efe8e68
Compare
|
Dang it... It merges automatically even if system tests fail? |
|
GitHub auto-merge can unfortunately only be configured on the required checks. |
This MR contains the following updates: | Package | Update | Change | |---|---|---| | [astral-sh/uv](https://github.com/astral-sh/uv) | patch | `0.9.26` → `0.9.27` | 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.9.27`](https://github.com/astral-sh/uv/blob/HEAD/CHANGELOG.md#0927) [Compare Source](astral-sh/uv@0.9.26...0.9.27) Released on 2026-01-26. ##### Python - Upgrade Pyodide to 0.29.2 ([#​17652](astral-sh/uv#17652)) - Upgrade to GraalPy 25.0.2 ([#​17634](astral-sh/uv#17634)) ##### Enhancements - Add `-t` shortform for `--target` to `uv pip` subcommands ([#​17501](astral-sh/uv#17501)) - Add support for ROCm 7.0 and 7.1 accelerator backends ([#​17681](astral-sh/uv#17681)) - Further improve free-threading ABI incompatibility errors ([#​17491](astral-sh/uv#17491)) - Implement `uv pip freeze --exclude` flag ([#​17045](astral-sh/uv#17045)) - Improve warnings for `--system` and `--no-system` in `uv venv` ([#​17647](astral-sh/uv#17647)) - Make `uv pip compile` attempt to download a specified `--python-version` if it can. ([#​17249](astral-sh/uv#17249)) - Support Trusted Publishing with pyx ([#​17438](astral-sh/uv#17438)) - Fix JSON schema for `exclude-newer-package` ([#​17665](astral-sh/uv#17665)) ##### Preview features - Better detection for conflicting packages ([#​17623](astral-sh/uv#17623)) - Upgrade based on outdated build versions in `uv python upgrade` ([#​17653](astral-sh/uv#17653)) ##### Bug fixes - Change chocolatey system test to ensure uv uses the right python ([#​17533](astral-sh/uv#17533)) - Fix infinite loop when `SSL_CERT_FILE` is a directory ([#​17503](astral-sh/uv#17503)) ##### Documentation - Add cargo-xwin to the CONTRIBUTING guide ([#​17507](astral-sh/uv#17507)) - Fix typo in the documentation of UV\_PUBLISH\_INDEX ([#​17672](astral-sh/uv#17672)) - Move MSRV to platform support section ([#​17534](astral-sh/uv#17534)) - Update the testing instructions in the CONTRIBUTING guide ([#​17528](astral-sh/uv#17528)) - Use `--locked` to install `cargo-xwin` in guide ([#​17530](astral-sh/uv#17530)) - Warn about PyPy being unmaintained ([#​17643](astral-sh/uv#17643)) - docs: Correct gitlab-ci.yml to .gitlab-ci.yml ([#​17682](astral-sh/uv#17682)) ##### Other changes - Update MSRV to 1.91 ([#​17677](astral-sh/uv#17677)) </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:eyJjcmVhdGVkSW5WZXIiOiI0Mi45Mi40IiwidXBkYXRlZEluVmVyIjoiNDIuOTIuNCIsInRhcmdldEJyYW5jaCI6Im1haW4iLCJsYWJlbHMiOlsiUmVub3ZhdGUgQm90IiwiYXV0b21hdGlvbjpib3QtYXV0aG9yZWQiLCJkZXBlbmRlbmN5LXR5cGU6OnBhdGNoIl19-->
Summary
Fix #17524.
Test Plan
N/A