GeezerVisonThe World Wide Web, restored to 800 pixels of glory. | ||||||||||||||||||||||||
| Home|About|Gaming cabinet|Archives|How it works|Starter sites | ||||||||||||||||||||||||
GeezerVison is showing github.com — Add uv-build to table by cbrnr · Pull Request #1880 · pypa/packaging.python.org Conversation
|
|
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? |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
Head branch was pushed to by a user without write access
for more information, see https://pre-commit.ci
|
I think it's easy enough to add this here. |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
I noticed that the table in writing-pyproject-toml.rst lists hatchling 1.27.0, whereas build-backend-tabs.rst contains 1.26.0. Should I fix this and if so, which one is the correct version?
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
It's probably a good idea to separate such changes. Also, the broken link needs a separate PR too, to unblock this. |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
| .. code-block:: toml | ||
|
|
||
| [build-system] | ||
| requires = ["uv_build >= 0.7.19, <0.9.0"] |
There was a problem 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?
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was a problem 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
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was a problem 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.
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was a problem 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).
cc @befeleme @hroncok @mgorny any downstream insights on this?
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was a problem 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.
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was a problem 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?
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was a problem 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.
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
There was a problem 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 anything actually breaks with the newer build tool versions).
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
I've filed a PR to automatically update the uv_build version range, to address the concern that the bounds would go stale: #1899
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
Another place it might be worth mentioning |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
@johnthagen that's already part of this PR. |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
@webknjaz the broken link works for me, can you re-run the failing test? |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
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. |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
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 |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
And I think that the option of |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
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 |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
Also note that we're only building pure Python Please see astral-sh/uv#3957 (comment), where we're addressing a lot of the common concerns there. |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was a problem 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.
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
Alright, let's give it a go. |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
In pypa#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.
In pypa#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.
In pypa#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.
There was an error while loading. Please reload this page.
Successfully merging this pull request may close these issues.
There was an error while loading. Please reload this page.