Hi, first uv is a really great tool, thanks!
I'm using version 0.5.18 and I found two issues with this pyproject.toml:
[project]
name = "dummy-name"
requires-python = ">=3.12, <3.13"
-
uv venv returns no explanation why as to why it could not parse the pyproject.toml (same with verbose mode):
$ uv venv
warning: Failed to parse: `pyproject.toml`
Using CPython 3.13.1
Creating virtual environment at: .venv
Activate with: source .venv/Scripts/activate
And in this case the wrong version of python is selected.
By luck I found the root cause with another command:
$ uv tree
error: Failed to parse: `pyproject.toml`
Caused by: TOML parse error at line 1, column 1
|
1 | [project]
| ^^^^^^^^^^
`pyproject.toml` is using the `[project]` table, but the required `project.version` field is neither set nor present in the `project.dynamic` list
Is it possible to improve the warning message with the root cause or change the warning to an error like in uv tree ?
-
Why a project version is mandatory to be able to parse the pyproject.toml ?
In this case I don't expect to publish the project, so the version is meaningless
Thanks in advance