Hacker News new | ask | show | jobs
by rcleveng 41 days ago
True, before UV the only way to package python was a container.
3 comments

Yes. we switched from devcontainers to uv and the workflow is now much simpler and faster.
Yup, I ended up learning docker because Python packaging was such a dumpster fire.

I'll never forget the day I discovered that pip didn't do any dependency resolution. You had one job, and yet...

Until uv, I used docker to run python projects locally. Got so fed up with venvs and versions and slowness and lack of wheels and spending so much time mucking around with it when cloning or updating a repo.

Uv hasn't fixed all issues, but made it far less painful.

apt install …

When people all have these special needs they never show their code.

So apt install worked if you had a decent Linux box and the correct versions of C and Fortran libraries were available.

I worked with data, so tended to use conda and still have loads of problems. Pre compiled wheels and uv have made the situation a lot better.

When you do apt install, the maintainer made sure that the correct versions of whatever dependency was indeed available. That's the entire point of a distribution.
Yes. But many of the dependencies I needed were either not packaged or so old that I couldn't use them.

Seriously, data stuff was a massive massive struggle with Python for ages, and uv and compiled wheels have made it much better.

Poetry?
And pipenv, or just literally manually creating a venv. Uv didn't invent that, it's winning on speed mainly, and then capitalising on starting with a base that includes multiple general improvements in the Python ecosystem.
uv also installs the python version your project needs which is a huge pain in the ass if you use some old Linux distro with outdated python.
Like pyenv pioneered for python and nvm for node ? ;)

Years ago

Sure, but it's not a matter of capability but of low friction and sane defaults.

These things matter though a lot of developers don't seem to understand that.

In a uv project I can just git clone, cd, uv sync and I am ready to go. Nothing in the python ecosystem offered that before.

> uv sync

You can also just do "uv run", and it will automatically sync as necessary!

I think that's one of the things that uv does great and often goes unnoticed: It's hard to use wrong for a layman. Forgetting to run the equivalent sync command in most other Python package mangers could have resulted in a myriad of different bugs caused by out of sync packages, leading to hours of wasted debugging.

> In a uv project I can just git clone, cd, uv sync and I am ready to go. Nothing in the python ecosystem offered that before.

`poetry install` does the same thing except for downloading Python.

I transitioned from Poetry to uv. Other than being mildly faster and providing workspaces, uv doesn't really change at all how one interacts with and manages a project. And in fact, uv just adds additional quirks and gotchas and limitations, including storing authorization keys in plain text.

uv also duplicated things in the Python ecosystem but then didn't implement the same feature sets, so you often end up needing to call the existing tool, just like you did in Poetry.