Live data from Hacker News

uv downloads overtake Poetry for Wagtail users

wagtail.org

131–140 of 206 posts

Re: uv downloads overtake Poetry for Wagtail users

#131
post #41

Earlier quoted context omitted.

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…

I cannot share the same experiences. mvn is a buggy mess, randomly forgetting dependencies, and constantly needing a full clean to not die on itself. npm and the entire js ecosystem feels so immature with constant breaking changes, and circular dependency hell, when trying to uppgrade stuff.

I've seen mvn projects that spin like a top and others that were a disaster.

I think it's little recognized that there is a scaling limit for snapshots. If you have 20 people developing 20 projects and they are co-located in the same room with the server builds work 50-80% of the time and people think it's fine. If you're the one guy who is remote and has a slow connection, builds work 0% of the time. The problem is that at slightly different times you get slightly different snapshots that aren't compatible with each other -- it's a scaling problem because if you add enough developers and enough projects it will eventually get you.

I've worked at other places when the mvn clean was necessary every time; other developers thought this shouldn't be necessary and I was a doofus except I was able to make consistent progress like a ratchet on the project and get it done and they weren't.

Where I am now mvn is just fine, whenever it screws up there's a rational explanation and we're doing it wrong.

Re: uv downloads overtake Poetry for Wagtail users

#132
post #23

Earlier quoted context omitted.

As a semi casual user of python that had to battle w/ dependency management recently, can you elaborate on why that would not be a good thing ? I thought about switching our project to uv but could not find the time necessary

Sure – and I think it’s certainly proving to be a good thing so far! My concerns are more longer-term. I see two primarily: (1) As uv’s governance is driven by a for-profit company, I see incentives that will eventually compromise on its benefits. (2) Python packaging has historically been very fragmented, and more recently there’s been lots of work on standardization. That work will be impacted when users massively…

> That work will be impacted when users massively shift to one package installer.

Charlie Marsh (who founded Astral that develops uv) is very engaged in the standardisation process around Python packaging. The whole idea around uv is to be something that follows the standards as much as possible. uv has been much more aggressive about conforming than the other package managers.

Re: uv downloads overtake Poetry for Wagtail users

#133

Earlier quoted context omitted.

uv does not ship system libraries because pypi does not have them. There is a philosophical difference between pypi and conda today. I believe over time pypi will likely ship some system libraries but we will see.

So uv is resticted to pypi but does offer isolated Python installations, with precompiled Python binaries?

It doesn’t “restrict” to pypi but it wants to be rooted in pypi. That means if you install “tensorflow” you get it from there. The state of pypi is the state of pypi and I have some hope that this also will improve. See for instance the efforts that go into “wheel next”.

Re: uv downloads overtake Poetry for Wagtail users

#134
post #53

Earlier quoted context omitted.

That's rough for all the creators of poetry, pdm, pipenv, etc. to hear. They put in a ton of great work over the last decade, but I fear you may be right.

I quite really like pdm! I can see why maybe poetry but especially pipenv might be replaced with uv, but what's the value of uv over pdm beyond performance? It ticks all my boxes otherwise.

I came to uv from pdm, and the only reason I switched is the sheer speed and simplicity of uv. Pdm is such a great utility, and it can use uv as the package solver, but uv still has it beat on raw speed, and it feels simpler to use (whether or not it actually is).

Re: uv downloads overtake Poetry for Wagtail users

#135

Earlier quoted context omitted.

- uv is aware of your dependencies, you can add/remove development dependencies, create group of development dependencies (test, lint, dev, etc) and add or remove those and only those at will. You can add dependencies and optional dependencies for a project as well, think my_app[cli,standard]. You don't need to have different requirements.txt for each case nor do you need to remove things by hand as you'd do in pip,…

