Hacker News new | ask | show | jobs
by simoncion 53 days ago
> ...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.

1 comments

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.