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-sync、uv remove --no-sync和uv add --frozen的VIRTUAL_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.tomlfiles to ensure they conform to PEP 751 (#20146) - Warn when
pylock.tomlartifact 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-depsfinds the requested packages already installed (#21523)
Bug fixes
- Verify source archives against hashes recorded in
uv.lockbefore reading their metadata or running their build backends (#21223) - Verify supplied hashes for registry requirements pinned with
===under both--verify-hashesand--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-versionand.python-versionsfiles (#21529) - Suppress
VIRTUAL_ENVmismatch warnings foruv add --no-sync,uv remove --no-sync, anduv add --frozen(#21496) - Warn and continue when
uv python listcannot query an interpreter (#21498)
Documentation
- Restore TOML syntax highlighting for
exclude-newerexamples (#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
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>