uv 0.12.0 Released: uv init now defaults to src layout and configures uv_build backend
Score
78详细介绍了 uv init 默认行为的变更及其具体影响,对尚未跟进 src 布局的开发者有较高信息增量。
内容清晰、结构完整,包含变更前后对比、作者观点及额外资源链接,质量上乘。
直接指导开发者调整项目初始化习惯,提供迁移参考,实用价值高。
发布当日即报道,时效性极佳。
源自 Simon Willison 个人博客,其技术信誉高,且附有 GitHub 仓库验证,可信度好。
Base 86.5 × T2 Source weight ×0.9 = 78
Curation line 70Selected
Why selected
High information gain with detailed explanation of changes and author's perspective, directly useful for developers using uv.
AI commentary
「This release's default src layout reflects the evolution of Python community best practices. For teams using uv who haven't adopted the src layout yet, this is a good moment to reassess project structure. Combine it with uv build and script aliases to further boost development efficiency.」
Quick overview
uv 0.12.0 introduces breaking changes: the default project produced by `uv init` now uses a src/ layout package instead of a root-level main.py, configures the uv_build backend for building wheels and .tar.gz distribution files, and sets up a script alias `uv-run` that executes a `main()` function. The author, who previously avoided src layout out of inertia, suggests it's time to switch. This affects all new project initializations.
- uv init now defaults to a src/ layout package instead of a root-level main.py
- Automatically configures the uv_build backend for building wheels and sdist
- Sets up a script alias `uv-run` pointing to main() in src/uv_init/__init__.py
- This is a breaking change; existing projects are unaffected but new projects must adapt
Full text
Showing the source text; the full translation is being generated.
uv, in particular to the default project produced by the uv init command.
uv init is the uv shortcut for creating a new project. The previous version of uv, version 0.11.x, produced this directory when you ran uv init uv-init.
Here's what you get with uv 0.12. I have a GitHub repository that automatically snapshots the output of uv init, so you can also see the full diff:

uv init now defaults to a src/ shaped package, instead of dropping main.py in the root of the project. It also configures the uv_build backend for building wheels and .tar.gz distribution files when you run uv build. Finally, it sets up uv-init as a script alias which, when run with uv run uv-init, executes a new main() function in src/uv_init/__init__.py.
I've so far avoided using src layout in my own projects just out of inertia. I think it's time I switched.
Related items
84
FeaturedHow to Evaluate LLMs Before Production: Lessons from GitHub
GitHub 实战分享:如何在生产前评估 LLM
This practical guide stands out because it comes from a real security scenario, not theoretical reasoning. Teams integrating LLMs into production, especially those working on security scanning and data-sensitive engineering, should definitely read it. I recommend designing evaluation sets around your own business data rather than blindly adopting public benchmarks.
84
FeaturedRuff v0.16.0 Released: Default Rules Jump from 59 to 413, CI Pipelines Need Attention
Ruff v0.16.0 发布:默认规则从59条激增至413条,CI工作流需关注
For Python developers, this is an unmissable update signal. The significant increase in Ruff's default rules means we can no longer ignore potential issues in our code, and AI fix tools can lower the upgrade cost. Notably, Astral (OpenAI) is deeply integrating AI coding capabilities with static analysis tools, which may become the norm in future engineering practices.
81
FeaturedOpenRouter Team AI Spend Controls Setup Tutorial
OpenRouter 团队 AI 支出控制设置教程
As AI API spending balloons, OpenRouter's official governance tutorial signals that platforms are taking enterprise cost management seriously. Rather than waiting for bill shock, teams should configure these guardrails early. This is especially valuable for platform engineers and finance owners overseeing AI usage.
81
FeaturedFireside Chat with Anthropic's Claude Code Team: How AI Coding Agents Reshape Software Development
Anthropic Claude Code 团队炉边谈话:AI 编码代理如何重塑软件开发
The value of this fireside chat lies not in repeating Claude Code's features, but in revealing how Anthropic internally redefines engineering processes—shifting from 'execution-heavy' to 'taste-heavy'. For anyone in an AI product team, Cat's point that 'product taste outweighs execution' is worth pondering. Thariq's subversion of the 'never rewrite' rule also reminds us that traditional software engineering principles are being rewritten by AI capabilities.
80
FeaturedGPU Management: Why Idle GPUs Are the New Grounded Aircraft
GPU管理:闲置GPU为何成为新的停飞飞机
This blog is worth reading because it elevates GPU resource management to an economic perspective, using the grounded aircraft analogy to visualize waste. Teams using Kubernetes for GPU clusters can immediately try the recommended tools. However, users in China should note the compatibility of some tools outside AWS/GCP environments.
80
FeaturedAn Opinionated Guide to Which AI to Use to Do Stuff
一份主观指南:如何选择AI来做事情
This blog post is Simon Willison's refined take on Ethan Mollick's guide, ideal for developers and power users struggling to choose between ChatGPT and Claude and their various agent modes. It cuts through the confusion of product naming and unintuitive platform differences, offering clarity that saves hours of trial and error.
80
FeaturedPyPI Implements 14-Day Upload Window to Prevent Supply Chain Poisoning
PyPI 实施14天上传期限以防止供应链投毒
This is a critical message for the Python ecosystem. If you maintain any PyPI project, check your release workflow immediately — the 14-day window means you can no longer patch or overwrite files on old releases; you must publish a new version. For security teams, this is a best practice in supply chain security worth emulating by other package managers.
80
FeaturedLobsters Community Successfully Migrates to SQLite: A Win for Single-Server Architecture
Lobsters 社区成功迁移至 SQLite:单服务器架构的胜利
This migration case is particularly noteworthy because it challenges the conventional wisdom that small sites must adopt distributed databases. Lobsters proves that in 2026, a single server with SQLite can handle an active community. For startup teams struggling with overcomplicated tech stacks, this is an excellent reference for cost reduction and efficiency improvement.