Skip to content

Local UI to run and train LLMs and diffusion models. Supports GGUF, MLX, Qwen3.8, DeepSeek-V4.1, MiniMax-H3, Gemma 4, FLUX and more.

Installers: pin uv 0.13.5 and replace uv older than 0.13.4 (emSign root) (#14894)

Daniel Hand4f1ceb19cde
diff --git a/.github/scripts/clean-machine-assert.sh b/.github/scripts/clean-machine-assert.sh
index 81b7c9b6aac..dda0a95bf94 100755
--- a/.github/scripts/clean-machine-assert.sh
+++ b/.github/scripts/clean-machine-assert.sh
@@ -74,7 +74,9 @@ _git_line_remotes() {
# checkout's .gitmodules names, which is the pinned requirement's own content only there.
# No record, or any run elsewhere, is a no.
_ran_in_uv_checkout() { # the traced argument string
- _ran_under "$1" "${UV_CACHE_DIR%/}/git-v0/checkouts/"
+ # git-v0 up to uv 0.12, git-v1 from 0.13 (the pinned release).
+ _ran_under "$1" "${UV_CACHE_DIR%/}/git-v1/checkouts/" \
+ || _ran_under "$1" "${UV_CACHE_DIR%/}/git-v0/checkouts/"
}
# Every run of these arguments (at least one) had its working directory under $2.
@@ -106,7 +108,13 @@ _in_checkout_of() { # the traced argument string, a full commit
# check out a pinned commit from its own cache: nothing that can reach the network (a bare
# `fetch origin` reads its URL from config) and nothing outside $UV_CACHE_DIR.
_is_uv_git_cache_op() { # the traced argument string
+ _cache="${UV_CACHE_DIR%/}/git-v1"
+ _is_uv_git_cache_op_in "$1" && return 0
_cache="${UV_CACHE_DIR%/}/git-v0"
+ _is_uv_git_cache_op_in "$1"
+}
+
+_is_uv_git_cache_op_in() { # the traced argument string; $_cache is the git bucket to check
case "$1" in
# uv initialises its database and resolves the pin in its own cache; the same commands
# anywhere else (the project directory, say) are not uv's.
diff --git a/install.ps1 b/install.ps1
index 8679bbe27a3..c45813c97de 100644
--- a/install.ps1
+++ b/install.ps1
@@ -3510,10 +3510,10 @@ function Install-UnslothStudio {
# \A and \z, not ^ and $: in .NET `$` also matches before a final newline, so
# `archive-v1<LF>` passed here while the sh helper rejected it.
if (-not ($suffix -match '\A[0-9]+\z')) { return $false }
- # Every CacheBucket in uv 0.12.1 ($UvPinnedVersion) plus built-wheels; keep in step
+ # Every CacheBucket in uv 0.13.5 ($UvPinnedVersion) plus built-wheels; keep in step
# with install.sh on a pin bump.
return ($lower.Substring(0, $at) -in @(
- "archive", "binaries", "builds", "built-wheels", "environments", "flat-index",
+ "archive", "binaries", "builds", "built-wheels", "environments", "files", "flat-index",
"git", "interpreter", "osv", "python", "sdists", "simple", "wheels"))
}
@@ -4675,7 +4675,7 @@ function Install-UnslothStudio {
$minBps = 1MB
$useUv = -not (Test-MirrorConfigured -Tool uv)
$usePip = -not (Test-MirrorConfigured -Tool pip)
- $uvWheel = 'packages/72/d6/207945fe69903b9794e2ef3e42608c91a59972567343a6719078d99c71f7/uv-0.12.1-py3-none-manylinux_2_17_x86_64.manylinux2014_x86_64.whl'
+ $uvWheel = 'packages/3a/ad/3c2a81d66d1839063662e5b6c0002ec31f8ee987dbc5295747627ca6160a/uv-0.13.5-py3-none-manylinux_2_17_x86_64.manylinux2014_x86_64.whl'
$torchWheel = 'whl/cpu/torch-2.9.1%2Bcpu-cp312-cp312-manylinux_2_28_x86_64.whl'
$nodeTarball = 'v24.18.0/node-v24.18.0-linux-x64.tar.gz'
$artifact = @{
@@ -4683,7 +4683,7 @@ function Install-UnslothStudio {
'torch' = "https://download-r2.pytorch.org/$torchWheel"; 'cernet-torch' = "$cernet/pytorch/$torchWheel"
'node' = "https://nodejs.org/dist/$nodeTarball"; 'npmmirror-node' = "$npmMirror/-/binary/node/$nodeTarball"
'npm' = 'https://registry.npmjs.org/typescript/-/typescript-5.9.3.tgz'; 'npmmirror' = "$npmMirror/typescript/-/typescript-5.9.3.tgz"
- 'astral' = 'https://releases.astral.sh/github/uv/releases/download/0.12.1/uv-x86_64-unknown-linux-gnu.tar.gz'
+ 'astral' = 'https://releases.astral.sh/github/uv/releases/download/0.13.5/uv-x86_64-unknown-linux-gnu.tar.gz'
}
$hosts = [ordered]@{}
if ($useUv -or $usePip) { $hosts['pypi'] = @('pypi', 'cernet-pypi', $pypiMirror, 'https://pypi.org/simple/uv/', "$pypiMirror/uv/") }
@@ -6791,7 +6791,11 @@ exit 0
# ── Install uv ──
Write-TauriLog "STEP" "Installing uv package manager"
- $UvMinVersion = "0.8.16"
+ # Below 0.13.4 uv's bundled roots still trust the compromised emSign CAs (GHSA-hq85-5cpj-mr62).
+ $UvMinVersion = "0.13.4"
+ # The floor before that. A host that cannot download keeps a uv between the two, as install.sh
+ # does with UV_OFFLINE_MIN_VERSION: an offline install makes no TLS connections.
+ $UvOfflineMinVersion = "0.8.16"
# PowerShell ranks aliases and functions above anything on PATH, so a profile carrying
# "Set-Alias uv ..." or "function uv {...}" captures every bare uv call here and the version
@@ -6844,23 +6848,27 @@ exit 0
function Test-UvVersionOk {
# EVERY candidate, not just the first, so an alias pointing at a stale uv cannot hide a
# current uv on PATH. Alias first still, so a passing alias keeps winning.
+ param([string]$Minimum = $UvMinVersion)
foreach ($exe in Get-UvExecutableCandidates) {
- if (Test-UvCandidateVersion $exe) { return $true }
+ if (Test-UvCandidateVersion $exe $Minimum) { return $true }
}
return $false
}
function Test-UvCandidateVersion {
- param([string]$exe)
+ param([string]$exe, [string]$Minimum = $UvMinVersion)
if (-not $exe) { return $false }
try {
$raw = (& $exe --version 2>$null | Select-Object -First 1)
} catch {
return $false
}
- if ($raw -notmatch 'uv\s+([0-9]+(?:\.[0-9]+)+)') { return $false }
+ if ($raw -notmatch 'uv\s+([0-9]+(?:\.[0-9]+)+)(\S*)') { return $false }
+ $found = $Matches[1]
+ $pre = if ($Matches.ContainsKey(2)) { $Matches[2] } else { "" }
try {
- if ([version]$Matches[1] -ge [version]$UvMinVersion) {
+ if ([version]$found -gt [version]$Minimum -or
+ ([version]$found -eq [version]$Minimum -and -not $pre)) {
# Pin the executable that actually answered: every install command below runs
# this path, so a later Refresh-SessionPath or a profile alias cannot swap it.
$script:UvExe = $exe
@@ -6927,14 +6935,14 @@ exit 0
# tests/studio/test_installer_av_shapes.py (AV_SHAPES_RECORD)
# Bumping the version means bumping all 3 hashes, and each Wheel/WheelSha256 from https://pypi.org/pypi/uv/<ver>/json:
# curl -sL https://github.com/astral-sh/uv/releases/download/<ver>/uv-<arch>-pc-windows-msvc.zip.sha256
- $UvPinnedVersion = "0.12.1"
+ $UvPinnedVersion = "0.13.5"
$UvPinnedAssets = @{
- "x86_64" = @{ Asset = "uv-x86_64-pc-windows-msvc.zip"; Sha256 = "8FCB0CB46E1229065E344758980924E569BEF5882EF45F46FADA8FB24E06B74A"
- Wheel = "packages/0d/a4/467c99c76fefa8b1259a1d382a5e49f73068f38a2d58db401504a783ed2c/uv-0.12.1-py3-none-win_amd64.whl"; WheelSha256 = "BD02F2DA212E6A983115DC64A6FC94E9256C2D60E056D6B669DE0A6025AAEC05" }
- "arm64" = @{ Asset = "uv-aarch64-pc-windows-msvc.zip"; Sha256 = "9BC7C18E616230FA2DC6FB24BC3AFDE18A95C2B5C9433DE747E9502C66041568"
- Wheel = "packages/68/80/ec1acbf8e22dc4866f9070c30b064728cc0da73bedc30f2fbfdc0c5901a7/uv-0.12.1-py3-none-win_arm64.whl"; WheelSha256 = "EAD7AD064F291A5DF358C3FFA8FFAB347A32BD5A75A6A068CA22254C2539A829" }
- "x86" = @{ Asset = "uv-i686-pc-windows-msvc.zip"; Sha256 = "9B51C33D307A8AB9E9DFD88D4AE1491761F63DE0BFFA3CEC96BEC536491C9B97"
- Wheel = "packages/fd/02/f73e4867c0748eaa3dea90cdfeb73d15bab0f04802c5c20bb37fc14918fe/uv-0.12.1-py3-none-win32.whl"; WheelSha256 = "173EE216F17D89FC39F65339D311A53584FC7DE4918D27C0F3C7EDAFABC6B54D" }
+ "x86_64" = @{ Asset = "uv-x86_64-pc-windows-msvc.zip"; Sha256 = "A38B8D1902B7CFBC76B423BA1BB456F623F42064CDC72628B6075B89AFD1019A"
+ Wheel = "packages/32/ea/771744a784b16aa21d195cb5d5d5a2878d72fa00fc26f11ea3f9646994fe/uv-0.13.5-py3-none-win_amd64.whl"; WheelSha256 = "1FB29FC46BA12033E2EF95A95AC79D649E71BBB1358419BBBCBD19D86026EF2F" }
+ "arm64" = @{ Asset = "uv-aarch64-pc-windows-msvc.zip"; Sha256 = "09F47EDF90726084A70F9426F6E3CA4F46E9BF7CBF23B1716EC64D60B055FAE3"
+ Wheel = "packages/52/67/1f31243f75ece410f2db1afdfc9a9f9722fdee2385e4a347c3ca1dee6d13/uv-0.13.5-py3-none-win_arm64.whl"; WheelSha256 = "0548460D46C8667488B1F089E936F29F0EDFB1CC753F9152FFBD8BC84A46AA20" }
+ "x86" = @{ Asset = "uv-i686-pc-windows-msvc.zip"; Sha256 = "96228420D0A89A64757AFBA59932C1E58C4977E4122F2CC9F8615A51BA2D3084"
+ Wheel = "packages/00/7c/e38b312abaae1bd59ff5886126f48e9e223fbb9a8edf9e236ede976f67cb/uv-0.13.5-py3-none-win32.whl"; WheelSha256 = "F4E55A6E2A1089FE74ED50FBDF2DF0F6F336EE148AD232B05932DB5DEEE8007E" }
}
function Install-UvFromRelease {
@@ -7149,9 +7157,23 @@ exit 0
}
if (-not (Test-UvVersionOk)) {
- step "uv" "could not be installed" "Red"
- substep "Install it from https://docs.astral.sh/uv/" "Yellow"
- return (Exit-InstallFailure "uv could not be installed")
+ # Offline: the download failed, so keep the uv this host already had, as install.sh does.
+ $keptUv = $false
+ if ($script:StudioPrivateUvStale -and
+ (Test-UvCandidateVersion (Join-Path $script:StudioPrivateUvDir "uv.exe") $UvOfflineMinVersion)) {
+ $env:PATH = "$($script:StudioPrivateUvDir);$env:PATH"
+ $keptUv = $true
+ }
+ if (-not $keptUv) { $keptUv = Test-UvVersionOk $UvOfflineMinVersion }
+ if (-not $keptUv) {
+ step "uv" "could not be installed" "Red"
+ substep "Install it from https://docs.astral.sh/uv/" "Yellow"
+ return (Exit-InstallFailure "uv could not be installed")
+ }
+ # The kept uv is below the floor: its bundled roots still trust the compromised emSign CA, so
+ # the Windows store decides instead. A download that failed while online lands here too.
+ if (-not $env:UV_SYSTEM_CERTS) { $env:UV_SYSTEM_CERTS = "1" }
+ if (-not $env:UV_NATIVE_TLS) { $env:UV_NATIVE_TLS = "1" }
}
# Ahead of the cache setup, which is the first thing to write inside the root and returns
diff --git a/install.sh b/install.sh
index 66f8c57101d..e140d06b52b 100755
--- a/install.sh
+++ b/install.sh
@@ -691,10 +691,10 @@ _uv_is_bucket_name() {
case "${1##*-v}" in
''|*[!0-9]*) return 1 ;;
esac
- # Every CacheBucket in uv 0.12.1 (UV_PINNED_VERSION) plus built-wheels; re-read
+ # Every CacheBucket in uv 0.13.5 (UV_PINNED_VERSION) plus built-wheels; re-read
# uv-cache/src/lib.rs on a pin bump, or a missing kind goes unprobed and uv fails on it.
case "${1%-v*}" in
- archive|binaries|builds|built-wheels|environments|flat-index) ;;
+ archive|binaries|builds|built-wheels|environments|files|flat-index) ;;
git|interpreter|osv|python|sdists|simple|wheels) ;;
*) return 1 ;;
esac
@@ -3492,15 +3492,15 @@ _mirror_probe() {
_mirror_url() {
case "$1" in
- pypi) echo "https://files.pythonhosted.org/packages/72/d6/207945fe69903b9794e2ef3e42608c91a59972567343a6719078d99c71f7/uv-0.12.1-py3-none-manylinux_2_17_x86_64.manylinux2014_x86_64.whl" ;;
- cernet-pypi) echo "$_MIRROR_CERNET/pypi/web/packages/72/d6/207945fe69903b9794e2ef3e42608c91a59972567343a6719078d99c71f7/uv-0.12.1-py3-none-manylinux_2_17_x86_64.manylinux2014_x86_64.whl" ;;
+ pypi) echo "https://files.pythonhosted.org/packages/3a/ad/3c2a81d66d1839063662e5b6c0002ec31f8ee987dbc5295747627ca6160a/uv-0.13.5-py3-none-manylinux_2_17_x86_64.manylinux2014_x86_64.whl" ;;
+ cernet-pypi) echo "$_MIRROR_CERNET/pypi/web/packages/3a/ad/3c2a81d66d1839063662e5b6c0002ec31f8ee987dbc5295747627ca6160a/uv-0.13.5-py3-none-manylinux_2_17_x86_64.manylinux2014_x86_64.whl" ;;
torch) echo "https://download-r2.pytorch.org/whl/cpu/torch-2.9.1%2Bcpu-cp312-cp312-manylinux_2_28_x86_64.whl" ;;
cernet-torch) echo "$_MIRROR_CERNET/pytorch/whl/cpu/torch-2.9.1%2Bcpu-cp312-cp312-manylinux_2_28_x86_64.whl" ;;
node) echo "https://nodejs.org/dist/v24.18.0/node-v24.18.0-linux-x64.tar.gz" ;;
npmmirror-node) echo "$_MIRROR_NPM/-/binary/node/v24.18.0/node-v24.18.0-linux-x64.tar.gz" ;;
npm) echo "https://registry.npmjs.org/typescript/-/typescript-5.9.3.tgz" ;;
npmmirror) echo "$_MIRROR_NPM/typescript/-/typescript-5.9.3.tgz" ;;
- astral) echo "https://releases.astral.sh/github/uv/releases/download/0.12.1/uv-x86_64-unknown-linux-gnu.tar.gz" ;;
+ astral) echo "https://releases.astral.sh/github/uv/releases/download/0.13.5/uv-x86_64-unknown-linux-gnu.tar.gz" ;;
pypi-index) echo "https://pypi.org/simple/uv/" ;;
torch-index) echo "https://download.pytorch.org/whl/cpu/torch/" ;;
cernet-pypi-index) echo "$_MIRROR_PYPI/uv/" ;;
@@ -3786,8 +3786,8 @@ _mirror_spare_export() {
# ── Install uv ──
tauri_log "STEP" "Installing uv package manager"
-# 0.9.3 is the first uv whose managed-Python manifest carries CPython 3.13.9. Anything older tops out at 3.13.8, which cannot import torch (see PYTHON_SKIP), so a bare "3.13" request on an older uv resolves straight to the broken patch.
-UV_MIN_VERSION="0.9.3"
+# 0.13.4 is the first uv whose bundled roots drop the compromised emSign CAs (GHSA-hq85-5cpj-mr62); anything older can be served forged PyPI wheels. It also clears 0.9.3, the first uv whose managed-Python manifest carries CPython 3.13.9 (older tops out at 3.13.8, which cannot import torch, see PYTHON_SKIP).
+UV_MIN_VERSION="0.13.4"
# The floor before this raised it. An offline host may keep a uv between the two, since those installs worked without touching the network; below it the installer rejected the uv outright and still has to, or it proceeds on a uv missing flags it is about to be handed (--default-index, --torch-backend).
UV_OFFLINE_MIN_VERSION="0.8.16"
@@ -3891,10 +3891,10 @@ _uv_version_ok() { # uv command, floor (defaults to UV_MIN_VERSION)
# ── uv from a pinned release ──
# Mirrors Install-UvFromRelease in install.ps1; bumping the version means bumping every hash (<asset>.sha256) and every _uv_pinned_wheel entry.
-UV_PINNED_VERSION="0.12.1"
+UV_PINNED_VERSION="0.13.5"
# sha256 of astral's versioned install.sh for UV_PINNED_VERSION (the release's uv-installer.sh asset), checked before the
# unpinned-host fallback runs it.
-UV_INSTALLER_SH_SHA256="d3f5412d38c99f9d024901843bf98206f0d2c6dbe64df40d0b740e2751ca62c1"
+UV_INSTALLER_SH_SHA256="1c6e7f025499664633ac2dce43a210800510e9ef0625c52e034a8afdf8bf177a"
# Echoes the glibc minor version (the N in 2.N), or nothing when this is not a glibc host or the version cannot be read. "not musl" is not the same as "a glibc new enough to run the GNU build": astral's installer checks a minimum and drops to its musl-static archive below it, so a host we cannot positively confirm has to reach the fallback rather than take a binary that will not exec.
_uv_glibc_minor() {
@@ -3927,10 +3927,10 @@ _uv_pinned_asset() {
case "$_upa_arch" in
x86_64|amd64)
[ "$_upa_glibc" -ge 17 ] 2>/dev/null || return 1
- echo "uv-x86_64-unknown-linux-gnu.tar.gz 90b2f223fb69d19db49e117da601f64978593417988530aa733d456141b4bcbb" ;;
+ echo "uv-x86_64-unknown-linux-gnu.tar.gz f68d291c75783122dad58ab77def0e13f3233f358731db5d6d7e8715603b928f" ;;
aarch64|arm64)
[ "$_upa_glibc" -ge 28 ] 2>/dev/null || return 1
- echo "uv-aarch64-unknown-linux-gnu.tar.gz 769d373e146692c639b5fbaae33b331c297a32e03d30448772051902df52bbf4" ;;
+ echo "uv-aarch64-unknown-linux-gnu.tar.gz 4bb69cf95ed13f23713bb7bc09f241896ea0c75b7c557e615a20604b82f9c403" ;;
*) return 1 ;;
esac
;;
@@ -3941,9 +3941,9 @@ _uv_pinned_asset() {
fi
case "$_upa_arch" in
x86_64)
- echo "uv-x86_64-apple-darwin.tar.gz 69d9f9a00337f25a50dcb13882052da08b8469bac11091c98c5694c3c6721467" ;;
+ echo "uv-x86_64-apple-darwin.tar.gz b0f52b0e3945b4107d89024ea38e625683011fbfc05a0d98f9fa2d6dcee28c66" ;;
arm64|aarch64)
- echo "uv-aarch64-apple-darwin.tar.gz 77d2906988e8074fd43f2f329ec452ebbf9b0c257ba1c66451c71de70a6baf42" ;;
+ echo "uv-aarch64-apple-darwin.tar.gz 743f85035a1996ecb350659e01cd9faea9709829be09b1b4b03c73eaf3c9cd73" ;;
*) return 1 ;;
esac
;;
@@ -3955,13 +3955,13 @@ _uv_pinned_asset() {
_uv_pinned_wheel() {
case "$1" in
uv-x86_64-unknown-linux-gnu.tar.gz)
- echo "packages/72/d6/207945fe69903b9794e2ef3e42608c91a59972567343a6719078d99c71f7/uv-0.12.1-py3-none-manylinux_2_17_x86_64.manylinux2014_x86_64.whl 27211df9b277f440dea438a4e525ba40250fb721ad39b8927eefc2d91f9aea15" ;;
+ echo "packages/3a/ad/3c2a81d66d1839063662e5b6c0002ec31f8ee987dbc5295747627ca6160a/uv-0.13.5-py3-none-manylinux_2_17_x86_64.manylinux2014_x86_64.whl fa8d26e08e34c29c0c4e820cf3181757086d547240b4f4d31ff1d8bd810ca946" ;;
uv-aarch64-unknown-linux-gnu.tar.gz)
- echo "packages/9a/c7/29e426865c2eb8df61253dae93b953523f48c9fca1e471c7e49ff068f19a/uv-0.12.1-py3-none-manylinux_2_28_aarch64.whl b255ac23958e45f39f9c7a4cd65890df5ef46f539a3b14de03bd296bbba9cb60" ;;
+ echo "packages/4c/92/d83d019c63c1ccc6ff17df2bfe76270412f9766e7e71aa4d4ccbf018683f/uv-0.13.5-py3-none-manylinux_2_28_aarch64.whl 91e58e304b63b6c91bac5561459ab0c3ea24f17bc01ea9359d69fed72142978f" ;;
uv-x86_64-apple-darwin.tar.gz)
- echo "packages/fd/07/a417475380e901f4325d13b09938baab227b0c143547124b944c5bc71783/uv-0.12.1-py3-none-macosx_10_12_x86_64.whl 41b8fc2335f682312a1ca39a7b4abfd6af800992065c663582ca3e4d51cf9258" ;;
+ echo "packages/e3/2a/dcae794203261e49564bb9ff7c4b64a093f69ac73476cc8ce54c1deed3a1/uv-0.13.5-py3-none-macosx_10_12_x86_64.whl 337a14829bb499e114989df4f908f134ff37f1fb6c33497541cfb05b28080e39" ;;
uv-aarch64-apple-darwin.tar.gz)
- echo "packages/c9/68/391ff0cc3d8020e64adc43bb4e50607f744c69e792fb7623dc7c1526704b/uv-0.12.1-py3-none-macosx_11_0_arm64.whl 2e9b0b86e180abc5968b979c6e25203b32e85969abb5083ee1e8b88a5aa98a76" ;;
+ echo "packages/d2/26/9ac45211123244ea68be852775093af487a64debc13621a2de239f8ebe73/uv-0.13.5-py3-none-macosx_11_0_arm64.whl a42c85fa8156e1e5e2cecdbc77bb818ea1dcf5f78b8e2a8f84c7fe4f16f0702e" ;;
*) return 1 ;;
esac
}
@@ -4181,7 +4181,7 @@ if [ "$_STUDIO_KEEPS_TOOLS" = true ] && [ -z "${UV_INSTALL_DIR:-}${UV_UNMANAGED_
fi
fi
if ! command -v uv >/dev/null 2>&1 || ! _uv_version_ok uv || [ "$_STUDIO_UV_STALE" = true ]; then
- # Raising the floor pulled every 0.8.16-0.9.2 host into this block, and those installs used to succeed without touching the network, so a download failure must not be fatal for them. An unreadable version counts as present: that is a minimal image without awk, not an old uv.
+ # Raising the floor pulled every 0.8.16-0.13.3 host into this block, and those installs used to succeed without touching the network, so a download failure must not be fatal for them. An unreadable version counts as present: that is a minimal image without awk, not an old uv.
_uv_present_before=false
if command -v uv >/dev/null 2>&1; then
# `|| _uv_prev_ver=`: on an image with no awk the pipeline exits 127 and set -e would kill the install here, which is exactly the host this block exists to keep working.
@@ -4227,17 +4227,30 @@ if ! command -v uv >/dev/null 2>&1 || ! _uv_version_ok uv || [ "$_STUDIO_UV_STAL
else
_uv_refreshed=false
fi
+ # Offline, a stale Studio-private uv is kept the same way, under the same offline floor.
+ if [ "$_uv_refreshed" = false ] && [ "$_STUDIO_UV_STALE" = true ] \
+ && _uv_version_ok "$_STUDIO_UV_DIR/uv" "$UV_OFFLINE_MIN_VERSION"; then
+ export PATH="$_STUDIO_UV_DIR:$PATH"
+ _uv_present_before=true
+ fi
if [ "$_uv_refreshed" = false ] && [ "$_uv_present_before" = false ]; then
tauri_log "ERROR" "Could not install uv"
step "error" "could not download uv, and none is installed" "$C_ERR"
substep "Check the network, or install uv manually: https://docs.astral.sh/uv/"
exit 1
fi
+ # Kept a uv below the floor: its bundled roots still trust the compromised emSign CA, so the OS
+ # store decides instead, where there is one (UV_NATIVE_TLS too: uv before 0.11 reads only that).
+ # A download that failed while online lands here too; UV_SYSTEM_CERTS=0 opts out.
+ if [ "$_uv_refreshed" = false ] && [ "${UV_SYSTEM_CERTS:-1}" != 0 ] \
+ && { [ "$(uname -s)" = Darwin ] || [ -r /etc/ssl/certs/ca-certificates.crt ] || [ -r /etc/pki/tls/certs/ca-bundle.crt ]; }; then
+ export UV_SYSTEM_CERTS="${UV_SYSTEM_CERTS:-1}" UV_NATIVE_TLS="${UV_NATIVE_TLS:-1}"
+ fi
if [ -f "$HOME/.local/bin/env" ]; then
. "$HOME/.local/bin/env"
fi
export PATH="$HOME/.local/bin:$PATH"
- # And put the pinned destination back in front. UV_INSTALL_DIR and friends can put uv somewhere other than ~/.local/bin, and both the line above and astral's env file prepend ~/.local/bin, so a stale uv there would shadow the 0.12.1 we just verified.
+ # And put the pinned destination back in front. UV_INSTALL_DIR and friends can put uv somewhere other than ~/.local/bin, and both the line above and astral's env file prepend ~/.local/bin, so a stale uv there would shadow the pinned one we just verified.
if [ -n "${_UNSLOTH_UV_BIN_DIR:-}" ] && [ "$_UNSLOTH_UV_BIN_DIR" != "$HOME/.local/bin" ]; then
export PATH="$_UNSLOTH_UV_BIN_DIR:$PATH"
fi
diff --git a/studio/backend/core/inference/wsl_host.py b/studio/backend/core/inference/wsl_host.py
index 54f731cd675..c7df79ae83b 100644
--- a/studio/backend/core/inference/wsl_host.py
+++ b/studio/backend/core/inference/wsl_host.py
@@ -29,9 +29,10 @@ ROOTFS = {
"size": 356739129,
}
UV = {
- "url": "https://github.com/astral-sh/uv/releases/download/0.12.19/uv-x86_64-unknown-linux-gnu.tar.gz",
- "sha256": "23bf5552d220e0842b65c862097b2ebaeba0064b74eda5e565e77fd25969d8c8",
- "size": 19831732,
+ "url": "https://github.com/astral-sh/uv/releases/download/0.13.5/uv-x86_64-unknown-linux-gnu.tar.gz",
+ "sha256": "f68d291c75783122dad58ab77def0e13f3233f358731db5d6d7e8715603b928f",
+ "size": 16682639,
+ "version": "0.13.5",
}
# AMD: ROCm from AMD's apt repo plus the DXG bridge .deb (HSA reaches the Windows driver via /dev/dxg).
# The repo key ships with Studio: repo.radeon.com serves it at a mutable URL, breaking a pinned download.
@@ -562,9 +563,14 @@ def ensure_distro(
guest(["mkdir", "-p", f"{GUEST_ROOT}/bin"])
put(f"{GUEST_ROOT}/owner.json", owner)
put(f"{GUEST_ROOT}/bin/run-engine", RUNNER, "755")
+ # The pinned release, not merely a uv: an older guest uv (0.12.x) still trusts the emSign roots.
try:
- guest(["test", "-x", f"{GUEST_ROOT}/bin/uv"])
- except RuntimeError:
+ installed = re.search(
+ r"^uv (\S+)", guest([f"{GUEST_ROOT}/bin/uv", "--version"], timeout = 60), re.M
+ )
+ except (RuntimeError, subprocess.TimeoutExpired):
+ installed = None
+ if not installed or installed.group(1) != UV["version"]:
archive = download(UV, "uv-x86_64-unknown-linux-gnu.tar.gz", progress, cancel)
guest(
[
diff --git a/studio/backend/tests/test_wsl_host.py b/studio/backend/tests/test_wsl_host.py
index 0c488cb7664..5105b25dd51 100644
--- a/studio/backend/tests/test_wsl_host.py
+++ b/studio/backend/tests/test_wsl_host.py
@@ -975,6 +975,43 @@ def test_an_amd_distro_checks_for_the_dxg_device(wsl, monkeypatch, tmp_path):
assert probed[-1] == ["test", "-e", "/usr/lib/wsl/lib/libcuda.so"]
+ "answer, fetched",
+ [
+ ("uv 0.12.19 (x86_64-unknown-linux-gnu)", True),
+ (None, True),
+ ("hang", True),
+ ("uv {pin} (x)", False),
+ ],
+)
+def test_an_existing_guest_uv_is_replaced_unless_it_is_the_pin(
+ monkeypatch, tmp_path, answer, fetched
+):
+ monkeypatch.setattr(wsl_host, "host_dir", lambda: tmp_path / "host")
+ monkeypatch.setattr(wsl_host, "distro_ready", lambda: True)
+ monkeypatch.setattr(wsl_host, "put", lambda *a, **k: None)
+ monkeypatch.setattr(wsl_host, "to_guest_path", lambda path: "/mnt/c/uv.tar.gz")
+ downloads, ran = [], []
+ monkeypatch.setattr(
+ wsl_host, "download", lambda spec, *a, **k: downloads.append(spec) or "uv.tgz"
+ )
+
+ def guest(argv, **kwargs):
+ ran.append(argv[0])
+ if argv[-1] == "--version":
+ if answer is None:
+ raise RuntimeError("missing")
+ if answer == "hang":
+ raise subprocess.TimeoutExpired(argv, kwargs.get("timeout"))
+ return answer.format(pin = wsl_host.UV["version"]) + "\n"
+ return ""
+
+ monkeypatch.setattr(wsl_host, "guest", guest)
+ wsl_host.ensure_distro()
+ assert downloads == ([wsl_host.UV] if fetched else [])
+ assert ("tar" in ran) is fetched
+
+
def test_rocm_setup_script_is_idempotent_and_pinned():
script = wsl_host.ROCM_SETUP
assert "https://repo.radeon.com/rocm/apt/7.2.1 noble main" in script
diff --git a/studio/setup.ps1 b/studio/setup.ps1
index 267e00d6edb..f0278ea0372 100644
--- a/studio/setup.ps1
+++ b/studio/setup.ps1
@@ -1194,7 +1194,7 @@ function Invoke-MirrorFallback {
$minBps = 1MB
$useUv = -not (Test-MirrorConfigured -Tool uv)
$usePip = -not (Test-MirrorConfigured -Tool pip)
- $uvWheel = 'packages/72/d6/207945fe69903b9794e2ef3e42608c91a59972567343a6719078d99c71f7/uv-0.12.1-py3-none-manylinux_2_17_x86_64.manylinux2014_x86_64.whl'
+ $uvWheel = 'packages/3a/ad/3c2a81d66d1839063662e5b6c0002ec31f8ee987dbc5295747627ca6160a/uv-0.13.5-py3-none-manylinux_2_17_x86_64.manylinux2014_x86_64.whl'
$torchWheel = 'whl/cpu/torch-2.9.1%2Bcpu-cp312-cp312-manylinux_2_28_x86_64.whl'
$nodeTarball = 'v24.18.0/node-v24.18.0-linux-x64.tar.gz'
$artifact = @{
@@ -1202,7 +1202,7 @@ function Invoke-MirrorFallback {
'torch' = "https://download-r2.pytorch.org/$torchWheel"; 'cernet-torch' = "$cernet/pytorch/$torchWheel"
'node' = "https://nodejs.org/dist/$nodeTarball"; 'npmmirror-node' = "$npmMirror/-/binary/node/$nodeTarball"
'npm' = 'https://registry.npmjs.org/typescript/-/typescript-5.9.3.tgz'; 'npmmirror' = "$npmMirror/typescript/-/typescript-5.9.3.tgz"
- 'astral' = 'https://releases.astral.sh/github/uv/releases/download/0.12.1/uv-x86_64-unknown-linux-gnu.tar.gz'
+ 'astral' = 'https://releases.astral.sh/github/uv/releases/download/0.13.5/uv-x86_64-unknown-linux-gnu.tar.gz'
}
$hosts = [ordered]@{}
if ($useUv -or $usePip) { $hosts['pypi'] = @('pypi', 'cernet-pypi', $pypiMirror, 'https://pypi.org/simple/uv/', "$pypiMirror/uv/") }
@@ -7729,14 +7729,14 @@ function Assert-VenvActivated {
# tests/studio/test_installer_av_shapes.py (AV_SHAPES_RECORD)
# Bumping the version means bumping all 3 hashes, and each Wheel/WheelSha256 as in install.ps1:
# curl -sL https://github.com/astral-sh/uv/releases/download/<ver>/uv-<arch>-pc-windows-msvc.zip.sha256
-$UvPinnedVersion = "0.12.1"
+$UvPinnedVersion = "0.13.5"
$UvPinnedAssets = @{
- "x86_64" = @{ Asset = "uv-x86_64-pc-windows-msvc.zip"; Sha256 = "8FCB0CB46E1229065E344758980924E569BEF5882EF45F46FADA8FB24E06B74A"
- Wheel = "packages/0d/a4/467c99c76fefa8b1259a1d382a5e49f73068f38a2d58db401504a783ed2c/uv-0.12.1-py3-none-win_amd64.whl"; WheelSha256 = "BD02F2DA212E6A983115DC64A6FC94E9256C2D60E056D6B669DE0A6025AAEC05" }
- "arm64" = @{ Asset = "uv-aarch64-pc-windows-msvc.zip"; Sha256 = "9BC7C18E616230FA2DC6FB24BC3AFDE18A95C2B5C9433DE747E9502C66041568"
- Wheel = "packages/68/80/ec1acbf8e22dc4866f9070c30b064728cc0da73bedc30f2fbfdc0c5901a7/uv-0.12.1-py3-none-win_arm64.whl"; WheelSha256 = "EAD7AD064F291A5DF358C3FFA8FFAB347A32BD5A75A6A068CA22254C2539A829" }
- "x86" = @{ Asset = "uv-i686-pc-windows-msvc.zip"; Sha256 = "9B51C33D307A8AB9E9DFD88D4AE1491761F63DE0BFFA3CEC96BEC536491C9B97"
- Wheel = "packages/fd/02/f73e4867c0748eaa3dea90cdfeb73d15bab0f04802c5c20bb37fc14918fe/uv-0.12.1-py3-none-win32.whl"; WheelSha256 = "173EE216F17D89FC39F65339D311A53584FC7DE4918D27C0F3C7EDAFABC6B54D" }
+ "x86_64" = @{ Asset = "uv-x86_64-pc-windows-msvc.zip"; Sha256 = "A38B8D1902B7CFBC76B423BA1BB456F623F42064CDC72628B6075B89AFD1019A"
+ Wheel = "packages/32/ea/771744a784b16aa21d195cb5d5d5a2878d72fa00fc26f11ea3f9646994fe/uv-0.13.5-py3-none-win_amd64.whl"; WheelSha256 = "1FB29FC46BA12033E2EF95A95AC79D649E71BBB1358419BBBCBD19D86026EF2F" }
+ "arm64" = @{ Asset = "uv-aarch64-pc-windows-msvc.zip"; Sha256 = "09F47EDF90726084A70F9426F6E3CA4F46E9BF7CBF23B1716EC64D60B055FAE3"
+ Wheel = "packages/52/67/1f31243f75ece410f2db1afdfc9a9f9722fdee2385e4a347c3ca1dee6d13/uv-0.13.5-py3-none-win_arm64.whl"; WheelSha256 = "0548460D46C8667488B1F089E936F29F0EDFB1CC753F9152FFBD8BC84A46AA20" }
+ "x86" = @{ Asset = "uv-i686-pc-windows-msvc.zip"; Sha256 = "96228420D0A89A64757AFBA59932C1E58C4977E4122F2CC9F8615A51BA2D3084"
+ Wheel = "packages/00/7c/e38b312abaae1bd59ff5886126f48e9e223fbb9a8edf9e236ede976f67cb/uv-0.13.5-py3-none-win32.whl"; WheelSha256 = "F4E55A6E2A1089FE74ED50FBDF2DF0F6F336EE148AD232B05932DB5DEEE8007E" }
}
# Not Get-HostMachineArch: it answers arm64/other for the VC++ and prebuilt probes, and "other"
@@ -8028,12 +8028,9 @@ function Find-InstalledUv {
}
# The floor a found uv has to clear: install.ps1's UvMinVersion, so reuse accepts exactly what
-# the Windows installer accepts. It is not install.sh's 0.9.3, and deliberately: that number is
-# about uv's managed-Python manifest topping out at a CPython that cannot import torch, and
-# nothing here asks uv for an interpreter -- the one uv command this file runs is
-# `uv pip install --python <the venv's python>`. install.ps1 keeps 3.13.8 out with its own
-# $PythonSkip instead.
-$SetupUvMinVersion = "0.8.16"
+# the Windows installer accepts. Below 0.13.4 uv's bundled roots still trust the compromised
+# emSign CAs (GHSA-hq85-5cpj-mr62).
+$SetupUvMinVersion = "0.13.4"
function Test-SetupUvVersionAtLeast {
# "uv 0.12.1 (abcdef0 2026-01-01)" -> $true when 0.12.1 is at least $Minimum. Unparseable is
@@ -8068,17 +8065,42 @@ function Get-InstalledUvVerdict {
}
# Try to use uv (much faster than pip), fall back to pip if unavailable
+# A uv on PATH below the floor is passed over like an installed one, and kept only when the
+# download fails (offline). One that hangs, fails or answers no version counts as old. A staged run
+# never downloads: it keeps the old uv, as before, behind the Windows trust store.
+function Get-SetupPathUvTooOld {
+ $pathUv = Get-Command uv -CommandType Application -ErrorAction SilentlyContinue | Select-Object -First 1
+ if (-not $pathUv) { return $null }
+ # Timed: a uv that hangs on --version must not stall every setup before the pinned one installs.
+ $verdict = @(Get-SetupUvExecutableVerdict -Path $pathUv.Source)[-1]
+ if ($verdict -ne "ok") { return $pathUv.Source }
+ $line = $script:SetupUvVersionLine
+ if ("$line" -notmatch '^\s*uv\s' -or
+ -not (Test-SetupUvVersionAtLeast -VersionLine "$line" -Minimum $SetupUvMinVersion)) {
+ return $pathUv.Source
+ }
+ return $null
+}
+
$UseUv = $false
$installedUvDir = $null
-if (Get-Command uv -ErrorAction SilentlyContinue) {
+$pathUvOld = Get-SetupPathUvTooOld
+if ((Get-Command uv -ErrorAction SilentlyContinue) -and -not $pathUvOld) {
$UseUv = $true
} elseif (($installedUvDir = Find-InstalledUv)) {
# Read-only reuse, fine under a stage root. Appended: a python.exe beside uv must not
# step in front of the staged interpreter.
$env:PATH = "$env:PATH;$installedUvDir"
+ if ($pathUvOld) {
+ # Re-entering the venv restores the pre-venv PATH first, so it goes before the current uv
+ # is put in front of the old one, right behind the venv's Scripts.
+ Enter-StudioVenv
+ $env:PATH = (Join-Path $VenvDir "Scripts") + ";$installedUvDir;$env:PATH"
+ }
substep "reusing the uv installed at $installedUvDir (it was not on PATH)"
$UseUv = $true
} elseif (-not $StageRoot) {
+ if (-not $script:InstalledUvTooOld) { $script:InstalledUvTooOld = $pathUvOld }
if ($script:InstalledUvTooOld) {
substep "the uv at $($script:InstalledUvTooOld) is older than $SetupUvMinVersion; installing the pinned release"
} elseif ($script:InstalledUvProbeMiss) {
@@ -8118,6 +8140,25 @@ if (Get-Command uv -ErrorAction SilentlyContinue) {
}
if (Get-Command uv -ErrorAction SilentlyContinue) { $UseUv = $true }
} catch { }
+ # No download (offline): the old uv on PATH still beats pip, as it did before the floor moved.
+ if ($pathUvOld -and -not $UseUv -and (Get-Command uv -ErrorAction SilentlyContinue)) { $UseUv = $true }
+ # Still on a uv below the floor: its bundled roots trust the compromised emSign CA, so the
+ # Windows store decides instead. A download that failed while online lands here too.
+ if ($UseUv -and -not $script:UvPinnedInstalled) {
+ $activeUv = Get-Command uv -CommandType Application -ErrorAction SilentlyContinue | Select-Object -First 1
+ if ($activeUv) {
+ $null = Get-SetupUvExecutableVerdict -Path $activeUv.Source
+ if (-not (Test-SetupUvVersionAtLeast -VersionLine "$($script:SetupUvVersionLine)" -Minimum $SetupUvMinVersion)) {
+ if (-not $env:UV_SYSTEM_CERTS) { $env:UV_SYSTEM_CERTS = "1" }
+ if (-not $env:UV_NATIVE_TLS) { $env:UV_NATIVE_TLS = "1" }
+ }
+ }
+ }
+} elseif ($pathUvOld) {
+ # Staged runs never download: the old uv on PATH still beats pip, behind the Windows store.
+ $UseUv = $true
+ if (-not $env:UV_SYSTEM_CERTS) { $env:UV_SYSTEM_CERTS = "1" }
+ if (-not $env:UV_NATIVE_TLS) { $env:UV_NATIVE_TLS = "1" }
}
# Refresh-Environment rebuilt PATH from the registry, and the re-activation meant to put the venv
# back sits inside a catch that swallows everything -- including a dot-source that died after
diff --git a/studio/setup.sh b/studio/setup.sh
index 56200cd51b7..a863bf98cc3 100755
--- a/studio/setup.sh
+++ b/studio/setup.sh
@@ -430,15 +430,15 @@ _mirror_probe() {
_mirror_url() {
case "$1" in
- pypi) echo "https://files.pythonhosted.org/packages/72/d6/207945fe69903b9794e2ef3e42608c91a59972567343a6719078d99c71f7/uv-0.12.1-py3-none-manylinux_2_17_x86_64.manylinux2014_x86_64.whl" ;;
- cernet-pypi) echo "$_MIRROR_CERNET/pypi/web/packages/72/d6/207945fe69903b9794e2ef3e42608c91a59972567343a6719078d99c71f7/uv-0.12.1-py3-none-manylinux_2_17_x86_64.manylinux2014_x86_64.whl" ;;
+ pypi) echo "https://files.pythonhosted.org/packages/3a/ad/3c2a81d66d1839063662e5b6c0002ec31f8ee987dbc5295747627ca6160a/uv-0.13.5-py3-none-manylinux_2_17_x86_64.manylinux2014_x86_64.whl" ;;
+ cernet-pypi) echo "$_MIRROR_CERNET/pypi/web/packages/3a/ad/3c2a81d66d1839063662e5b6c0002ec31f8ee987dbc5295747627ca6160a/uv-0.13.5-py3-none-manylinux_2_17_x86_64.manylinux2014_x86_64.whl" ;;
torch) echo "https://download-r2.pytorch.org/whl/cpu/torch-2.9.1%2Bcpu-cp312-cp312-manylinux_2_28_x86_64.whl" ;;
cernet-torch) echo "$_MIRROR_CERNET/pytorch/whl/cpu/torch-2.9.1%2Bcpu-cp312-cp312-manylinux_2_28_x86_64.whl" ;;
node) echo "https://nodejs.org/dist/v24.18.0/node-v24.18.0-linux-x64.tar.gz" ;;
npmmirror-node) echo "$_MIRROR_NPM/-/binary/node/v24.18.0/node-v24.18.0-linux-x64.tar.gz" ;;
npm) echo "https://registry.npmjs.org/typescript/-/typescript-5.9.3.tgz" ;;
npmmirror) echo "$_MIRROR_NPM/typescript/-/typescript-5.9.3.tgz" ;;
- astral) echo "https://releases.astral.sh/github/uv/releases/download/0.12.1/uv-x86_64-unknown-linux-gnu.tar.gz" ;;
+ astral) echo "https://releases.astral.sh/github/uv/releases/download/0.13.5/uv-x86_64-unknown-linux-gnu.tar.gz" ;;
pypi-index) echo "https://pypi.org/simple/uv/" ;;
torch-index) echo "https://download.pytorch.org/whl/cpu/torch/" ;;
cernet-pypi-index) echo "$_MIRROR_PYPI/uv/" ;;
@@ -1803,7 +1803,7 @@ _uv_is_bucket_name() {
''|*[!0-9]*) return 1 ;;
esac
case "${1%-v*}" in
- archive|binaries|builds|built-wheels|environments|flat-index) ;;
+ archive|binaries|builds|built-wheels|environments|files|flat-index) ;;
git|interpreter|osv|python|sdists|simple|wheels) ;;
*) return 1 ;;
esac
@@ -2821,9 +2821,9 @@ _setup_http_get_timed() {
#
# Only the four mainstream targets are pinned; the rest fall through to the existing path
# rather than risk a binary for the wrong triple.
-_SETUP_UV_PINNED_VERSION="0.12.1"
+_SETUP_UV_PINNED_VERSION="0.13.5"
# sha256 of astral's versioned install.sh for that release; the fallback below runs only those exact bytes.
-_SETUP_UV_INSTALLER_SH_SHA256="d3f5412d38c99f9d024901843bf98206f0d2c6dbe64df40d0b740e2751ca62c1"
+_SETUP_UV_INSTALLER_SH_SHA256="1c6e7f025499664633ac2dce43a210800510e9ef0625c52e034a8afdf8bf177a"
# Mirrors _uv_glibc_minor in install.sh: "not musl" is not the same as "a glibc new enough to
# run the GNU build", and astral drops to its musl-static archive below its floor.
@@ -2854,10 +2854,10 @@ _setup_uv_pinned_asset() {
case "$_supa_arch" in
x86_64|amd64)
[ "$_supa_glibc" -ge 17 ] 2>/dev/null || return 1
- echo "uv-x86_64-unknown-linux-gnu.tar.gz 90b2f223fb69d19db49e117da601f64978593417988530aa733d456141b4bcbb" ;;
+ echo "uv-x86_64-unknown-linux-gnu.tar.gz f68d291c75783122dad58ab77def0e13f3233f358731db5d6d7e8715603b928f" ;;
aarch64|arm64)
[ "$_supa_glibc" -ge 28 ] 2>/dev/null || return 1
- echo "uv-aarch64-unknown-linux-gnu.tar.gz 769d373e146692c639b5fbaae33b331c297a32e03d30448772051902df52bbf4" ;;
+ echo "uv-aarch64-unknown-linux-gnu.tar.gz 4bb69cf95ed13f23713bb7bc09f241896ea0c75b7c557e615a20604b82f9c403" ;;
*) return 1 ;;
esac
;;
@@ -2868,9 +2868,9 @@ _setup_uv_pinned_asset() {
fi
case "$_supa_arch" in
x86_64)
- echo "uv-x86_64-apple-darwin.tar.gz 69d9f9a00337f25a50dcb13882052da08b8469bac11091c98c5694c3c6721467" ;;
+ echo "uv-x86_64-apple-darwin.tar.gz b0f52b0e3945b4107d89024ea38e625683011fbfc05a0d98f9fa2d6dcee28c66" ;;
arm64|aarch64)
- echo "uv-aarch64-apple-darwin.tar.gz 77d2906988e8074fd43f2f329ec452ebbf9b0c257ba1c66451c71de70a6baf42" ;;
+ echo "uv-aarch64-apple-darwin.tar.gz 743f85035a1996ecb350659e01cd9faea9709829be09b1b4b03c73eaf3c9cd73" ;;
*) return 1 ;;
esac
;;
@@ -2882,13 +2882,13 @@ _setup_uv_pinned_asset() {
_setup_uv_pinned_wheel() {
case "$1" in
uv-x86_64-unknown-linux-gnu.tar.gz)
- echo "packages/72/d6/207945fe69903b9794e2ef3e42608c91a59972567343a6719078d99c71f7/uv-0.12.1-py3-none-manylinux_2_17_x86_64.manylinux2014_x86_64.whl 27211df9b277f440dea438a4e525ba40250fb721ad39b8927eefc2d91f9aea15" ;;
+ echo "packages/3a/ad/3c2a81d66d1839063662e5b6c0002ec31f8ee987dbc5295747627ca6160a/uv-0.13.5-py3-none-manylinux_2_17_x86_64.manylinux2014_x86_64.whl fa8d26e08e34c29c0c4e820cf3181757086d547240b4f4d31ff1d8bd810ca946" ;;
uv-aarch64-unknown-linux-gnu.tar.gz)
- echo "packages/9a/c7/29e426865c2eb8df61253dae93b953523f48c9fca1e471c7e49ff068f19a/uv-0.12.1-py3-none-manylinux_2_28_aarch64.whl b255ac23958e45f39f9c7a4cd65890df5ef46f539a3b14de03bd296bbba9cb60" ;;
+ echo "packages/4c/92/d83d019c63c1ccc6ff17df2bfe76270412f9766e7e71aa4d4ccbf018683f/uv-0.13.5-py3-none-manylinux_2_28_aarch64.whl 91e58e304b63b6c91bac5561459ab0c3ea24f17bc01ea9359d69fed72142978f" ;;
uv-x86_64-apple-darwin.tar.gz)
- echo "packages/fd/07/a417475380e901f4325d13b09938baab227b0c143547124b944c5bc71783/uv-0.12.1-py3-none-macosx_10_12_x86_64.whl 41b8fc2335f682312a1ca39a7b4abfd6af800992065c663582ca3e4d51cf9258" ;;
+ echo "packages/e3/2a/dcae794203261e49564bb9ff7c4b64a093f69ac73476cc8ce54c1deed3a1/uv-0.13.5-py3-none-macosx_10_12_x86_64.whl 337a14829bb499e114989df4f908f134ff37f1fb6c33497541cfb05b28080e39" ;;
uv-aarch64-apple-darwin.tar.gz)
- echo "packages/c9/68/391ff0cc3d8020e64adc43bb4e50607f744c69e792fb7623dc7c1526704b/uv-0.12.1-py3-none-macosx_11_0_arm64.whl 2e9b0b86e180abc5968b979c6e25203b32e85969abb5083ee1e8b88a5aa98a76" ;;
+ echo "packages/d2/26/9ac45211123244ea68be852775093af487a64debc13621a2de239f8ebe73/uv-0.13.5-py3-none-macosx_11_0_arm64.whl a42c85fa8156e1e5e2cecdbc77bb818ea1dcf5f78b8e2a8f84c7fe4f16f0702e" ;;
*) return 1 ;;
esac
}
@@ -3275,9 +3275,9 @@ _SETUP_UV_PROBE_MISS=""
_SETUP_UV_LOOKED=""
_SETUP_UV_DIR=""
_SETUP_UV_TOO_OLD=""
-# install.sh's UV_MIN_VERSION, for its reason: below it uv's managed-Python manifest tops out at
-# a CPython that cannot import torch, which the installer refuses to build on.
-_SETUP_UV_MIN_VERSION="0.9.3"
+# install.sh's UV_MIN_VERSION, for its reason: below it uv's bundled roots still trust the
+# compromised emSign CAs (GHSA-hq85-5cpj-mr62).
+_SETUP_UV_MIN_VERSION="0.13.4"
# True when uv's --version line names a release at least as new as $2. Unreadable is false: the
# candidate is left alone and the download runs, as it did before this search existed.
@@ -3369,19 +3369,46 @@ _setup_find_installed_uv() {
}
USE_UV=false
-if command -v uv &>/dev/null; then
+# A uv on PATH below the floor is passed over like an installed one, and kept only when the
+# download fails (offline). One that hangs, fails or answers no version counts as old. A staged run
+# never downloads: it keeps the old uv, as before, behind the OS trust store.
+_SETUP_UV_PATH_OLD=""
+if command -v uv &>/dev/null && command -v mktemp >/dev/null 2>&1; then
+ _spu_file=$(mktemp 2>/dev/null) || _spu_file=""
+ _spu_ver=""
+ if [ -n "$_spu_file" ] && _setup_probe_version "$(command -v uv)" "$_spu_file"; then
+ read -r _spu_ver < "$_spu_file" 2>/dev/null || _spu_ver=""
+ case "$_spu_ver" in
+ "uv "*) _setup_uv_version_at_least "$_spu_ver" "$_SETUP_UV_MIN_VERSION" \
+ || _SETUP_UV_PATH_OLD=$(command -v uv) ;;
+ *) _SETUP_UV_PATH_OLD=$(command -v uv) ;;
+ esac
+ elif [ -n "$_spu_file" ]; then
+ _SETUP_UV_PATH_OLD=$(command -v uv)
+ fi
+ if [ -n "$_spu_file" ]; then rm -f "$_spu_file" 2>/dev/null || :; fi
+ unset _spu_file _spu_ver
+fi
+if command -v uv &>/dev/null && [ -z "$_SETUP_UV_PATH_OLD" ]; then
USE_UV=true
elif _setup_find_installed_uv; then
_setup_uv_dir="$_SETUP_UV_DIR"
# Read-only reuse, fine under a stage root. Appended: a python beside uv (~/.local/bin
# often has one) must not step in front of the staged $VENV_DIR/bin/python.
export PATH="$PATH:$_setup_uv_dir"
+ if [ -n "$_SETUP_UV_PATH_OLD" ]; then
+ # In front of the old uv on PATH, with the venv's bin still first.
+ PATH="$_setup_uv_dir:$PATH"
+ [ -z "${VIRTUAL_ENV:-}" ] || PATH="$VIRTUAL_ENV/bin:$PATH"
+ export PATH
+ fi
step "uv" "reusing the uv installed at $_setup_uv_dir (it was not on PATH)"
USE_UV=true
unset _setup_uv_dir
elif [ -n "$STAGE_ROOT" ]; then
- step "uv" "using pip inside the staged environment"
+ [ -n "$_SETUP_UV_PATH_OLD" ] || step "uv" "using pip inside the staged environment"
elif {
+ [ -n "${_SETUP_UV_TOO_OLD:-}" ] || _SETUP_UV_TOO_OLD="$_SETUP_UV_PATH_OLD"
if [ -n "${_SETUP_UV_TOO_OLD:-}" ]; then
step "uv" "the uv at $_SETUP_UV_TOO_OLD is older than $_SETUP_UV_MIN_VERSION; installing the pinned release"
elif [ -n "${_SETUP_UV_PROBE_MISS:-}" ]; then
@@ -3398,10 +3425,32 @@ elif {
}; then
# Only for astral's installer, which writes to ~/.local/bin. The pinned path already put its
# own destination first, and prepending here would let a stale ~/.local/bin/uv shadow the
- # 0.12.1 we just verified, so the rest of setup would run the wrong one.
+ # pinned uv we just verified, so the rest of setup would run the wrong one.
[ "$_SETUP_UV_PINNED_OK" = true ] || export PATH="$HOME/.local/bin:$PATH"
command -v uv &>/dev/null && USE_UV=true
fi
+# No download (offline): the old uv on PATH still beats pip, as it did before the floor moved.
+[ -z "$_SETUP_UV_PATH_OLD" ] || [ "$USE_UV" = true ] || ! command -v uv &>/dev/null || USE_UV=true
+# Still on a uv below the floor: its bundled roots trust the compromised emSign CA, so the OS store
+# decides instead, where there is one (UV_NATIVE_TLS too: uv before 0.11 reads only that).
+# A download that failed while online lands here too; UV_SYSTEM_CERTS=0 opts out.
+if [ "$USE_UV" = true ] && [ -n "${_SETUP_UV_TOO_OLD:-}${_SETUP_UV_PATH_OLD}" ] && [ "${UV_SYSTEM_CERTS:-1}" != 0 ] \
+ && command -v mktemp >/dev/null 2>&1; then
+ _spu_file=$(mktemp 2>/dev/null) || _spu_file=""
+ _spu_ver=""
+ if [ -n "$_spu_file" ] && _setup_probe_version "$(command -v uv)" "$_spu_file"; then
+ read -r _spu_ver < "$_spu_file" 2>/dev/null || _spu_ver=""
+ fi
+ if [ -n "$_spu_file" ]; then rm -f "$_spu_file" 2>/dev/null || :; fi
+ case "$_spu_ver" in
+ "uv "*)
+ if ! _setup_uv_version_at_least "$_spu_ver" "$_SETUP_UV_MIN_VERSION" \
+ && { [ "$(uname -s)" = Darwin ] || [ -r /etc/ssl/certs/ca-certificates.crt ] || [ -r /etc/pki/tls/certs/ca-bundle.crt ]; }; then
+ export UV_SYSTEM_CERTS="${UV_SYSTEM_CERTS:-1}" UV_NATIVE_TLS="${UV_NATIVE_TLS:-1}"
+ fi ;;
+ esac
+ unset _spu_file _spu_ver
+fi
fast_install() {
if [ "$USE_UV" = true ]; then
diff --git a/tests/python/test_cross_platform_parity.py b/tests/python/test_cross_platform_parity.py
index afe4f944555..3d6b155ff20 100644
--- a/tests/python/test_cross_platform_parity.py
+++ b/tests/python/test_cross_platform_parity.py
@@ -1109,6 +1109,7 @@ class TestInstallUvCacheRootParity:
"builds",
"built-wheels",
"environments",
+ "files",
"flat-index",
"git",
"interpreter",
@@ -1118,7 +1119,7 @@ class TestInstallUvCacheRootParity:
"simple",
"wheels",
}
- assert 'UV_PINNED_VERSION="0.12.1"' in sh, "re-read uv-cache/src/lib.rs for the new pin"
+ assert 'UV_PINNED_VERSION="0.13.5"' in sh, "re-read uv-cache/src/lib.rs for the new pin"
case_body = re.search(
r'case "\$\{1%-v\*\}" in\n(.*?)\n\s*\*\) return 1', bucket_sh, re.S
).group(1)
diff --git a/tests/python/test_uv_pin_agreement.py b/tests/python/test_uv_pin_agreement.py
new file mode 100644
index 00000000000..a037a9fdb36
--- /dev/null
+++ b/tests/python/test_uv_pin_agreement.py
@@ -0,0 +1,103 @@
+# Unsloth Zoo - Utilities for Unsloth
+# Copyright 2023-present Daniel Han-Chen, Michael Han-Chen & the Unsloth team. All rights reserved.
+#
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU Affero General Public License as published
+# by the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU Affero General Public License for more details.
+#
+# You should have received a copy of the GNU Affero General Public License
+# along with this program. If not, see <https://www.gnu.org/licenses/>.
+
+"""The four installers pin one uv, gate reuse on one floor, and the WSL guest is not left behind.
+
+uv below 0.13.4 still trusts the compromised emSign CAs (GHSA-hq85-5cpj-mr62), so a script that
+drifts back to an older pin or floor reopens that exposure.
+"""
+
+import ast
+import re
+from pathlib import Path
+
+ROOT = Path(__file__).resolve().parents[2]
+FLOOR = (0, 13, 4)
+
+SCRIPTS = {
+ "install.sh": (r'^UV_PINNED_VERSION="([^"]+)"', r'^UV_MIN_VERSION="([^"]+)"'),
+ "studio/setup.sh": (
+ r'^_SETUP_UV_PINNED_VERSION="([^"]+)"',
+ r'^_SETUP_UV_MIN_VERSION="([^"]+)"',
+ ),
+ "install.ps1": (r'^\s*\$UvPinnedVersion = "([^"]+)"', r'^\s*\$UvMinVersion = "([^"]+)"'),
+ "studio/setup.ps1": (r'^\$UvPinnedVersion = "([^"]+)"', r'^\$SetupUvMinVersion = "([^"]+)"'),
+}
+
+
+def _one(pattern: str, text: str, name: str) -> str:
+ found = re.findall(pattern, text, re.M)
+ assert len(found) == 1, (name, pattern, found)
+ return found[0]
+
+
+def _version(text: str) -> tuple:
+ return tuple(int(part) for part in text.split("."))
+
+
+def test_installers_agree_on_pin_floor_and_hashes():
+ pins, floors, tables = {}, {}, {}
+ for name, (pin_re, floor_re) in SCRIPTS.items():
+ text = (ROOT / name).read_text(encoding = "utf-8")
+ pins[name] = _one(pin_re, text, name)
+ floors[name] = _one(floor_re, text, name)
+ pin = pins[name]
+ # Every uv artifact the script names is the pinned release: archives, wheels, mirror probes.
+ for version in re.findall(r"uv/releases/download/(\d+\.\d+\.\d+)/", text):
+ assert version == pin, (name, version)
+ wheels = re.findall(r"/uv-(\d+\.\d+\.\d+)-py3-none-\S+?\.whl", text)
+ assert wheels and set(wheels) == {pin}, (name, wheels)
+ if name.endswith(".sh"):
+ assets = re.findall(r'echo "(uv-[a-z0-9_-]+\.tar\.gz) ([0-9a-f]+)"', text)
+ assert len(assets) == 4, (name, assets)
+ wheel_rows = re.findall(r'echo "packages/\S+\.whl ([0-9a-f]+)"', text)
+ assert len(wheel_rows) == 4, (name, wheel_rows)
+ installer = re.findall(r'INSTALLER_SH_SHA256="([0-9a-f]+)"', text)
+ assert len(installer) == 1, (name, installer)
+ digests = [d for _, d in assets] + wheel_rows + installer
+ else:
+ assets = re.findall(r'Asset = "(uv-[a-z0-9_-]+\.zip)";\s+Sha256 = "([0-9A-F]+)"', text)
+ assert len(assets) == 3, (name, assets)
+ wheel_rows = re.findall(r'WheelSha256 = "([0-9A-F]+)"', text)
+ assert len(wheel_rows) == 3, (name, wheel_rows)
+ digests = [d for _, d in assets] + wheel_rows
+ assert all(len(d) == 64 for d in digests), (name, digests)
+ assert len(set(d.lower() for d in digests)) == len(digests), name
+ tables[name] = set(d.lower() for d in digests)
+
+ assert len(set(pins.values())) == 1, pins
+ assert set(floors.values()) == {".".join(map(str, FLOOR))}, floors
+ assert _version(next(iter(pins.values()))) >= FLOOR
+
+ # The two shell scripts and the two PowerShell scripts carry identical tables.
+ assert tables["install.sh"] == tables["studio/setup.sh"]
+ assert tables["install.ps1"] == tables["studio/setup.ps1"]
+
+
+def test_wsl_guest_uv_is_at_least_the_floor():
+ source = (ROOT / "studio/backend/core/inference/wsl_host.py").read_text(encoding = "utf-8")
+ uv = None
+ for node in ast.parse(source).body:
+ if isinstance(node, ast.Assign) and any(
+ isinstance(t, ast.Name) and t.id == "UV" for t in node.targets
+ ):
+ uv = ast.literal_eval(node.value)
+ assert uv is not None
+ assert _version(uv["version"]) >= FLOOR, uv
+ assert f"/download/{uv['version']}/" in uv["url"], uv
+ assert re.fullmatch(r"[0-9a-f]{64}", uv["sha256"]), uv
+ # An existing guest is re-checked against the pinned version, not merely for a uv binary.
+ assert 'UV["version"]' in source
diff --git a/tests/sh/test_clean_machine_notools_pinned_git.sh b/tests/sh/test_clean_machine_notools_pinned_git.sh
index f49c7cfd348..cfd6127dd4c 100755
--- a/tests/sh/test_clean_machine_notools_pinned_git.sh
+++ b/tests/sh/test_clean_machine_notools_pinned_git.sh
@@ -65,8 +65,26 @@ git\tsubmodule update --recursive --init
xcode-select\t-p
"
+# uv 0.13 (the pinned release): git-v1, and the pinned commit fetched by its own refspec.
+CACHE1=$UV_CACHE/git-v1
+UV13_CLONE="git\t--version
+git\t-c remote.origin.url=$REMOTE submodule update --init
+git\tclone --local $CACHE1/db/76e25d04238765dd $CACHE1/checkouts/76e25d04238765dd/${SHA:0:9}
+git\tfetch --force --update-head-ok $REMOTE +$SHA:refs/commit/$SHA
+git\tinit
+git\treset --hard $SHA
+git\trev-parse
+git\trev-parse --short $SHA
+git\trev-parse $SHA^0
+git\trev-parse HEAD
+git\tsubmodule update --recursive --init
+xcode-select\t-p
+"
+
echo "=== pinned git+ remotes ==="
expect_rc "uv cloning the pinned Diffusers build passes" 0 "$PIN" "$UV_CLONE"
+expect_rc "uv 0.13 cloning it through git-v1 passes" 0 "$PIN" "$UV13_CLONE" "$CACHE1/checkouts/76e25d04238765dd/${SHA:0:9}"
+expect_rc "the uv 0.13 trace fails with no allowance" 1 "" "$UV13_CLONE" "$CACHE1/checkouts/76e25d04238765dd/${SHA:0:9}"
expect_rc "the same trace fails with no allowance, as before" 1 "" "$UV_CLONE"
expect_rc "an allowance file that does not exist allows nothing" 1 "$ROOT/missing.txt" "$UV_CLONE"
expect_rc "the installer's git --version probe alone passes" 0 "$PIN" "git\t--version\n"
diff --git a/tests/sh/test_setup_reuse_installed_uv.sh b/tests/sh/test_setup_reuse_installed_uv.sh
index 3427f78556b..14ad71e78bb 100755
--- a/tests/sh/test_setup_reuse_installed_uv.sh
+++ b/tests/sh/test_setup_reuse_installed_uv.sh
@@ -61,7 +61,7 @@ printf '%s\n' "$PS_FINDER" | grep -q '^function Find-InstalledUv {' || {
fake_uv() { # fake_uv <dir> [exit code] [version]
# It prints a version because the finder reads one; a silent stand-in would be refused.
mkdir -p "$1"
- printf '#!/bin/sh\necho "uv %s (0123456 2026-01-01)"\nexit %s\n' "${3:-0.12.12}" "${2:-0}" > "$1/uv"
+ printf '#!/bin/sh\necho "uv %s (0123456 2026-01-01)"\nexit %s\n' "${3:-0.13.5}" "${2:-0}" > "$1/uv"
chmod +x "$1/uv"
}
@@ -102,23 +102,23 @@ for shell in sh bash; do
assert_eq "$shell: ...and with nothing else installed that is a miss" \
"none" "$(env -i PATH="$BARE_PATH" HOME="$HOME_DIR" UV_INSTALL_DIR="$BROKEN" "$shell" "$PROBE")"
- # Below the floor, uv's managed-Python manifest tops out at a CPython that cannot import torch.
+ # Below the floor, uv's bundled roots still trust the emSign CAs (GHSA-hq85-5cpj-mr62).
OLD="$CASE/old uv"
- fake_uv "$OLD" 0 0.4.0
+ fake_uv "$OLD" 0 0.12.1
assert_eq "$shell: a uv below the minimum version is not reused" \
"none" "$(env -i PATH="$BARE_PATH" HOME="$HOME_DIR" UV_INSTALL_DIR="$OLD" "$shell" "$PROBE")"
case "$(env -i PATH="$BARE_PATH" HOME="$HOME_DIR" UV_INSTALL_DIR="$OLD" "$shell" "$DIAG")" in
*"old=$OLD/uv"*) ok "$shell: ...and the diagnostic names the version it refused" ;;
*) bad "$shell: ...and the diagnostic names the version it refused ($(env -i PATH="$BARE_PATH" HOME="$HOME_DIR" UV_INSTALL_DIR="$OLD" "$shell" "$DIAG"))" ;;
esac
- fake_uv "$OLD" 0 0.9.3
+ fake_uv "$OLD" 0 0.13.4
assert_eq "$shell: a uv exactly at the minimum version is reused" \
"found=$OLD" "$(env -i PATH="$BARE_PATH" HOME="$HOME_DIR" UV_INSTALL_DIR="$OLD" "$shell" "$PROBE")"
# A prerelease of the floor is below it; install.sh's _uv_version_ok refuses it too.
- fake_uv "$OLD" 0 "0.9.3-rc.1"
+ fake_uv "$OLD" 0 "0.13.4-rc.1"
assert_eq "$shell: a prerelease of the minimum version is not reused" \
"none" "$(env -i PATH="$BARE_PATH" HOME="$HOME_DIR" UV_INSTALL_DIR="$OLD" "$shell" "$PROBE")"
- fake_uv "$OLD" 0 "0.9.4-rc1"
+ fake_uv "$OLD" 0 "0.13.5-rc1"
assert_eq "$shell: a prerelease above the minimum version is reused" \
"found=$OLD" "$(env -i PATH="$BARE_PATH" HOME="$HOME_DIR" UV_INSTALL_DIR="$OLD" "$shell" "$PROBE")"
# Runs but answers as something else; a Windows stand-in cannot express this.
@@ -255,7 +255,7 @@ BODY
done
# Source contract: the reuse sits between the PATH probe and the download, in both shells.
-_probe_at=$(grep -n '^if command -v uv &>/dev/null; then$' "$SETUP_SH" | head -1 | cut -d: -f1)
+_probe_at=$(grep -n '^if command -v uv &>/dev/null && \[ -z "\$_SETUP_UV_PATH_OLD" \]; then$' "$SETUP_SH" | head -1 | cut -d: -f1)
_reuse_at=$(grep -n '^elif _setup_find_installed_uv; then$' "$SETUP_SH" | head -1 | cut -d: -f1)
_install_at=$(grep -n 'if _setup_install_uv_pinned[ ;]' "$SETUP_SH" | head -1 | cut -d: -f1)
if [ -n "$_probe_at" ] && [ -n "$_reuse_at" ] && [ -n "$_install_at" ] \
@@ -264,7 +264,7 @@ if [ -n "$_probe_at" ] && [ -n "$_reuse_at" ] && [ -n "$_install_at" ] \
else
bad "setup.sh reuses an installed uv before it downloads one (probe=$_probe_at reuse=$_reuse_at install=$_install_at)"
fi
-_ps_probe_at=$(grep -n '^if (Get-Command uv -ErrorAction SilentlyContinue) {$' "$SETUP_PS1" | head -1 | cut -d: -f1)
+_ps_probe_at=$(grep -n '^if ((Get-Command uv -ErrorAction SilentlyContinue) -and -not \$pathUvOld) {$' "$SETUP_PS1" | head -1 | cut -d: -f1)
_ps_reuse_at=$(grep -n '} elseif ((\$installedUvDir = Find-InstalledUv)) {' "$SETUP_PS1" | head -1 | cut -d: -f1)
_ps_install_at=$(grep -n 'Invoke-SetupCommand { Install-UvFromPinnedRelease }' "$SETUP_PS1" | head -1 | cut -d: -f1)
if [ -n "$_ps_probe_at" ] && [ -n "$_ps_reuse_at" ] && [ -n "$_ps_install_at" ] \
@@ -304,8 +304,7 @@ else
bad "setup.ps1 reuses only a uv with an ok verdict"
fi
-# Each side clears its platform's installer floor; the numbers differ on purpose (install.ps1
-# excludes the bad CPython via $PythonSkip and stays at 0.8.16).
+# Each side clears its platform's installer floor.
_sh_floor=$(grep '^_SETUP_UV_MIN_VERSION="' "$SETUP_SH" | head -1 | sed 's/.*"\(.*\)"/\1/')
_ps_floor=$(grep '^\$SetupUvMinVersion = "' "$SETUP_PS1" | head -1 | sed 's/.*"\(.*\)"/\1/')
_install_floor=$(grep '^UV_MIN_VERSION="' "$SCRIPT_DIR/../../install.sh" | head -1 | sed 's/.*"\(.*\)"/\1/')
diff --git a/tests/studio/install/test_ca_trust_floor.py b/tests/studio/install/test_ca_trust_floor.py
index b0524fa8b4b..6a95e916b91 100644
--- a/tests/studio/install/test_ca_trust_floor.py
+++ b/tests/studio/install/test_ca_trust_floor.py
@@ -25,7 +25,9 @@ def _release(version: str) -> tuple[int, ...]:
def test_the_no_torch_runtime_pin_is_at_or_above_the_floor() -> None:
- text = (REPO_ROOT / "studio" / "backend" / "requirements" / "no-torch-runtime.txt").read_text()
+ text = (REPO_ROOT / "studio" / "backend" / "requirements" / "no-torch-runtime.txt").read_text(
+ encoding = "utf-8"
+ )
(pin,) = re.findall(r"^certifi==(\S+)", text, re.MULTILINE)
assert _release(pin) >= CERTIFI_FLOOR
diff --git a/tests/studio_setup_ps1/Studio.Setup.FindInstalledUv.Tests.ps1 b/tests/studio_setup_ps1/Studio.Setup.FindInstalledUv.Tests.ps1
index 7b66eaee257..192b7d165c5 100644
--- a/tests/studio_setup_ps1/Studio.Setup.FindInstalledUv.Tests.ps1
+++ b/tests/studio_setup_ps1/Studio.Setup.FindInstalledUv.Tests.ps1
@@ -121,7 +121,7 @@ BeforeAll {
if ($Kind -eq 'old') { throw "the Windows stand-in cannot choose what it prints" }
Copy-RunnableExe -Destination $exe | Out-Null
} else {
- $version = if ($Kind -eq 'old') { '0.4.0' } else { '0.12.1' }
+ $version = if ($Kind -eq 'old') { '0.12.1' } else { '0.13.5' }
Set-Content -LiteralPath $exe -Value "#!/bin/sh`nprintf 'uv $version\n'`nexit 0`n"
& chmod +x $exe
}
@@ -300,7 +300,10 @@ Describe "the uv version floor" {
It "reads the floor setup.ps1 actually ships" {
$script:SetupUvMinVersionSource | Should -Not -BeNullOrEmpty
- Test-SetupUvVersionAtLeast -VersionLine 'uv 0.12.1' -Minimum $script:SetupUvMinVersionSource |
+ Test-SetupUvVersionAtLeast -VersionLine 'uv 0.13.5' -Minimum $script:SetupUvMinVersionSource |
Should -BeTrue
+ # uv 0.12.x still trusts the emSign roots (GHSA-hq85-5cpj-mr62).
+ Test-SetupUvVersionAtLeast -VersionLine 'uv 0.12.1' -Minimum $script:SetupUvMinVersionSource |
+ Should -BeFalse
}
}