-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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 our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
cbrnr
wants to merge
5
commits into
pypa:main
Choose a base branch
from
cbrnr:patch-2
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
+12
−0
Open
Add uv-build to table #1880
Changes from 4 commits
Commits
Show all changes
5 commits
Select commit
Hold shift + click to select a range
9a6a435
Add uv-build to table
cbrnr bfd629b
Add uv in other places
cbrnr 4bd6330
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] f57c5bf
Use first version that supported PEP 639
cbrnr 2f4a15a
Merge branch 'main' into patch-2
ncoghlan File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
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).
cc @befeleme @hroncok @mgorny any downstream insights on this?
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.
(That's a bit snarky... but I genuinely do believe it'll go stale unless the uv team has a stake in maintaining it)
Uh oh!
There was an error while loading. Please reload this page.
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 do not think it is snarky at all. Generally, not just for build dependencies, I do not think having real version constraints in this guide makes sense, because indeed they can not be kept up to date. 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.
Uh oh!
There was an error while loading. Please reload this page.
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.
When the advise from those projects is to add constraints the packaging guide should not provide conflicting advise. Creating two conflicting streams of advise is going to create user confusion.
I see regular PRs to update the setuptools lower bound, why would this be any different?
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?
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 should refrain from posting when I do not have the time to post clear messages...
By "real version constraints", I mean version constraints with actual numbers. I wonder if instead of writing
uv_build >= 0.7.19, <0.9.0
we could writeuv_build >= M.m.b, < M+1.0.0
and then explain what that means, why it might be useful, and recommend users to refer to the project's documentation for more details to figure out what are the best current actual numbers. And of course, we would do that for all build back-ends (not just for Uv) and wherever else in the guide we might have such things.But if people are willing to update those version strings in the guide all the time, it is fine by me.
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 of this PR review (rather than the more general ones of showing exact version numbers and upper bounds in build dependencies):
uv-build
is a reasonable change to makeflit
), not new in this PRThat says to me that we should define a new PyPUG issue regarding the maintainability of those config snippets, and avoid having that concern block this 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 adding
uv-build
to the example backends?