- Notifications
You must be signed in to change notification settings - Fork1.4k
Add uv-build to table#1880
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
Uh oh!
There was an error while loading.Please reload this page.
Conversation
cbrnr commentedJul 18, 2025
I'm happy to add uv-build in the other locations mentioned in the linked issue. Is it OK in this PR, or should I open a new one? |
Head branch was pushed to by a user without write access
for more information, seehttps://pre-commit.ci
cbrnr commentedJul 18, 2025
I think it's easy enough to add this here. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
I noticed that the table inwriting-pyproject-toml.rst lists hatchling 1.27.0, whereasbuild-backend-tabs.rst contains 1.26.0. Should I fix this and if so, which one is the correct version?
webknjaz commentedJul 20, 2025
It's probably a good idea to separate such changes. Also, the broken link needs a separate PR too, to unblock this. |
| ..code-block::toml | ||
| [build-system] | ||
| requires = ["uv_build >= 0.7.19, <0.9.0"] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
Upper limits are normally discouraged. What's the justification here?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
See the note in their official docs:https://docs.astral.sh/uv/concepts/build-backend/#using-the-uv-build-backend
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
We make (careful) breaking changes in the configuration format in 0.x releases, i.e. the configuration is only stable between >=0.x and <0.(x+1). Being a build backend, the usual concerns about upper bounds don't apply: The uv build backend is a binary with only a minimal Python shim, so older versions of the build backend will still work with newer Python versions. It has zero dependencies and is the only package in the build venv, so the aren't any conflicts the upper bound could cause.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
Being a build backend, the usual concerns about upper bounds don't apply
That may be true upstream, but may present a challenge for the downstream maintainers as they often have a single version of a thing across their entire repositories (per distro release).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
Please don't encourage upper bounds here. If you do, we'll and up in a position where we cannot update uv-build until we lift them. We won't be even able to test the packages with the new uv-build version in Fedora because of the pin.
Thanks@webknjaz for the mention.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
Getting back to the specific question ofthis PR review (rather than the more general ones of showing exact version numbers and upper bounds in build dependencies):
- mentioning
uv-buildis a reasonable change to make - the exact build backend version number problem is an existing issue, not new in this PR
- the upper bound problem is an existing issue (due to
flit), not new in this PR
That says to me that we should define a new PyPUG issue regarding the maintainability of those config snippets, and avoid having that concern blockthis PR.
I've created that issue here:#1886
@webknjaz Given the creation of the dedicated issue, are you happy to consider the question resolved for the purpose of addinguv-build to the example backends?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
@ncoghlan I'm worried that accepting this as is would make the existing problem worse. And doing so is too impactful to just disregard it. The downstreams have expressed legitimate concern. Perhaps, we should address that issue you filed first so this PR wouldn't be as harmful?
because indeed they can not be kept up to date
I see regular PRs to update the setuptools lower bound, why would this be any different?
This is different because the example with setuptools is adding new features and when documenting them, the bound has to be updated for things to work. Inevitably.
But the same isn't happening when things break. Nobody comes in to update the guide documenting breakages and adjusting related bounds. And so there's no process for when this would be happening.
There should be a very obvious note leading to an explanation of why one should set version constraints with examples of how to write such version constraints and an advice to go check each project's own documentation regarding their versioning policies.
Every other build back end has lower bound version constraints, flit has lower and upper:https://packaging.python.org/en/latest/guides/writing-pyproject-toml/
Why are you adding this requirement for uv_build when it's not been required to any other build back end?
Lower bounds are fine. Flit was mostly missed. It should also have an admonition explaining that upper bounds should be updated often. Maybe this admonition makes sense to have below all the examples, not selectively.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
I guess my view is that the PR itself isn't really making things worse, it's instead making this existing problem with the status quo more obvious.
Omitting the upper bounds creates an "old project releases may not build" scenario that affects potentially everyone, whereas including them has a more limited impact specifically on "unified build environment" scenarios (which could potentially be mitigated by build tooling changes, such as an option to ignore upper bounds in build dependency declarations and see if anythingactually breaks with the newer build tool versions).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
I've filed a PR to automatically update theuv_build version range, to address the concern that the bounds would go stale:#1899
johnthagen commentedJul 21, 2025
Another place it might be worth mentioning |
cbrnr commentedJul 21, 2025
@johnthagen that's already part of this PR. |
cbrnr commentedJul 21, 2025
@webknjaz the broken link works for me, can you re-run the failing test? |
webknjaz commentedJul 21, 2025
Okay, I restarted it, but since this has been failing in multiple PRs, I don't expect it to succeed. Sometimes, different websites rate-limit or block access for crawlers or networks. In that case, they may open in a regular browser but break when on GitHub's network or just based on the User-Agent or similar. |
cbrnr commentedJul 22, 2025 • edited
Loading Uh oh!
There was an error while loading.Please reload this page.
edited
Uh oh!
There was an error while loading.Please reload this page.
You're probably right, but I think this problem should then be fixed in a different PR. One option would be to add this URL to |
mgorny commentedJul 30, 2025
And I think that the option of |
zanieb commentedJul 30, 2025 • edited
Loading Uh oh!
There was an error while loading.Please reload this page.
edited
Uh oh!
There was an error while loading.Please reload this page.
It sounds pretty challenging to say this in a way that makes sense to the target audience here? It adds a dependency on the Rust compiler for people who are on uncommon systems or won't use prebuilt wheels of |
konstin commentedJul 30, 2025
Also note that we're only building pure Python Please seeastral-sh/uv#3957 (comment), where we're addressing a lot of the common concerns there. |
ncoghlan left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
LGTM, but I'll give@webknjaz time to consider my suggestion on the version number/bounds maintainability question.
webknjaz commentedAug 8, 2025
Alright, let's give it a go. |
4e2c714Uh oh!
There was an error while loading.Please reload this page.
Inpypa#1880, the concern was raised that the uv_build upper bound in the docs will go stale. This PR adds a GitHub Actions workflow that automatically updates the version daily with the latest uv(-build) version.I tested this change on my fork, but I unfortunately can't test this in pypa/packaging.python.org itself.
Inpypa#1880, the concern was raised that the uv_build upper bound in the docs will go stale. This PR adds a GitHub Actions workflow that automatically updates the version daily with the latest uv(-build) version.I tested this change on my fork, but I unfortunately can't test this in pypa/packaging.python.org itself.
Inpypa#1880, the concern was raised that the uv_build upper bound in the docs will go stale. This PR adds a GitHub Actions workflow that automatically updates the version daily with the latest uv(-build) version.I tested this change on my fork, but I unfortunately can't test this in pypa/packaging.python.org itself.
Uh oh!
There was an error while loading.Please reload this page.
uv-build is stable since 0.7.19 and supports PEP 639.
📚 Documentation preview 📚:https://python-packaging-user-guide--1880.org.readthedocs.build/en/1880/