News for hackers. Stuff that matters.
Re:Uv saves Home Assistant 215 compute hours per month by ffsm8 on Thursday April 04, 2024 @03:35AM (#39927560)
> Wouldn't you normally amortize that out for each top-level dependency you add to the project and write it to a lock file or something

Plain pip doesn't really have a lockfile. You can generate a freeze file, but that's something different in practice.

I haven't really been in the Python ecosystem in several years, but my surprise was mostly how there was no mention of Poetry or pipenv. Didn't they address that need before? Are they already out of favor?

Re:Uv saves Home Assistant 215 compute hours per month by danmur on Thursday April 04, 2024 @08:01AM (#39929265)
I don't think this is anything like poetry. The dependency resolution doesnt seem to handle much variation in arch or Python version or other variables I at least have to deal with. I generally use poetry for dependency management (only runs in dev) then use pip or venv-update to install in prod from a generated requirements.txt.

uv looks like a good and fast replacement for pip or venv-update but those only take a fraction of a second to run (on a noop, my main use case) so I personally haven't seen where uv would fit in my workflow yet. Maybe building in containers from scratch each time, though again pip is performant enough for me when not doing the hard work of dependency resolution, and for some reason it's not cached.

I am not sure why dependency resolution outside of dev or build systems would be done. But maybe I have escaped the loop.