Live data from Hacker News

Uv is fantastic, but its package management UX is a mess

loopwerk.io

81–90 of 161 posts

Re: Uv is fantastic, but its package management UX is a mess

#81

> Poetry does the same by default, using a format like >=1.23.4, What??? I understood the first format instantly, but had no idea what the second meant until the author explained it.

And then you look it up once, and now you know what it means forever. By contrast, the former expression is much wider with more going on, and furthermore you can't skim past it being sure nothing funny is going on because it may or may not be a range compatible with the latter form.

No.

I have look it up years ago, and I don't remember all combination of `=` vs `^` vs `~` across all languages and package managers

Re: Uv is fantastic, but its package management UX is a mess

#82

The author seems to use uv with Python (somewhat) fundamentally differently that I do. I don't expect uv to do anything fancy. I don't run module management (installation, upgrades) through uv commands. I don't much care what uv's syntax is. I let each tool do one thing. - Tool 1: UV makes a venv for each project, with whatever Py version is suitable for that project, so that each project's dependencies do not collid…

It looks like the only thing you are using uv for is to set up a virtual environment? I guess it might be installing python for you too?

Some of the things I love about uv that pip by itself doesn't give me

If you remove a package, it's dependencies get removed too

Caching. Creating a new clone or workspace is almost instant because uv has cached all the packages

Much simpler command-line than your pip examples above.

Re: Uv is fantastic, but its package management UX is a mess

#83

The author seems to use uv with Python (somewhat) fundamentally differently that I do. I don't expect uv to do anything fancy. I don't run module management (installation, upgrades) through uv commands. I don't much care what uv's syntax is. I let each tool do one thing. - Tool 1: UV makes a venv for each project, with whatever Py version is suitable for that project, so that each project's dependencies do not collid…

If it feels wrong to use uv to manage dependencies, you don't need to go that far. Start with replacing `pip install` with `uv pip install` for a huge free speed boost.

Re: Uv is fantastic, but its package management UX is a mess

#84

> Note the lack of an upper bound Since uv needs a singular resolution that's entirely intentional. In npm you can install diverging resolutions for different parts of the tree but that is not an option with Python. I had to make the same decision in Rye and there is just no better solution here. If an upper bound were to be supplied you would end up with trees that can no longer resolve in practice. Some package eco…

That part of the article almost read like clickbait, because at the end he admits there is an upper bound arg: > uv add pydantic --bounds major So not really sure what he's complaining about

the article complains about ux, not capabilities. In this case it is complaining about the defaults.

Re: Uv is fantastic, but its package management UX is a mess

#85
post #31

Earlier quoted context omitted.

> The entire purpose of semver is to give you a way to resolve that conundrum. New major version = assume it's incompatible. I'm not sure I'd agree with that characterization. The point of semver is that you can assume that certain types of bumps won't include certain types of changes, not that you assume that the types of changes that can happen in a type of bump will happen. A major version bump not breaking anythi…

> not that you assume that the types of changes that can happen in a type of bump will happen … an assumption that something happened is not a definitive statement that it did happen, only that we're assuming it did, because it could happen, or perhaps here, that because the major was bumped, that it is legal, according to the contract given, for it to have possibly happened in a way that we depended on. They're not…

You and I have a very different version of what the equals sign means. "This is a reasonable action to take in this scenario" is not what I understand as equivalence.

Re: Uv is fantastic, but its package management UX is a mess

#86
post #19

Earlier quoted context omitted.

The use or adherence to semver isn't the problem here. As you say, if a package follows semver, it's easy enough for the package managers to automatically update to newer compatible versions. The problem is when you want to have two different incompatible versions of the same package `foo` in the same program, because then you have to figure out what `import foo` means. You might say "just don't do that", but that pa…

> Python does not handle this use case very well I solved this issue a few months ago. Created a tool that essentially allows the use of multiple envs at once, with their own versions of packages at any level.

This sounds... not possible for the core problem of how Python handles dependency resolution during the life of an application? How are you setting things up so that the following scenario is valid?

    program
    ├── dependency_a
    │   └── dependency_c (1.0.0)
    └── dependency_b
        └── dependency_c (2.0.0)
Otherwise, you've created a magic layer hack to enable multi-version dependency chains in a mono-version dependency chain language.

Re: Uv is fantastic, but its package management UX is a mess

#87
post #77
post #33

Earlier quoted context omitted.

Author of the article here. Sorry it comes across as “clickbait style” when actually it’s simply Dutch bluntness and honesty poetry update also updates the lockfile. I really think the way the uv cli is organized makes it quite annoying to work with. It’s designed for correctness, for machines, not for user-friendliness.

Not having used uv but being on the Cargo team for Rust, I wish `cargo update` was `cargo lock update` because it is making our life more difficult to add a version requirement update command/mode inside of Cargo. The effort has been stalled for years. - Our compatibility guarantees mean we can't fundamentally change `cargo update` - Using the third-party package name of `cargo upgrade` would be confusing in the dist…

Could `update` be deprecated in favor of an alias like`lock-update`?

Re: Uv is fantastic, but its package management UX is a mess

#88
post #77
post #33

Earlier quoted context omitted.

Author of the article here. Sorry it comes across as “clickbait style” when actually it’s simply Dutch bluntness and honesty poetry update also updates the lockfile. I really think the way the uv cli is organized makes it quite annoying to work with. It’s designed for correctness, for machines, not for user-friendliness.

Not having used uv but being on the Cargo team for Rust, I wish `cargo update` was `cargo lock update` because it is making our life more difficult to add a version requirement update command/mode inside of Cargo. The effort has been stalled for years. - Our compatibility guarantees mean we can't fundamentally change `cargo update` - Using the third-party package name of `cargo upgrade` would be confusing in the dist…

> the effort has been stalled for years

All because of some cargo-culted command!

Re: Uv is fantastic, but its package management UX is a mess

#89

> Poetry does the same by default, using a format like >=1.23.4, What??? I understood the first format instantly, but had no idea what the second meant until the author explained it.

And then you look it up once, and now you know what it means forever. By contrast, the former expression is much wider with more going on, and furthermore you can't skim past it being sure nothing funny is going on because it may or may not be a range compatible with the latter form.

For what it's worth, even as someone who's known about the syntax for over a decade, I think there have already been two times this calendar year that I've mistakenly gotten the meanings of the caret and tilde operators on package versions mixed up and been corrected on it.

Re: Uv is fantastic, but its package management UX is a mess

#90
post #56

Earlier quoted context omitted.

> now you know what it means forever Not, in fact, correct. Knowledge only cements itself in the brain when it's regularly referenced. Because `>=` and `<=` borrow well-established concepts well-established, they are both intuitive to people reading them for the first time, and easier to solidify or to re-infer for someone who's forgotten their meaning.

> Knowledge only cements itself in the brain when it's regularly referenced. While true, this is a molehill, not a mountain, of a bar, like "coding once in a while". I'm doing mostly SRE work, and this syntax has no trouble sticking in my head, and I encounter it pretty regularly? (And heck, most of my work these days is in Python, so there I get the >=, If you're actively developing a codebase, this definitely isn't…

I'd argue that complaining about using combined "greater than" and "less than" operators instead of the caret is about the same size of molehill as complaining about the usage of it. Seeing either of them in dependencies at my job would be a pretty mundane event that I wouldn't bother trying to do anything about.
Post reply on HN