Live data from Hacker News

Uv overtakes pip in CI

wagtail.org

151–160 of 184 posts

Re: Uv overtakes pip in CI

#151
post #40

Earlier quoted context omitted.

I’ll bite - I could care less about speed, that feels like a talking point I see often repeated despite other package managers not being particularly slow. Maybe there’s some workload I’m missing that this is more important for? I’ve tried uv a couple places where it’s been forced on me, and it didn’t work for whatever reason. I know thats anecdotal and I’m sure it mostly works, but it obviously was off putting. For…

Being forced to use a tool you don't want to use sucks, no matter how awesome that tool may or may not actually be. *conda and uv have roughly the same goals which means they're quite similar. For me, the speed of uv really does set it apart. For python programs with lots of dependencies, it's faster enough that I found it worth it to climb its learning curve. (ChatGPT makes that curve rather flat.) pip install -r re…

Tangential: if you're stuck in the condaverse I would *loudly* recommend checking out pixi. Pixi is to conda as uv is to setuptools.

Re: Uv overtakes pip in CI

#152
post #137

Earlier quoted context omitted.

So you say I am lying?

I'm saying they have much bigger problems than what python package manager they are using.

Granted, but that is relevant to the point I made in which way?

In reality you will have people running different OS versions. Maybe not within one org, but across users? For sure. If you are not using containers for one reason or another uv has shown to be a very good, reliable and easy to use way of dealing with the issues like these.

Additionally it has some other benefits when it comes to dev dependecies etc. Not that you couldn't somehow manage without it, it just makes certain things so much less pain as they were.

Re: Uv overtakes pip in CI

#153
post #109

Earlier quoted context omitted.

Yeah, but it sold itself on its merrits. That is the point. Maybe venv and pip works fine for some toy projects that are deployed on the developer controlled OS without regular dependency updates, but let me assure you I had hours of fights with updating python services with complex needs on Debian boxes from various ages while ensuring whst I ran as a dev is the stuff that is guaranteed to run in production. With uv…

Also one has to chuckle at the notion that re-writing package management in Rust is some kind of fanbois with hammers looking for nails activism. Rust is almost certainly the best option for this in the 2020s, especially for a package ecosystem as deranged as Python's.

By this point I feel reminded of a former collegue I ate lunch with, who would repeatedly make jokes about how "vegans constantly need to talk about their veganism". During our shared time he brought that topic up probably a hundred times, while the single time veganism was brought up by anybody was by a female intern after she was asked by him why she doesn't like to try the meat.

This is what reflexive criticism of Rust starts to feel like. I get that this somehow grinds some peoples gears, but come on. Who cares what it is written in if it is good software. And as someone who tried all major ways of dependency management in Python I have to say it is the best. Don't like that it is written in Rust for ideological reasons? Go ahead and write it better in C¹ or whatever.

¹: Nothing against C, I regularily use it for embedded programming, but it appears many of the loudest Rust allergics come from there

Re: Uv overtakes pip in CI

#154

Earlier quoted context omitted.

Being forced to use a tool you don't want to use sucks, no matter how awesome that tool may or may not actually be. *conda and uv have roughly the same goals which means they're quite similar. For me, the speed of uv really does set it apart. For python programs with lots of dependencies, it's faster enough that I found it worth it to climb its learning curve. (ChatGPT makes that curve rather flat.) pip install -r re…

Tangential: if you're stuck in the condaverse I would *loudly* recommend checking out pixi. Pixi is to conda as uv is to setuptools.

Does uv actually have a replacement for setuptools yet?

Re: Uv overtakes pip in CI

#155

This shouldn’t be a surprise to anyone who has been using Python and has tried uv. Python dependency management and environments have been a pain for 15 years. Poetry was nice but slow and sometimes difficult. Uv is lightning fast and damn easy to use. It’s so functional and simple.

I never got why.

I use Python since version 1.6, mainly for OS scripting, because I rather use something with JIT/AOT in the box for application software.

Still, having a little setup script to change environment variables for PYTHONPATH, PATH and a few other things, always did the trick.

Never got to spend hours tracking down problems caused by the multiple solutions that are supposed to solve Python's problems.

Re: Uv overtakes pip in CI

#156
post #126
post #99

Earlier quoted context omitted.

A sure way to learn why it is needed would be to: 1. Write code that crosses a certain complexity treshold. Let's say tou also need compiled wheels for a performance critical section of a library that was written in Rust, have some non-public dependencies on a company-internal got server 2. Try deploying said code on a fleet of servers whose version and exact operating system versions (and python versions!) are total…

This explains a lot for me. On the server side, all my for-pay stuff is deployed using Docker. We have a single Python environment and complete control over it. We do multistage for compilation. Client side, we don't get the privilege of deploying code: we need to build installers, which means again we have complete control over the environment because we package Python and all associated dependencies. I'm sure there…

Yeah makes sense, with docker in the mix the things uv brings are less interesting, although using uv for small one-off scripts is also an interesting application (there is a way of making uv your shebang, declaring sependencies within the python file and essentially getting a uv-ran python script that will auto-download the needed dependencies).

Over the years I encountered many situations where other solutions (pip+pyenv, poetry, easy_install) lead to hour long stops in dependency hell. Meanwhile uv just works. Even the most complicated projects I transfered over since I decided to make the switch worked first try.

I am not the person who has to go for the newest shiniest thing just because, but if that new shiny thing does the job instead of wasting my time sign me up.

Re: Uv overtakes pip in CI

#157
post #9

Earlier quoted context omitted.

for me the surprise is the pace? I’d expect people to be more set in their tools that it takes longer than a few months for a new tool, no matter how good, to become the majority use one. Though perhaps people adopt new tools more easily in CI where install times matter more

I feel like I've tried at least 5 different package management tools for python. Between pip, poetry, pip-tools, pipx, I'm not really sure what easy_install, egg, pkg_info are, but I do know I have always been surprised I need to care. It sounds like uv is a drop-in replacement for pip, pipx, and poetry with all of their benefits and none of the downsides, so I don't see why I wouldn't migrate to it overnight.

It's a (better IMO) replacement for poetry, but not drop-in. Additionally it is a drop-in replacement for venv and pip-tools.

Re: Uv overtakes pip in CI

#158
post #83

The Astral team did a great job with uv (and ruff!). I just wish they had used `install` instead of `add` and `sync`. `uv install` = `uv sync` `uv install rich` = `uv add rich`

I prefer shorter commands, so I just wish they'd gone with `uv rm` instead of `uv remove`.

Re: Uv overtakes pip in CI

#159
post #148

Interesting to see Wagtail mentioned on HN. Anyone using it in production care to chime in on how uv improves your experience?

We use Wagtail with uv all the time - uv is just better at every single thing it does than any other way of doing any of those things.
Post reply on HN