←back to thread

Fun with uv and PEP 723

(www.cottongeeks.com)
619 points deepakjois | 1 comments | | HN request time: 0.359s | 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 #
1. oconnor663 ◴[] No.44371165[source]
> it's defined in both .python-version and pyproject.toml

The `requires-version` field in `pyproject.toml` defines a range of compatible versions, while `.python-version` defines the specific version you want to use for development. If you create a new project with uv init, they'll look similar (>=3.13 and 3.13 today), but over time `requires-version` usually lags behind `.python-version` and defines the minimum supported Python version for the project. `requires-version` also winds up in your package metadata and can affect your callers' dependency resolution, for example if your published v1 supports Python 3.[old] but your v2 does not.