Live data from Hacker News

Uv overtakes pip in CI

wagtail.org

11–20 of 184 posts

Re: Uv overtakes pip in CI

#11
post #4

UV is super fast and great for environment management, however it's not at all well suited to a containerised environment, unless I'm missing something fundamental (unless you like using an env in your container that is).

The only reason I haven't switched is its still barely-there support for air-gapped systems [1].

And lack of non-local venv support [2].

[1] https://github.com/astral-sh/uv/issues/10203

[2] https://github.com/astral-sh/uv/issues/1495

Re: Uv overtakes pip in CI

#12

As an outsider to python, I never got how a language who got popular for being simple, elegant and readable could end up with perhaps the most complex tooling situation (dependencies, envs, etc). Any time I glance at the community there seems to be a new way of doing things. What caused python to go through these issues? Is there any fundamental design flaw ?

People. People happened. Ideologies and strong opinions.

Re: Uv overtakes pip in CI

#13
it’s my 1st attempt at reporting on CI downloads specifically. Interpreting this is more of an art than a science, I’d love to hear if others have ideas on what to do with this data!

Re: Uv overtakes pip in CI

#14
post #9

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.

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

Honestly, I was skeptical when I learned about uv. I thought, just Python needs, another dependency manager… this was after fighting with pip, venv, venvwrapper, and poetry for years.

Then I gave it a try and it just worked! It’s so much better that I immediately moved all my Python projects to it.

Re: Uv overtakes pip in CI

#15
post #4

UV is super fast and great for environment management, however it's not at all well suited to a containerised environment, unless I'm missing something fundamental (unless you like using an env in your container that is).

I haven’t really had this issue. UV’s recommendation is to mount the uv.lock and install those manages package versions to the container’s global pip environment. We haven’t had much issue at my work, where we use this to auto-manage python developer’s execution environments at scale.

> UV’s recommendation is to mount the uv.lock and install those manages package versions to the container’s global pip environment.

Source? That's an option, but it's not even explicitly mentioned in the related documentation [1].

[1] https://docs.astral.sh/uv/guides/integration/docker/

Re: Uv overtakes pip in CI

#16

As an outsider to python, I never got how a language who got popular for being simple, elegant and readable could end up with perhaps the most complex tooling situation (dependencies, envs, etc). Any time I glance at the community there seems to be a new way of doing things. What caused python to go through these issues? Is there any fundamental design flaw ?

I call it the JS-syndrome.

Re: Uv overtakes pip in CI

#17

As an outsider to python, I never got how a language who got popular for being simple, elegant and readable could end up with perhaps the most complex tooling situation (dependencies, envs, etc). Any time I glance at the community there seems to be a new way of doing things. What caused python to go through these issues? Is there any fundamental design flaw ?

Seems like the flaw is that it was never a first class citizen of the language.

easy_install never even made it to 1.0

Still, not bad for a bunch of mostly unpaid volunteers.

Re: Uv overtakes pip in CI

#18
post #4

UV is super fast and great for environment management, however it's not at all well suited to a containerised environment, unless I'm missing something fundamental (unless you like using an env in your container that is).

Why not?

In my docker files I use `uv sync` to install deps vs `pip install -f requirements.txt`

And then set my command to `uv run my_command.py` vs calling Python directly.

Re: Uv overtakes pip in CI

#19
post #9

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.

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

uv first came out 15th February 2024 so it's a year and a half old now. Still pretty impressive for it to get adoption this fast though.

Re: Uv overtakes pip in CI

#20
post #4

UV is super fast and great for environment management, however it's not at all well suited to a containerised environment, unless I'm missing something fundamental (unless you like using an env in your container that is).

uv works great in a container, you can tell it to skip creating a venv and use the system's version of Python (in this case, let's say Python 3.14 from the official Python image on the Docker Hub).

The biggest wins are speed and a dependable lock file. Dependencies get installed ~10x faster than with pip, at least on my machine.

Both of my Docker Compose starter app examples for https://github.com/nickjj/docker-flask-example and https://github.com/nickjj/docker-django-example use uv.

I also wrote about making the switch here: https://nickjanetakis.com/blog/switching-pip-to-uv-in-a-dock...

Post reply on HN