Live data from Hacker News

uv downloads overtake Poetry for Wagtail users

wagtail.org

101–110 of 206 posts

Re: uv downloads overtake Poetry for Wagtail users

#101
post #72

Earlier quoted context omitted.

But for example, if I install the Python package "shapely", it will need a C package named GEOS as a shared library. How do I ensure that the version of GEOS on my system is the one shapely wants? By trial and error? And how does that work with environments, where I have different versions of packages in different places? It sounds a bit messy to me, compared to a solution where everything is managed by a single pack…

What exactly prevents you from creating your own packages if you want to use your system package manager? On Alpine and Arch Linux? Exactly nothing. On Debian/Ubuntu? maybe the convoluted packaging process, but that's on you for choosing those distributions.

On Nvidia/Jetson systems, Ubuntu is dictated by the vendor.

Re: uv downloads overtake Poetry for Wagtail users

#102
post #72
post #63

Earlier quoted context omitted.

IMO if you require libraries in other languages then a pure python package manager like uv, pip, poetry, whatever, is simply the wrong tool for the job. There is _some_ support for this through wheels, and I'd expect uv to support them just as much as pip does, but they feel like a hack to me. Instead there is pixi, which is similar in concept to uv but for the conda-forge packaging ecosystem. Nix and guix are also l…

But for example, if I install the Python package "shapely", it will need a C package named GEOS as a shared library. How do I ensure that the version of GEOS on my system is the one shapely wants? By trial and error? And how does that work with environments, where I have different versions of packages in different places? It sounds a bit messy to me, compared to a solution where everything is managed by a single pack…

You are describing two different problems. Do you want a shapely package that runs on your system or do you want to compile shapely against the GEOS on your system. In case 1 it is up to the package maintainer to package and ship a version of GEOS that works with your OS, python version, and library version. If you look at the shapely page on pypi you'll see something like 40 packages for each version covering most popular permutations of OS, python version and architecture. If a pre-built package exists that works on your system, then uv will find and install it into your virtualenv and everything should just work. This does means you get a copy of the compiled libraries in each venv.

If you want to build shapely against your own version of GEOS, then you fall outside of what uv does. What it does in that case is download the all build tool(s) specified by shapely (setuptools and cython in this case) and then hands over control to that tool to handle the actual compiling and building of the library. It that case it is up to the creator of the library to make sure the build is correctly defined and up to you to make sure all the necessary compilers and header etc. are set up correctly.

Re: uv downloads overtake Poetry for Wagtail users

#103
post #48
post #30

Earlier quoted context omitted.

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.

I don't think you need to sync, do you? It always just does it when running. That said, I do wish uv had `uv activate`. I like just working in the virtualenv without having to `uv run` everything.

You can still `source .venv/bin/activate(.fish)` and skip the uv run bit. I have Fish shell configured to automatically activate a .venv if it finds one in a directory I switch to.

Re: uv downloads overtake Poetry for Wagtail users

#104
post #97

Earlier quoted context omitted.

So the only difference is that Conda also isolates "system" libraries (like libcublasLt.so), or does uv also do this? It's not that uv is not an option for me, I made this move to miniforge before uv was on my radar because it wasn't popular, but I'm still at a point where I'm not sure if uv can do what I need.

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?

Re: uv downloads overtake Poetry for Wagtail users

#105
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.

Beyond performance? Performance!

Re: uv downloads overtake Poetry for Wagtail users

#107

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…

You're using a different, not hosted anymore package, three times a week ? That's somewhere between very unusual and downright absurd. Yes you can find edge cases with problems. Using this as an argument for "breaks 3 times per week" does not hold.

No, I was using this as an argument for why I don't expect Node projects older than a year or two to be buildable without significant hassle.

(Also note that outside the web/mobile space, projects that weren't updated in a year are still young, not old. "Old" is more like 5+ years.)

The two things are related. If your typical project has a dependency DAG of 1000+ projects, a bug or CVE fix somewhere will typically cause a cascade of potentially breaking updates to play out over multiple days, before everything stabilizes. This creates pressure for everyone to always stay on the bleeding edge; with a version churn like this, there's only so many old (in the calendar sense) package dists that people are willing to cache.

This used to be a common experience some years back. Like many others, I gave up on the ecosystem because of the extreme fragility of it. If it's not like that anymore, I'd love to be corrected.

Re: uv downloads overtake Poetry for Wagtail users

#108
post #89
post #81

I keep reading praise about uv, and every single time I never really understand what problems it addresses. I've got a couple quite big Django projects for which I've used venv for years, and not once have I had any significant issues with it. Speed at times could have been better and I would have liked to have a full dependency list lock file, but that never caused me issues. The only thing that comes to mind is tho…

What makes it so great for me is the effortlessness. I often use Python for quick one off scripts. With UV I can just do `uv init`, `uv add` to add dependencies, and `uv run` whatever script I am working on. I am up and running in under a minute. I also feel confident that the setup isn't going to randomly break in a few weeks. With most other solutions I have tried in the Python ecosystem, it always seemed significa…

You can even inline the dependencies:

https://docs.astral.sh/uv/guides/scripts/#declaring-script-d...

That plus this: https://news.ycombinator.com/item?id=42855258

Makes it pretty seamless for one-off scripts.

Re: uv downloads overtake Poetry for Wagtail users

#109
post #97

Earlier quoted context omitted.

I’m a bit confused why uv is not an option for you. You don’t need to compile Python, it manages virtualenvs for you, you can use them with Jupyter and vscode. What are you missing?

So the only difference is that Conda also isolates "system" libraries (like libcublasLt.so), or does uv also do this? It's not that uv is not an option for me, I made this move to miniforge before uv was on my radar because it wasn't popular, but I'm still at a point where I'm not sure if uv can do what I need.

According to these docs

https://docs.astral.sh/uv/pip/environments/

I think uv supports conda envs

Re: uv downloads overtake Poetry for Wagtail users

#110
post #3

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…

Python has been mostly working okay for me since I switched to Poetry. (“Mostly” because I think I’ve run into some weird issue once but I’ve tried to recall what it was and I just can’t.)

uv felt a bit immature at the time, but sounds like it’s way better now. I really want to try it out... but Poetry just works, so I don’t really have an incentive to switch just yet. (Though I’ve switched from FlakeHeaven or something to Ruff and the difference was heaven and hell! Pun in’tended.)

Post reply on HN