Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

I agree uv is great but let’s not get carried away here. Poetry is good, pip was fine for many use-cases after they added native lock files.
 help



if you are working on one tiny project on your machine that pips in four packages you probably think pip was OK.

Circa 2017 I was working on systems that were complex enough that pip couldn't build them and after I got to the bottom of it I knew it not my fault but it was the fault of pip.

I built a system which could build usable environments out of pre-built wheels and sketched out the design of a system that was roughly 'uv but written in Python' but saw two problems: (1) a Python dependent system can be destroyed by people messing with Python environments, like my experience is that my poetry gets trashed every six months or so and (2) there was just no awareness by the 'one tiny project on your machine that pips in four packages' people that there was a correctness problem at all and everybody else was blaming themselves for a problem and didn't have a clear understanding of what was wrong with pip or what a correct model for managing python dependencies is (short answer: see maven) or that a 100% correct model was even possible and that we'd have to always settle for a 97% model. The politics looked intractable so I gave up.

Now written in rust, uv evaded the bootstrap problem and it dealt with the adoption problem by targeting 'speed' as people would see the value in that even if they didn't see the value in 'correctness'. My system would have been faster than pip because it would have kept a cache, but uv is faster still.


Well said.

I have used them all and UV is the only one that actually solves the problem.

It’s insane that people would suggest that Python can go back.


> everybody else was blaming themselves for a problem and didn't have a clear understanding of what was wrong with pip or what a correct model for managing python dependencies is (short answer: see maven)

I always looked down on the Java ecosystem but if it turns out Maven had a better story all along and we all overlooked it, that's wild.


Maven has its own bone headed design where it SILENTLY resolves conflicting dependency branches through a “closest to dep tree root wins” rule.

I still believe Rust is a red herring here. Your ‘uv but written in Python’ would probably have the same success as uv does now, if you did focus on speed over correctness. And I’ve yet to hear about pipx or Poetry getting trashed, but if it is a problem, I don’t think it’s impossible to solve in Python vs Rust.

> The politics looked intractable so I gave up.

So yeah, this is your actual problem. (Don’t worry, I’m in the same camp here.)


As much as I'm a Python fan I strongly disagree here that rust is a red herring.

Having a static binary makes distribution way simplier. There are a bunch of ways you could try to achive something like in python but it would be significantly larger.

Performance-wise writing it in python would have heavy startup overhead and wouldn't be able to get close to the same level of performance.

Obviously you could achive the same thing in many other languages, but rust ends up being a really good fit for making a small static binary for this workload of network heavy, IO-bound, async/threading friendly with the occasional bit of CPU heavy work.


>>> ‘uv but written in Python’

you mean pdm?


Poetry and friends are so bad that many people continued just using pip -r requirements.txt despite knowing about this other stuff

Poetry having users isn’t the metric for success. pip having way less users is.


How is uv awesome and Poetry so bad? They do basically the same things except Astral re-invents the wheel but only part way instead of just relying on the existing tools. uv is fast. As far as I can tell, there's hardly any difference in functionality except for it also replacing PyEnv, which I never use anyway.

uv assuming your local Python is busted to hell and back helps a lot with isolation.

Poetry's CLI would often, for me, just fall over and crash. Crashing a lot is not a fundamental problem in the sense you can fix the bugs, but hey I'm not hitting uv crashes.

pipenv was even worse in terms of just hanging during package resolution. Tools that hang are not tools you want in a CI pipeline!

The end result: `uv run` I expect to work. `pipenv` or `poetry` calls I have to assume don't work, have to put retries into CI pipelines and things like that.


Performance aside, uv is more standards compliant than Poetry about the pyproject.toml.

But yes, in terms of user interface they are pretty similar. UV performance really does make the difference.


uv has a lot of sensible defaults that prevent clueless developers to shoot their own feet. Uv sync, for example, would uninstall packages not in pyproject.toml

i kind of disagree with this. uv run is clunky, i don't want that. i want to keep the activate the venv and do shit model. i hate uv run as a primitive.

I mean you don't need to use that then. `uv` is still writing to `.venv` by default and you can activate it with `direnv` or w/e.

the point about defaults though, the default or defacto workflow is uv run

Maybe, but that's not how I've been holding it.

I think I have trauma from virtual environments...


I don't know if it's still true, but ~7 years ago when I last looked at it, Poetry didn't have the kind of UX I have in mind (That Astral/UV do). I remember trying to make it work, and it would choose Python 2 for some reason, despite me never having used it, and it having been obsoleted years before. I remember hitting many problems/errors I can't recall the detail of, but bad UX.

One of them is written in Rust....

>people continued just using pip -r requirements.txt

What exactly is the issue with this?


The requirements file isn't a lockfile: running that command at different times will give you different venvs.

Right, and that's expected.

let's get carried away.

`uv run` a .py with inline script metadata has all the deps installed and your script running in a venv while poetry is still deciding to resolve...




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: