<#23442 uv resolver attempts to use [sources] in u...
# github-notifications
q
#23442 uv resolver attempts to use [sources] in uv.toml Issue created by tmarback Describe the bug When using the experimental
uv
lockfile capability (
resolver = "uv"
), if there is an index defined for specific dependencies using
resolves_to_sources
, the current implementation (added in #23322) is to add a
[sources]
block to the generated
uv.toml
file; however, this is not allowed by uv, which only accepts that configuration in `pyproject.toml`, and causes the resolver to throw an error:
Copy code
Engine traceback:
  in `generate-lockfiles` goal

ProcessExecutionFailure: Process 'Generate uv lockfile for python-default' failed with exit code 2.
stdout:

stderr:
error: Failed to parse: `uv.toml`. The `sources` field is not allowed in a `uv.toml` file. `sources` is only applicable in the context of a project, and should be placed in a `pyproject.toml` file instead.
Pants version 2.32.0 OS Both Additional info Add any other information about the problem here, such as attachments or links to gists, if relevant. pantsbuild/pants