News for hackers. Stuff that matters.
Re:uv: An extremely fast Python package and project manager,... by 0cf8612b2e1e on Monday June 23, 2025 @02:09PM (#44358435)
The history of Python package management is clear that everyone thinks they can do a better job than the status quo.
Re:uv: An extremely fast Python package and project manager,... by psunavy03 on Monday June 23, 2025 @02:10PM (#44358452)
In this case, they were right.
Re:uv: An extremely fast Python package and project manager,... by dwattttt on Tuesday June 24, 2025 @01:34AM (#44363104)
I would say in many cases they were right; the history of Python package management is littered with winners as well as losers.
Re:uv: An extremely fast Python package and project manager,... by nickelpro on Monday June 23, 2025 @03:16PM (#44359071)
uv is purely a performance improvement, it changes nothing about the mechanics of Python environment management or packaging.

The improvements came from lots of work from the entire python build system ecosystem and consensus building.

Re:uv: An extremely fast Python package and project manager,... by 0cf8612b2e1e on Monday June 23, 2025 @03:36PM (#44359240)
Disagree in that uv makes switching out the underlying interpreter so straightforward. Becomes trivial to swap from say 3.11 to 3.12. The pybi idea.

Sure, other tools could handle the situation, but being baked into the tooling makes it much easier to bootstrap different configurations.

Re:uv: An extremely fast Python package and project manager,... by nickelpro on Monday June 23, 2025 @03:37PM (#44359250)
Yes, it's faster and better than pyenv, but the mechanism it's using (virtual environments) is not a uv invention.

uv does the Python ecosystem better than any other tool, but it's still the standard Python ecosystem as defined in the relevant PEPs.

Re:uv: An extremely fast Python package and project manager,... by pityJuke on Monday June 23, 2025 @04:26PM (#44359719)
Are the lock files standardised, or a uv-specific thing?
Re:uv: An extremely fast Python package and project manager,... by nickelpro on Monday June 23, 2025 @05:06PM (#44360091)
uv has both a uv-specific implementation, and support for standard PEP 751 lockfiles
Re:uv: An extremely fast Python package and project manager,... by collinmanderson on Wednesday June 25, 2025 @01:16PM (#44379691)
Worth noting uv-specific implementation has more features than that standard PEP 751 lockfiles, so uv plans to keep using its own implementation by default. https://github.com/astral-sh/uv/issues/12584
Re:uv: An extremely fast Python package and project manager,... by globular-toast on Monday June 23, 2025 @04:20PM (#44359656)
Actually not true. One of the main differences with uv is you don't have to think about venvs any more. There's a talk about it from one of the authors at a recent PyCon here: https://www.youtube.com/watch?v=CV8KRvWKYDw (not the same talk I linked elsewhere in the thread).
Re:uv: An extremely fast Python package and project manager,... by nickelpro on Monday June 23, 2025 @05:10PM (#44360151)
How do you think uv works?

It creates a venv. Note were talking about the concept of a virtual environment here, PEP 405, not the Python module "venv".

Re:uv: An extremely fast Python package and project manager,... by lmm on Monday June 23, 2025 @09:27PM (#44361997)
The implementation details don't matter. uv might follow PEP 405 but it could work just as well without doing so. The point is that it doesn't give you the bunch of extra footguns that any other Python package management does.
Re:uv: An extremely fast Python package and project manager,... by nickelpro on Monday June 23, 2025 @10:34PM (#44362387)
It matters immensely that it follows PEP 405, it makes uv the implementation detail. You can swap out uv for any other project management tool or build frontend and change nothing needs to change about the development environment.

This is the entire purpose of the standards.

Re:uv: An extremely fast Python package and project manager,... by lmm on Monday June 23, 2025 @11:16PM (#44362587)
> You can swap out uv for any other project management tool or build frontend and change nothing needs to change about the development environment.

> This is the entire purpose of the standards.

That seems to amount to saying that the purpose of the standards is to prevent progress and ensure that the mistakes of early Python project management tools are preserved forever. (Which would explain some things about the last ~25 years of Python project management I guess). The parts of uv that follow standards aren't the parts that people are excited about.

Re:uv: An extremely fast Python package and project manager,... by dagw on Tuesday June 24, 2025 @06:08AM (#44364533)
The parts of uv that follow standards aren't the parts that people are excited about.

I disagree. Had uv not followed these standards and instead gone off and done their completely own thing, it could not function as a drop in replacement for pip and venv and wouldn't have gotten anywhere near as much traction. I can use uv personally to work on projects that officially have to support pip and venv and have it all be transparent.

Re:uv: An extremely fast Python package and project manager,... by aragilar on Tuesday June 24, 2025 @07:43AM (#44365079)
uv only exists because of those standards and therefore can make assumptions that earlier tools could not.
Re:uv: An extremely fast Python package and project manager,... by nickelpro on Tuesday June 24, 2025 @02:14PM (#44369065)
There are no parts of uv that don't follow standards.

The standards have nothing to do with the last 25 years of Python project management, the most import ones (PEP 517/518) are less than 10 years old.

Re:uv: An extremely fast Python package and project manager,... by globular-toast on Tuesday June 24, 2025 @02:42AM (#44363448)
I said you don't have to think about venvs any more. It's great that we have a standard way to implement them, but this is only necessary in the first place because of the way Python is. Now we have a tool that enforces a workflow that creates virtualenvs without you having to know about them and therefore not screwing them up with ad hoc pip installs etc.
Re:uv: An extremely fast Python package and project manager,... by blitzar on Tuesday June 24, 2025 @03:53AM (#44363822)
> How do you think uv works?

Dont know, dont care. It thinks about these things not me.

Re:uv: An extremely fast Python package and project manager,... by henry700 on Monday June 23, 2025 @02:57PM (#44358893)
Of course they do, this tends to happen when the history is it being hot flaming garbage.
Re:uv: An extremely fast Python package and project manager,... by akoboldfrying on Monday June 23, 2025 @08:17PM (#44361572)
True, but then all software is developed for this reason.
Re:uv: An extremely fast Python package and project manager,... by lmm on Monday June 23, 2025 @09:29PM (#44362012)
Python package management was notoriously awful. The problem wasn't that people were trying to do things better, it was that they weren't; every new Python dependency management tool just repeated the mistakes of all the previous Python dependency management tools. uv is the first one to break the cycle (and it's probably not a coincidence that it's the first one to not be written in Python).
Re:uv: An extremely fast Python package and project manager,... by nonethewiser on Tuesday June 24, 2025 @10:56AM (#44366955)
Poetry broke the cycle. Unified toolchain, lock file, single configuration file, full dependency graph, dev dependencies. uv is faster which is great but Poetry was a huge step in the right direction and still a good tool.