Live data from Hacker News

Uv is the best thing to happen to the Python ecosystem in a decade

emily.space

311–320 of 1001 posts

Re: Uv is the best thing to happen to the Python ecosystem in a decade

#311
post #39

Everything from the astral team has been superb, I don't want to use Python without ruff & uv. Yet to try "ty", anyone used it?

I'm waiting for ty to get TypedDict checking. https://github.com/astral-sh/ty/issues/154

Re: Uv is the best thing to happen to the Python ecosystem in a decade

#312

But what was wrong with pip, venv and pyproject.toml in the first place? I just keep a system installation of python for my personal things and an environment for every project I'm working on. I'd get suspicious if a developer is picky about python versions or library versions like what crazy programs are you writing?

What's wrong? Having modify the shell environment, no lockfile, slow download/installation, lack of a standard dependency dir, ... > I'd get suspicious if a developer is picky about python versions or library versions Certain library versions only support certain python versions. And they also break API. So moving up/down the python versions also means moving library versions which means stuff no longer works.

You don't have to modify the environment (this is provided as an option for convenience). The alternatives are to use higher-level management like uv does, or to specify the path to executables in the virtual environment directly. But uv works by creating virtual environments that are essentially the same as what you get with `python -m venv --without-pip` (although they reimplemented the venv creation logic).

Pip can install from dependency groups in a pyproject.toml file, and can write PEP 751 lockfiles, and work is under way to allow it to install from those lockfiles as well.

I don't know what you mean about a "standard dependency dir". When you make a venv yourself, you can call it what you want, and put it where you want. If you want to put it in a "standard" place, you can trivially make a shell alias to do so. (You can also trivially make a shell alias for "activate the venv at a hard-coded relative path", and use that from your project root.)

Yes, pip installation is needlessly slow for a variety of reasons (that mostly do not have to do with being implemented in Python rather than Rust). Resolving dependencies is also slow (and Rust may be more relevant here; I haven't done detailed testing). But your download speed is still going to be primarily limited by your internet connection to PyPI.

Re: Uv is the best thing to happen to the Python ecosystem in a decade

#316
post #175

Earlier quoted context omitted.

> All these comments look like advertisement. "uv is better than python!!", "8/10 programmers recommend uv", "I was a terrible programmer before but uv changed my life!!", "uv is fast!!!" Have you tried uv?

Why would I? Does it offer something that standard python tools doesn't? Why uv over, lets say, conda?

Maybe open hundreds of threads praising uv to find what was answered thousand of times?

Re: Uv is the best thing to happen to the Python ecosystem in a decade

#317

curl|sh and iwr|iex chills my spine, no one should recommend these methods of installation in 2025. I'm against closed computers but I'm also against reckless install. Even without the security concerns these way of installation tends to put files in a whole random places making it hard to manage and cleanup.

What would you suggested as a recommend method of installation in 2025?

You can `pip install uv` or manually download and extract the right uv-*.tar.gz file from github: https://github.com/astral-sh/uv/releases

Re: Uv is the best thing to happen to the Python ecosystem in a decade

#319
post #167
post #160

I love uv. But the post starts with a simple install using a oneliner curl piping to sh, which is such a big attack surface area… I would much rather have a much longer one liner that increases safety.

Isn't uv like... a Rust binary? If that sh has any sense it just copies the binary and adds it to PATH.

If you look at the script, this is indeed more or less what happens. Except the folks over there are very clever about ergonomics, so the script is quite long so it can detect your architecture, OS, and even libc to give you an appropriate binary. There’s a tool that they use (which they wrote) which generates such install scripts for you

It’s really excellent stuff

Re: Uv is the best thing to happen to the Python ecosystem in a decade

#320

I gotta say, I feel pretty vindicated after hearing for years how Python’s tooling was just fine and you should just use virtualenv with pip and how JS must be worse, that when Python devs finally get a taste of npm/cargo/bundler in their ecosystem, they freaking love it. Because yes, npm has its issues but lock files and consistent installs are amazing

conda was great to me
Post reply on HN