Live data from Hacker News

uv downloads overtake Poetry for Wagtail users

wagtail.org

81–90 of 206 posts

Re: uv downloads overtake Poetry for Wagtail users

#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 those random fails to build of C/C++ dependencies. Does uv address this? I've always seen people rave about other benefits.

Re: uv downloads overtake Poetry for Wagtail users

#82
As much as I am glad that it looks like one solution is being more and more accepted as the golden standard, I'm a little disappointed that PDM [0] -- which has been offering pretty much everything uv does for quite some time now -- has been completely overlooked. :(

[0] https://pdm-project.org

Re: uv downloads overtake Poetry for Wagtail users

#83
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…

That's what I mean, in this case pip, uv, etc. are the wrong tool to use. You could e.g. use pixi and install all python and non-python dependencies through that, the conda-forge package of shapely will pull in geos as a dependency. Pixi also interoperates with uv as a library to be able to combine PyPI and conda-forge packages using one tool.

But conda-forge packages (just like PyPI packages, or anything that does install-time dependency resolution really) are untestable by design, so if you care for reliably tested packages you can take a look at nix or guix and install everything through that. The tradeoff with those is that they usually have less libraries available, and often only in one version (since every version has to be tested with every possible version of its dependencies, including transitive ones and the interpreter).

All of these tools have a concept similar to environments, so you can get the right version of GEOS for each of your projects.

Re: uv downloads overtake Poetry for Wagtail users

#84

Earlier quoted context omitted.

This is the one thing that took a while for me to get to grips with. I tend to use `asdf` for my python version management, which I want to continue to use since I use it for most other languages. It'd be nice if we could have a shim for `uv` that allows it to play nice with `asdf` (there is an `asdf-uv` but seems to be about installing different versions of `uv` when instead I want to install different versions of p…

I can't see any reason really to keep using asdf for python when a better alternative now exists, unless you just don't want to learn the new syntax?

If all you do is write Python then sure, but for the rest of us that have to run code written in 7 different languages within our project, written by 7 different teams, playing nicely with asdf is non-negotiable.

I've had it with version managers that only target a single language or tool, the cognitive load is too high if there's more than a couple of languages in the mix.

What would be really nice is an asdf-like single package manager with language-specific plugins. That would save me a bunch of headaches.

Re: uv downloads overtake Poetry for Wagtail users

#85
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…

> I wonder what it would take to get poetry on par with uv

Different laws of physics, to start with.

Re: uv downloads overtake Poetry for Wagtail users

#86
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…

The python ecosystem has become a disaster. Even reading your post gave me a headache.

Re: uv downloads overtake Poetry for Wagtail users

#87

Earlier quoted context omitted.

For value of "years" greater than 1? Node/NPM was a poster child of an ecosystem where projects break three times a week, due to having too many transitive dependencies that are being updated too often.

This argument makes no sense. Your dependencies don't change unless you change them, npm doesn't magically update things underneath you. Things can break when you try to update one thing or another, yes, but if you just take an old project and try and run it, it will work.

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.

It's not like Node projects are distributed with their deps vendored; there's too much stuff in node_modules.

Re: uv downloads overtake Poetry for Wagtail users

#88
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…

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?

Re: uv downloads overtake Poetry for Wagtail users

#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 significantly more brittle. It felt more like a collection of hacks than anything else.

Re: uv downloads overtake Poetry for Wagtail users

#90

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…

I'm not personally releasing a ton of internal packages where I work but I know of https://github.com/tox-dev/tox-uv. Haven't tried it yet though but it seems to do what you want. I also saw that nox (tox but in python instead of a tox.ini file https://nox.thea.codes/en/stable/config.html), is supporting uv from what I understand.

I don't think there's a definite answer yet.

Post reply on HN