←back to thread

Fun with uv and PEP 723

(www.cottongeeks.com)
618 points deepakjois | 2 comments | | HN request time: 0.957s | source
Show context
jkingsman ◴[] No.44369910[source]
uv has been fantastic to use for little side projects. Combining uv run with `uv tool run` AKA `uvx` means one can fetch, install within a VM, and execute Python scripts from Github super easily. No git clone, no venv creation + entry + pip install.

And uv is fast — I mean REALLY fast. Fast to the point of suspecting something went wrong and silently errored, when it fact it did just what I wanted but 10x faster than pip.

It (and especially its docs) are a little rough around the edges, but it's bold enough and good enough I'm willing to use it nonetheless.

replies(4): >>44370062 #>>44374562 #>>44375253 #>>44391468 #
lxgr ◴[] No.44370062[source]
Truly. uv somehow resolves and installs dependencies more quickly than pyenv manages to print its own --help output.
replies(2): >>44370440 #>>44371442 #
mikepurvis ◴[] No.44370440[source]
I know there are real reasons for slow Python startup time, with every new import having to examine swaths of filesystem paths to resolve itself, but it really is a noticeable breath of fresh air working with tools implemented in Go or Rust that have sub-ms startup.
replies(4): >>44370568 #>>44370762 #>>44370852 #>>44374512 #
1. lxgr ◴[] No.44370568[source]
The Python startup latency thing makes sense, but I really don't understand why it would take `pyenv` a long time to print each line of its "usage" output (the one that appears when invoking it with `--help`) once it's already clearly in the code branch that does only that.

It feels like like it's doing heavy work between each line printed! I don't know any other cli tool doing that either.

replies(1): >>44371450 #
2. heavyset_go ◴[] No.44371450[source]
There's a launcher wrapper shell script + Python startup time that contributes to pyenv's slow launch times.