Hacker News new | ask | show | jobs
by simoncion 53 days ago
> my take on linux distros being annoyed by their own policies is that perhaps they should change the policy. in this case, perhaps they should pretend uv-build updates once a month or something.

Thing is, that apparently won't work. From [0], with some more discussion starting at [1]

> > I don’t understand why Gentoo needs to rebuild every single release of uv-build.

> Because if you don't pin a version of uv-build in your project, that means "use the latest version available". Gentoo can't second guess you--even if it were able to verify somehow that the new version of uv-build that just got released will end up producing an identical wheel for your project as the previous version, without actually using the new version of uv-build.

[0] <https://news.ycombinator.com/item?id=50077466>

[1] <https://news.ycombinator.com/item?id=50077553>

2 comments

> Gentoo can't second guess you

gentoo appears to support exactly 7 versions of uv-build, a list they update by hand: https://gitweb.gentoo.org/repo/gentoo.git/tree/dev-python/uv...

git changelog of uv-build in the gentoo package manager: https://gitweb.gentoo.org/repo/gentoo.git/log/dev-python/uv-...

gentoo also wrap python packages in their own package manager, packages in this tree appear to come from their upstream version control system eg Github, not PyPI.

just because someone on hn said something, doesn't make it true.

Per my response, that isn’t how Python packaging works. There is no “use the latest version” mechanism in standard Python packaging; leaving a version unconstrained means that the installer, meaning Gentoo in this case, gets to decide how to constrain it.
> ...leaving a version unconstrained means that the installer, meaning Gentoo in this case, gets to decide how to constrain it.

So, would it be correct to decide that package with an unconstrained version gets built with 0.1.0? And when that fails to build, what's the distro packager to do? Bang on the package maintainer until they specify the real constraint? Yeah, good luck with that.

Doesn't it make way more sense to assume that "unconstrained uv-build version" means "they only tested this with the very latest version of uv-build" and proceed accordingly? This will fail sometimes, but I figure it'll fail far less often then assuming that you get to use 0.1.0 if no version is specified.

I'm being a little extreme with my example here, but only to illustrate the larger point I'm making. Breaking changes do happen, and without specified version constraints one has to assume that "very latest available" is the correct one.

Well, that’s why you should use a semver range, as is the default, instead of leaving it unconstrained. That’s the actual solution that solves the problems for all parties here; I’m just pointing out that “unconstrained = latest” isn’t a correct summary of how Python packaging works.
In that case, wouldn't it be better for uv to reject unconstrained? Gentoo (or any packager, such as homebrew / nix) is too far downstream for that. Presumably allowing unconstrained seemed to make sense in some circumstances at some point?
No, because it’s a standard part of Python packaging, and it’s not the problem here.

(There are all kinds of legitimate reasons to use an unconstrained dependency, including locking it separately and also trying to help other downstream Linux distros with their own bespoke packaging problems.)

you literally just said

  > that’s why you should use a semver range, as is the default, instead of leaving it unconstrained
You should probably pick one of these two mutually exclusive options and stick with it.