←back to thread

Fun with uv and PEP 723

(www.cottongeeks.com)
618 points deepakjois | 1 comments | | HN request time: 0s | source
Show context
sambaumann ◴[] No.44370652[source]
Between yesterday's thread and this thread I decided to finally give uv a shot today - I'm impressed, both by the speed and how easy it is to manage dependencies for a project.

I think their docs could use a little bit of work, especially there should be a defined path to switch from a requirements.txt based workflow to uv. Also I felt like it's a little confusing how to define a python version for a specific project (it's defined in both .python-version and pyproject.toml)

replies(7): >>44370700 #>>44370742 #>>44370798 #>>44371165 #>>44371397 #>>44372341 #>>44375306 #
0cf8612b2e1e ◴[] No.44370700[source]
I have never researched this, but I thought the .python-version file only exists to benefit other tools which may not have a full TOML parser.
replies(1): >>44371416 #
zahlman ◴[] No.44371416[source]
Read-only TOML support is in the standard library since Python 3.11, though. And it's based on an easily obtained third-party package (https://pypi.org/project/tomli/).

(If you want to write TOML, or do other advanced things such as preserving comments and exact structure from the original file, you'll want tomlkit instead. Note that it's much less performant.)

replies(1): >>44371489 #
1. ◴[] No.44371489{3}[source]