I recently switched to uv, and I cannot praise it enough. With uv, the Python ecosystem finally feels mature and polished rather than like a collection of brittle hacks. Kudos to the uv developers for creating such an amazing piece of software!
Yeah, switched to writing python professionally ~4 years ago, and been low key hating the ecosystem. From a java and javascript background, it's mostly been npm/mvn install and it "just works". With python, there's always someone being onboarded that can't get it to work. So many small issues. Have to have the correct version per project, then have to get the venv running. And then installing it needs to build stuff…
uv downloads overtake Poetry for Wagtail users
41–50 of 206 posts
Re: uv downloads overtake Poetry for Wagtail users
#42For the uninitiated what is the benefit of UV over pip? I've been working with pip for so long now that I barely notice it unless something goes very wrong.
Re: uv downloads overtake Poetry for Wagtail users
#43I’m still using pip, what am I missing?
Poetry and uv both offer better dependency management, and project isolation out of the box. If you work in a team, or on more than one python project, then it's worth spending a day to install & adopt either one of these systems.
Re: uv downloads overtake Poetry for Wagtail users
#44Plenty of packages still fail trying to spawn cmake, gcc and al. UV does not solve all the hard problems. Maybe switch to Pixi?
Switch to who?
Re: uv downloads overtake Poetry for Wagtail users
#45But being written in Rust means I'm having to also finally get somewhat proficient in Rust. Can any Rust developers comment on the quality of the uv codebase? I find it surprisingly procedural in style, with stuff like hundreds of `if dry_run` type things scattered throughout the codebase, for example. Is this normal Rust style?
Re: uv downloads overtake Poetry for Wagtail users
#46For the uninitiated what is the benefit of UV over pip? I've been working with pip for so long now that I barely notice it unless something goes very wrong.
- uv can install python and a virtualenv for you. Any command you run with `uv run` from the root of a repo will be aware of its environment, you don't even need to activate a virtualenv anymore. This replaces {pyenv, pyenv-virtualenv, virtualenvwrapper,...}.
- uv follows the PEPs for project config (dependencies, optional dependencies, tool configs) in the pyproject.toml so in case uv dies, it's possible to migrate away for the features are defined in the PEPs. Which is not the case for say, poetry.
- uv has a lock file and it's possible to make deps platform specific (Windows, Linux, MacOS, etc). This is in compliance with a PEP but not supported by all tools.
- uv supports custom indexes for packages so you can prefer a certain index, for example your company package index or pytorch's own index (for ML work).
- very fast, makes local dev very seamless and is really helpful in CI/CD where you might just setup and tear down python envs a lot.
Also, the team is responsive on Github so it's easy to get help.
Re: uv downloads overtake Poetry for Wagtail users
#47Earlier quoted context omitted.
Ok, and what's the advantage for the people who don't have "my pip is too slow" problem?
Wait times are in the order of tens of milliseconds instead of seconds. That makes a massive difference in how nice uv is to use vs pip.
I work in a place with 200 developers, and 99% of pip usage is in automated jobs that last an hour. Shaving a couple seconds off that will not provide any tangible benefit. However moving 200 people from a tool they know to one they don’t comes at a rather significant cost.
Re: uv downloads overtake Poetry for Wagtail users
#48Earlier quoted context omitted.
Ok, you convinced me to give it a try. Tbh, I am a casual user of python and I don't want to touch it unless I have a damn good reason to use it.
You do not need a damn good reason for this. Just try it out on a simple hello world. Then try it out on a project already using poetry for eg. uv init uv sync and you're done I'd say if you do not run into the pitfalls of a large python codebase with hundreds of dependencies, you'll not get the bigger argument people are talking about.
That said, I do wish uv had `uv activate`. I like just working in the virtualenv without having to `uv run` everything.
Re: uv downloads overtake Poetry for Wagtail users
#49Plenty of packages still fail trying to spawn cmake, gcc and al. UV does not solve all the hard problems. Maybe switch to Pixi?
Re: uv downloads overtake Poetry for Wagtail users
#50For the uninitiated what is the benefit of UV over pip? I've been working with pip for so long now that I barely notice it unless something goes very wrong.
The td;rd is that is has a lot less modes of failure.