Vault 资讯瀑布官方2026.09.09 04:45 UTC+8

astral-sh/uv 发布 0.12.11

uv 0.12.11 发布:预览功能生成缺失哈希,性能优化提升安装速度,多项修复与文档改进。

发布说明

发布于 2026-09-08。

预览功能

  • 导出 pylock.toml 文件时生成缺失的工件哈希,以确保符合 PEP 751 (#20146)
  • pylock.toml 工件哈希表为空时发出警告,未来 uv 版本将拒绝此类文件 (#21462)

性能

  • 通过消除原子硬链接、符号链接和 reflink 替换的逐文件临时目录,加速覆盖现有文件的安装 (#21478)
  • 通过将逐文件临时目录替换为相邻临时文件,加速将复制的 wheel 合并到现有环境的安装 (#21468)
  • 通过用定位读取替换共享 ZIP 游标锁,加速本地 wheel 安装 (#21500)
  • 通过跨提取文件重用 ZIP 读取器和缓冲区,加速本地 wheel 安装 (#21499)
  • uv pip install --no-deps 发现请求的包已安装时,避免传递依赖检查和不必要的解析 (#21523)

错误修复

  • 在读取源归档的元数据或运行其构建后端之前,根据 uv.lock 中记录的哈希验证源归档 (#21223)
  • --verify-hashes--require-hashes 下,验证使用 === 固定的注册表需求的提供的哈希 (#21543)
  • 当未提供精确的本地版本哈希时,将公共版本固定的哈希应用于匹配的本地版本 (#21544)
  • 支持从 UNC 路径(包括 WSL 路径)激活 PowerShell 虚拟环境 (#19159)
  • 去除 .python-version.python-versions 文件中条目的周围空白 (#21529)
  • 抑制 uv add --no-syncuv remove --no-syncuv add --frozenVIRTUAL_ENV 不匹配警告 (#21496)
  • uv python list 无法查询解释器时发出警告并继续 (#21498)

文档

  • 恢复 exclude-newer 示例的 TOML 语法高亮 (#21534)

安装 uv 0.12.11

通过 shell 脚本安装预构建二进制文件

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

通过 powershell 脚本安装预构建二进制文件

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

下载 uv 0.12.11

astral-sh/uv released 0.12.11

Release Notes

Released on 2026-09-08.

Preview features

  • Generate missing artifact hashes when exporting pylock.toml files to ensure they conform to PEP 751 (#20146)
  • Warn when pylock.toml artifact hash tables are empty, which will be rejected in a future uv release (#21462)

Performance

  • Speed up installs that overwrite existing files by eliminating per-file temporary directories for atomic hard-link, symlink, and reflink replacements (#21478)
  • Speed up installs that merge copied wheels into existing environments by replacing per-file temporary directories with adjacent temporary files (#21468)
  • Speed up local wheel installs by replacing the shared ZIP cursor lock with positioned reads (#21500)
  • Speed up local wheel installs by reusing ZIP readers and buffers across extracted files (#21499)
  • Avoid transitive dependency checks and unnecessary resolution when uv pip install --no-deps finds the requested packages already installed (#21523)

Bug fixes

  • Verify source archives against hashes recorded in uv.lock before reading their metadata or running their build backends (#21223)
  • Verify supplied hashes for registry requirements pinned with === under both --verify-hashes and --require-hashes (#21543)
  • Apply hashes from public-version pins to matching local versions when no exact local-version hash is provided (#21544)
  • Support PowerShell virtual environment activation from UNC paths, including WSL paths (#19159)
  • Trim surrounding whitespace from entries in .python-version and .python-versions files (#21529)
  • Suppress VIRTUAL_ENV mismatch warnings for uv add --no-sync, uv remove --no-sync, and uv add --frozen (#21496)
  • Warn and continue when uv python list cannot query an interpreter (#21498)

Documentation

  • Restore TOML syntax highlighting for exclude-newer examples (#21534)

Install uv 0.12.11

Install prebuilt binaries via shell script

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

Install prebuilt binaries via powershell script

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

Download uv 0.12.11

FilePlatformChecksum
uv-aarch64-apple-darwin.tar.gzApple Silicon macOSchecksum
uv-x86_64-apple-darwin.tar.gzIntel macOSchecksum
uv-aarch64-pc-windows-msvc.zipARM64 Windowschecksum
uv-i686-pc-windows-msvc.zipx86 Windowschecksum
uv-x86_64-pc-windows-msvc.zipx64 Windowschecksum
uv-aarch64-unknown-linux-gnu.tar.gzARM64 Linuxchecksum
uv-i686-unknown-linux-gnu.tar.gzx86 Linuxchecksum
uv-powerpc64le-unknown-linux-gnu.tar.gzPPC64LE Linuxchecksum
uv-riscv64gc-unknown-linux-gnu.tar.gzRISCV Linuxchecksum
uv-s390x-unknown-linux-gnu.tar.gzS390x Linuxchecksum
uv-x86_64-unknown-linux-gnu.tar.gzx64 Linuxchecksum
uv-armv7-unknown-linux-gnueabihf.tar.gzARMv7 Linuxchecksum
uv-aarch64-unknown-linux-musl.tar.gzARM64 MUSL Linuxchecksum
uv-i686-unknown-linux-musl.tar.gzx86 MUSL Linuxchecksum
uv-riscv64gc-unknown-linux-musl.tar.gzRISCV MUSL Linuxchecksum
uv-x86_64-unknown-linux-musl.tar.gzx64 MUSL Linuxchecksum
uv-arm-unknown-linux-musleabihf.tar.gzARMv6 MUSL Linux (Hardfloat)checksum
uv-armv7-unknown-linux-musleabihf.tar.gzARMv7 MUSL Linuxchecksum

Verifying GitHub Artifact Attestations

The artifacts in this release have attestations generated with GitHub Artifact Attestations. These can be verified by using the GitHub CLI:

gh attestation verify <file-path of downloaded artifact> --repo astral-sh/uv

You can also download the attestation from GitHub and verify against that directly:

gh attestation verify <file-path of downloaded artifact> --bundle <file-path of downloaded attestation>
查看原始发布