Uv 在 CI 中超越 pip (适用于 Wagtail 用户)
Uv overtakes pip in CI

原始链接: https://wagtail.org/blog/uv-overtakes-pip-in-ci/

## uv 现在主导了 Python 包在 CI 中的安装 最近的数据显示,Python 包的安装方法发生了显著变化,尤其是在持续集成 (CI) 环境中。**uv** 现在是 Wagtail、Django 和 FastAPI 项目在 CI 中的首选安装工具,其使用率已超过 **pip**。 对于 Wagtail,**uv 占 CI 下载量的 66%**,而 pip 占 34%。Django 显示出相似的趋势(CI 中 43% 使用 uv),FastAPI 也是如此(CI 中 60% 使用 uv)。虽然 pip 在所有环境中的*总*下载量仍然领先,但 uv 在 CI 中的主导地位——自动化测试和构建发生的地方——值得关注。 这种转变表明,项目文档(如 README 和教程)和模板可能需要优先考虑 uv,从而提供更优越的安装体验。Wagtail 团队正在评估更新其资源,以反映这一增长趋势,并承认 uv 是其用户在 CI 中使用的主要工具。

## Uv:Python依赖管理领域的新星 一篇Hacker News讨论强调了**uv**,一种新的Python包管理器,其采用速度之快甚至超出了乐观预期。用户报告称,与pip、poetry和pipenv等传统工具相比,uv具有**显著的速度提升**,一些人甚至表示项目可以无缝切换。 主要优势包括**极快的依赖解析**、易用性和自动虚拟环境处理。许多评论者强调uv能够与现有工具集成,并且其工作流程出人意料地简单——通常只需`uv run script.py`即可。 虽然有些人表示怀疑,特别是那些对Python的包管理生态系统有负面经历的人,但很多人很快被它的性能和可靠性所折服。该工具的Rust实现也引起了关注,引发了关于Python性能限制的讨论。Uv似乎也在CI/CD流水线中获得越来越多的应用,这归功于其速度和可重现的构建。尽管在特定环境(如隔离系统或复杂的仓库内依赖关系)中存在一些限制,但uv正迅速成为许多Python开发人员的首选。
相关文章

原文

^ in CI for Wagtail projects, uv now sees more usage than any other installer. It’s at 66% of CI downloads of Wagtail, compared to 34% for pip. Other installers don’t report their CI usage specifically, but their overall usage is very distant.

What it means for Wagtail

"uv = good" is old news for all of the early adopters. For us, we look at those kinds of usage trends on a regular basis to figure out where everyone else is at. It’s a big deal if uv becomes the majority tool. And looks like it is now, at least in CI. In practice, it means it might be time for us to revisit our README install steps, tutorial / workshop instructions, or even the built-in project template – do we reflect the lower common denominator experience with pip, or the majority (and often superior) experience with uv?

In other projects

Oh and it’s not just looking to be that way for Wagtail, here are the same numbers for Django:

Line chart of PyPI downloads of Django. Two dotted lines for uv and pip. pip is wobbly but overall trend is relatively flat, uv is rising gradually. Two solid lines at the bottom for uv and pip 'likely CI', with the rising uv line going above the occasion

Looks like it’s the same story, just shifted by a few months? uv represents 21% of total Django downloads, and 43% of CI downloads.

And for good measure, the same numbers for FastAPI:

Line chart of PyPI downloads of FastAPI. Two dotted lines for uv and pip. pip is wobbly but overall trend is relatively up and to the right, uv is similar. Two solid lines at the bottom for uv and pip 'likely CI', with the rising uv line following its dot

Similar story, though again shifted by a few months? uv represents 31% of total downloads, 60% of CI downloads.

Methodology notes

Back to Wagtail, here are the download numbers and proportions for September 2025:

  • 480k total Wagtail downloads
    • 55% via pip (272k)
    • 28% via uv (139k)
  • 128k total downloads in CI (26%), with:
    • 34% for pip (43k downloads, 16% of total pip downloads, 9% of total)
    • 66% for uv (85k downloads, 61% of total uv downloads, 17% of total)

There is a fair chance the data will shift a bit month to month, but the trend is pretty clear (see the data and query if you want to dive deeper). For people unfamiliar with PyPI download statistics in BigQuery, this is what is possible to do:

联系我们 contact @ memedata.com