Skip to content

uv-lock chokes on dynamic version metadata in pre-commit.ci #35

@neutrinoceros

Description

@neutrinoceros

Here's a self-contained MRE repo: https://github.com/neutrinoceros/uv-pre-commit-reprod
It contains a bare Python package with minimal metadata, and uses uv-lock from uv-pre-commit.
Seemingly, the important part is that project::version is declared as dynamic in pyproject.toml:

  × Failed to build `uv-pre-commit-reprod @ file:///code`
  ├─▶ Failed to resolve requirements from `build-system.requires`
  ├─▶ No solution found when resolving: `setuptools>=61.2`
  ├─▶ Failed to fetch: `https://pypi.org/simple/setuptools/`
  ├─▶ Could not connect, are you offline?
  ├─▶ Request failed after 3 retries
  ├─▶ error sending request for url (https://pypi.org/simple/setuptools/)
  ├─▶ client error (Connect)
  ├─▶ dns error: failed to lookup address information: Temporary failure in
  │   name resolution
  ╰─▶ failed to lookup address information: Temporary failure in name
      resolution

Meanwhile, locally, running uv lock directly or invoking pre-commit run --all-files gives the expected result.

I have no idea if this is an issue with uv, uv-pre-commit, or pre-commit.ci, so I thought I'd just report to the intermediate layer in that stack.
Possibly related to #25

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions