You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When mapping dependencies to define sources, because of the TOML specification, uv will raise an error if defining the same source twice. For instance with this pyproject.toml:
$ uv lockwarning: Failed to parse `pyproject.toml` during settings discovery: TOML parse error at line 8, column 1 | 8 | python-multipart = { url = "https://files.pythonhosted.org/packages/c0/3e/9fbfd74e7f5b54f653f7ca99d44ceb56e718846920162165061c4c22b71a/python_multipart-0.0.8-py3-none-any.whl" } | ^ duplicate key `python-multipart` in table `tool.uv.sources`error: Failed to parse: `pyproject.toml` Caused by: TOML parse error at line 8, column 1 |8 | python-multipart = { url = "https://files.pythonhosted.org/packages/c0/3e/9fbfd74e7f5b54f653f7ca99d44ceb56e718846920162165061c4c22b71a/python_multipart-0.0.8-py3-none-any.whl" } | ^duplicate key `python-multipart` in table `tool.uv.sources`
(btw not sure we should have both a warning and error here)
But while uv applies normalisation for sources (similarly to dependencies), it will not error out if defining the same source twice with different casing that would result in the same name after normalisation:
Here, locking will work, and will end up choosing the latest source defined in the list (here in python_multipart, and if reversing the list, python-multipart is chosen instead).
Should uv also error out in this case, like it does when using the exact same casing?
The text was updated successfully, but these errors were encountered:
When mapping dependencies to define sources, because of the TOML specification, uv will raise an error if defining the same source twice. For instance with this
pyproject.toml
:the following error will be raised:
(btw not sure we should have both a warning and error here)
But while uv applies normalisation for sources (similarly to dependencies), it will not error out if defining the same source twice with different casing that would result in the same name after normalisation:
Here, locking will work, and will end up choosing the latest source defined in the list (here in
python_multipart
, and if reversing the list,python-multipart
is chosen instead).Should uv also error out in this case, like it does when using the exact same casing?
The text was updated successfully, but these errors were encountered: