Live data from Hacker News

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

emily.space

971–980 of 1001 posts

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

#971

Uv is so good. I'm a curmudgeon about adopting new tooling, and tried uv with a lot of skepticism, but it was just better in every way. And even if it wasn't so polished and reliable, the raw speed makes it hard to go back to any other tool. Uv combined with type hints reaching critical mass in the Python ecosystem, and how solid PyLance is in VSCode, feels so good it has made me consider investing in Python as my pr…

> I know the performance meta in Python is to...not use python (bind to C, Rust, JVM) - and you can get pretty far with that (see: uv), but I'd rather spend my limited time building expertise in a language that isn't constantly hemorrhaging resources unless your code secretly calls something written in another language :/

In case it encourages you: a lot of uv's performance benefits come from things that are not the implementation language. In particular, it has a much more intelligent system for caching downloaded package artifacts, and when asked to pre-compile bytecode it can use multiple cores (this is coming soon to pip, to my understanding; actually the standard library already has a primitive implementation).

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

#972

Earlier quoted context omitted.

I think Python has a place in many developers toolkits. I've never met anyone who hates Python (though I'm sure they exist), whereas for pretty much any other language one could mention there are much more polarizing viewpoints. (as the saying goes "Python is everyone's second favorite programming language"). The Python team needs not feel any pressure to change to compete, Python has already done quite well and foun…

I hate python and I use it everyday because I work in the data space. Its a toy scripting / glue language that has gotten used for far too much that it was not designed for. The usual suspects are also really annoying, such as white space instead of {}, no types, its so damn slow and all projects use so many packages and the packages use packages etc. That last one could just be a personal preference thing to I will…

"white space instead of braces" is "just almost objectively bad"?

Why?

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

#973

Uv is so good. I'm a curmudgeon about adopting new tooling, and tried uv with a lot of skepticism, but it was just better in every way. And even if it wasn't so polished and reliable, the raw speed makes it hard to go back to any other tool. Uv combined with type hints reaching critical mass in the Python ecosystem, and how solid PyLance is in VSCode, feels so good it has made me consider investing in Python as my pr…

> But then I remember that Python is dog slow compared to other languages with comparable ergonomics and first-class support for static typing, and...idk it's a tough sell. Case in point: uv itself is not written in Python. It's a Rust tool. It always amazes me when people work on an ecosystem for a language but then don't buy enough into that to actually use it to do the work. Avoidance of dogfooding is a big red fl…

> It always amazes me when people work on an ecosystem for a language but then don't buy enough into that to actually use it to do the work.

> Avoidance of dogfooding is a big red flag to me.

I'm making PAPER for a reason.

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

#974
post #541
post #520

Earlier quoted context omitted.

On performance: 3.13 removed the GIL and added experimental first-party JIT (like PyPy). In two years I bet we’ll be seeing v8 level performance out of CPython.

The “Faster CPython” team were let go from Microsoft because they could only produce a 1.5x speedup in four years instead of the planned 5x. It’s wildly optimistic to now expect a 10x speedup in two years, with fewer resources.

Have you checked out what PyPy is already capable of?

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

#975
post #520

Earlier quoted context omitted.

On performance: 3.13 removed the GIL and added experimental first-party JIT (like PyPy). In two years I bet we’ll be seeing v8 level performance out of CPython.

I'd be surprised if we saw anything more than the 4x speedup from compiling Python with something like Nuitka/mypyc/etc can bring. I also believe the JIT in v8 and Python are different, the latter relying on copy-and-patch while v8 uses a bunch of different techniques together.

Obviously dumb microbenchmark, but here's ~17x on my machine:

  $ time python -c 'sum(range(1_000_000_000))'

  real 0m19.997s
  user 0m19.992s
  sys 0m0.005s

  $ time pypy -c 'sum(range(1_000_000_000))'

  real 0m1.146s
  user 0m1.126s
  sys 0m0.020s

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

#976

Earlier quoted context omitted.

There is nothing I dread more within the general context of software development, broadly , than trying to run other people's Python projects. Nothing. It's shocking that it has been so bad for so long.

Same! And Python was my first, and is currently my second-highest-skill language. If someone's software's installation involves Python, I move on without trying. It used to be that it would require a Python 2 interpreter. Honorable mention: Compiling someone else's C code. Come on; C compiles to a binary; don't make the user compile.

> C compiles to a binary; don't make the user compile.

C compiles to many different binaries depending on the target architecture. The software author doesn't necessarily have the resources to cross-compile for your system.

Incidentally, this is probably exactly the thing that has made most of those Python installations problematic for you. Because when everything is available as a pre-built wheel, very much less can go wrong. But commonly, Python packages depend on included C code for performance reasons. (Pre-built results are still possible that Just Work for most people. For example, very few people nowadays will be unable to install Numpy from a wheel, even though it depends on C and Fortran.)

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

#977

I have to say that I am extremely reluctant to switch over to yet another python management system (packaging, environment, python version). Every few years someone says: this is it. Switch to poetry! Okay, I did. And, at least for some academic packages, psychopy I'm looking at you, it was a friggin disaster. so. will uv install psychopy (say version 3.2.4)?

> psychopy (say version 3.2.4)?

You do understand that psychopy switched to calver immediately after that version, and that this was over five years ago? That when that package was released, the oldest currently officially supported version of Python had barely started development? And that it's packaged according to legacy standards that weren't even following the best practices for 2019 (it offers only a source distribution despite only having Python code itself)?

That said, it looks like current versions would be able to install (on Mac, only up to Python 3.11, because that's what's supported) even with pip.

I have yet to be shown a package that uv can cleanly install into a new environment but pip cannot.

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

#978

I have to say that I am extremely reluctant to switch over to yet another python management system (packaging, environment, python version). Every few years someone says: this is it. Switch to poetry! Okay, I did. And, at least for some academic packages, psychopy I'm looking at you, it was a friggin disaster. so. will uv install psychopy (say version 3.2.4)?

Hey, I'm still trying get over the fact that `pip search` is deprecated. A package manager command line tool that can't even search for packages.

This actually has nothing to do with pip. PyPI doesn't support the endpoint. It would work on a private index that does support the endpoint. But PyPI had to disable it due to persistent abuse.

https://stackoverflow.com/questions/66375972

https://status.python.org/incidents/grk0k7sz6zkp

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

#979

I’m surprised not to see a discussion of the biggest drawback: despite being fewer characters, “uv” is harder to type than “pip”. It requires two different hands to participate and a longer reach with my left index finger. pip is convenient – just a little rattle off with my right hand.

> “uv” is harder to type than “pip”. It requires two different hands to participate and a longer reach with my left index finger.

I'm not convinced. "pip" uses one's weaker ring finger; "v" is adjacent to "f"; and alternating hands should be easier for a touch typist.

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

#980

[project] name = "my_project" version = "1.0.0" requires-python = ">=3.9, =5.0.0", "pandas>=1.0.0, looks like a POM file

This is an ecosystem-wide standard (the [project] table in pyproject.toml) and has nothing to do with uv specifically.
Post reply on HN