Vault 资讯瀑布官方2026.08.01 03:43 UTC+8

astral-sh/uv 发布 0.12.1

uv 0.12.1 发布,新增 --prerelease-package 等增强,支持本地 HTML 索引,uv check 添加 --fix 自动修复预览,性能优化及多项 bug 修复。

发布说明

发布于 2026-07-31。

增强

  • 添加包特定的预发布策略,通过 --prerelease-package#20837
  • 支持本地 HTML 文件作为平坦索引(#20802
  • 添加 Xonsh 虚拟环境激活脚本(activate.xsh)(#19740
  • 在更新 pyproject.toml 时保留传递给 uv add --index 的文件系统路径(#20817

预览功能

  • uv check 添加自动修复,通过 --fix#20793
  • 当工作区依赖共享直接源时,避免拒绝未更改的无元数据锁文件(#20847
  • 在验证无元数据锁文件时,考虑直接 URL 约束(#20796
  • 在项目检查期间忽略发现的格式错误的 PEP 723 脚本(#20784
  • 使用 ty 的原生脚本排除在 uv check 中(#20742

性能

  • 直接解析规范的 uv 锁文件,并回退到其他有效的 TOML 语法(#20648
  • 在非 Windows ARM64 平台上加速 SHA-256 哈希计算(#20805

错误修复

  • uv tool update-shelluv python update-shell 退出前刷新 shell 启动文件更新(#20842
  • 使工作区根依赖组可用于从工作区成员运行的命令(#20840
  • 解析 requirements 文件中的 --find-links 路径相对于包含文件(#20832
  • uv tool list --outdated 中尊重配置的索引(#20770

文档

  • 在 PyTorch 指南中记录 Astral GPU 索引(#20785
  • 在整个 CLI 文档中使用一致的依赖组参数描述(#20823

安装 uv 0.12.1

通过 shell 脚本安装预编译二进制文件

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

通过 PowerShell 脚本安装预编译二进制文件

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

下载 uv 0.12.1

astral-sh/uv released 0.12.1

Release Notes

Released on 2026-07-31.

Enhancements

  • Add package-specific pre-release policies with --prerelease-package (#20837)
  • Support local HTML files as flat indexes (#20802)
  • Add Xonsh virtual environment activation scripts (activate.xsh) (#19740)
  • Preserve filesystem paths passed to uv add --index when updating pyproject.toml (#20817)

Preview features

  • Add automatic fixes to uv check with --fix (#20793)
  • Avoid rejecting unchanged metadata-free lockfiles when workspace dependencies share direct sources (#20847)
  • Honor direct URL constraints when validating metadata-free lockfiles (#20796)
  • Ignore malformed PEP 723 scripts discovered during project checks (#20784)
  • Use ty's native script exclusion in uv check (#20742)

Performance

  • Parse canonical uv lockfiles directly, with a fallback for other valid TOML syntax (#20648)
  • Accelerate SHA-256 hashing on non-Windows ARM64 platforms (#20805)

Bug fixes

  • Flush shell startup file updates before uv tool update-shell and uv python update-shell exit (#20842)
  • Make workspace-root dependency groups available to commands run from workspace members (#20840)
  • Resolve --find-links paths in requirements files relative to the containing file (#20832)
  • Respect configured indexes in uv tool list --outdated (#20770)

Documentation

  • Document Astral GPU indexes in the PyTorch guide (#20785)
  • Use consistent dependency-group argument descriptions throughout the CLI documentation (#20823)

Install uv 0.12.1

Install prebuilt binaries via shell script

curl --proto '=https' --tlsv1.2 -LsSf https://releases.astral.sh/github/uv/releases/download/0.12.1/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.1/uv-installer.ps1 | iex"

Download uv 0.12.1

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>
查看原始发布