Live data from Hacker News

Uv overtakes pip in CI

wagtail.org

181–184 of 184 posts

Re: Uv overtakes pip in CI

#181
post #30
post #15

Earlier quoted context omitted.

> 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/

https://docs.astral.sh/uv/guides/integration/docker/#interme... You kind of have to read between the lines and "know" this is a good solution and then when you see it it's like "right of course".

Nice tricks! I wasn't aware of the cache mounts, so I was building with UV_NO_CACHE=1. Cache mounts should also come handy when installing OS packages in multi-stage builds.

I still couldn't find the "global pip environment" part, unless by that you meant the "active pip environment", pointed by VIRTUAL_ENV during image building.

Re: Uv overtakes pip in CI

#182
post #22

Earlier quoted context omitted.

It's mostly about age. Python has been around for 35 years now. The first version of a Python package directory was the cheeseshop (Monthy Python reference) in 2003. The earliest version of a pip-like tool was "easy_install" which - I kid you not - worked by scraping the HTML listing page of the cheeseshop and downloading zip files linked from that! More recent languages like Node.js and Rust and Go all got to create…

I think it's also from trying to keep with the old paradigm of "libraries are installed and managed globally, potentially as linkable object files." All the languages of today gain all their improvements from: 1. Nothing should be global, but if it is it's only a cache (and caches are safe to delete since they're only used as a performance optimization) 2. You have to have extremely explicit artifact versioning, whic…

If, and only if, you have actual reproducible builds, you can distribute pre-compiled binaries as a cache optimization. That can allow for speedups without necessarily compromising security. It's also a prerequisite for a lot of "supply chain" security processes which are becoming increasingly desirable.

Re: Uv overtakes pip in CI

#183
post #145

I'm at the point where I don't touch python without uv at all, if possible. The only bad is, now I want to use uv to install go and java and debian packages too ... :( The ability to get random github project working without messing with system is finally making python not scary to use.

Pixi works for this use case: https://pixi.sh/latest/

It gives you cross-platform binary packages, quickly (also written in Rust).

Re: Uv overtakes pip in CI

#184
post #15

Earlier quoted context omitted.

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/

Yeah I see now I was mixing techniques in two sections of that document
Post reply on HN