Does this also replace, or work well with tox? We currently use it to run basic CI/local workflows (`tox -e lint` for all linters, `tox -e py310`, `tox -e py312` to run tests suites on chosen interpreters' environments), and to set up a local environment with package installed in-place (so that we can run `myprogram -arg1 -arg2` as if it was installed via `pip`, but still have it be editable by directly editing the r…

Uv works fine with tox, but have you tried nox? I only dipped my toes in tox, but I found nox around the same time and gravitated to it. I replaced PDM's "scripts" concept with nox sessions. I have a project where most of the functionality is nox sessions I call in CI pipelines. Writing sessions in pure python opens so many doors.

Re: uv downloads overtake Poetry for Wagtail users

#136
post #47

Earlier quoted context omitted.

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.

That’s just the same “my pip is too slow” problem which some people don’t have. 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.

For what it's worth uv is fully compatible with pip. just replace 'pip --foo bar' with 'uv pip --foo bar'. One project I'm working on is 100% 'classic' pip based with no plans of moving, but I still use uv when working on it as it is completely transparent. Uv manages my venvs and python versions and makes things like switching between different versions of python and libraries much smoother, and I can still use the same pip commands as everybody else, it's just that all my pip commands run faster.

Re: uv downloads overtake Poetry for Wagtail users

#137
post #117
post #77

I feel for me, at least one nice thing about poetry over uv is, that if I have an issue or feature extension, I can just write my own plugin in pure Python. With uv, I'd need to learn Rust in addition to python/c/c++/etc. I wonder what it would take to get poetry on par with uv for those who are already switching to it? Poetry is definitely very slow downloading multiple versions of packages to determine dependencies…

For me personally the killer uv feature is pyenv integration, which poetry doesn't do

Interesting - thanks. I use virtual environments and each has its own python version tied to it. Not sure if pyenv is useful to me but who knows perhaps one day. Good to know uv supports pyenv.

Re: uv downloads overtake Poetry for Wagtail users

#138
post #77

I feel for me, at least one nice thing about poetry over uv is, that if I have an issue or feature extension, I can just write my own plugin in pure Python. With uv, I'd need to learn Rust in addition to python/c/c++/etc. I wonder what it would take to get poetry on par with uv for those who are already switching to it? Poetry is definitely very slow downloading multiple versions of packages to determine dependencies…

In this day and age you don't usually have to download the packages to resolve the dependencies as PyPI can usually expose it (unless you need to install from sdist which is less common these days). Dependency resolution is slow because it's computationally very expensive. Because uv is written in Rust the resolution is just much much faster. IIRC they actually reuse the same resolution package that Cargo (Rust's pac…

Yes I think I heard pypi started exposing dependency info so it makes sense to use that where possible.

The dependency resolution computation is an interesting problem. I think poetry at some point switched to mypyc for compilation (although I can't find conclusive evidence for it now). From my experience, mypyc doesn't really improve performance much compared to say writing a c/c++ extension. Perhaps offloading dependency resolution in poetry to a native c library is a way to match uv.

Re: uv downloads overtake Poetry for Wagtail users

#139

Earlier quoted context omitted.

Assuming the downloads still exist? Does NPM cache all versions it ever distributed? That's always one major thing I saw breaking old builds: old binaries stop being hosted, forcing you to rebuild them from old source, which no longer builds under current toolchains - making you either downgrade the toolchain that itself may be tricky to set up, or upgrade the library, which starts a cascade of dependency upgrades. I…

> Does NPM cache all versions it ever distributed? Yes it does, that's the whole point. You can still go and install the first version of express ever put on npm from 12 years ago. You can also install any of the 282 releases of it that have ever been put on npm since then. That's the whole point of a registry, it wouldn't be useful if things just disappeared at some random point in time. The only packages that get r…

IIRC there is a package whose whole point is to include everything else in its package.json and make them ineligible for unpublish.

Re: uv downloads overtake Poetry for Wagtail users

#140
post #75

I've read so much positive feedback about uv, that I'd really like to use it, but I'm unsure if it fits my needs. I was heavily invested into virtualenv until I had to upgrade OS versions, which upgraded the Python versions and therefore broke the venvs. I tried to solve this by using pyenv, but the need of recompiling Python on every patch wasn't something which I would accept, specially in regards to boards like Ra…

Have you checked out https://github.com/prefix-dev/pixi? It's built by the folks who developed Mamba (a faster Conda implementation). It supports PyPI dependencies using UV, offers first-class support for multi-envs and lockfiles, and can be used to manage other system dependencies like CUDA. Their CLI also embraces much of the UX of UV and other modern dependency management tools in general.
Post reply on HN