Skip to content

JSON schema requires version in tool.uv.dependency-metadata #9443

@zeevro

Description

@zeevro
$ uvx --from validate-pyproject[all,store] validate-pyproject pyproject.toml -vv
[INFO] validate_pyproject_schema_store.schema.get_schema defines `tool.black` schema
[INFO] validate_pyproject_schema_store.schema.get_schema defines `tool.cibuildwheel` schema
[INFO] validate_pyproject.api.load_builtin_plugin defines `tool.distutils` schema
[INFO] validate_pyproject_schema_store.schema.get_schema defines `tool.hatch` schema
[INFO] validate_pyproject_schema_store.schema.get_schema defines `tool.mypy` schema
[INFO] validate_pyproject_schema_store.schema.get_schema defines `tool.pdm` schema
[INFO] validate_pyproject_schema_store.schema.get_schema defines `tool.poetry` schema
[INFO] validate_pyproject_schema_store.schema.get_schema defines `tool.pyright` schema
[INFO] validate_pyproject_schema_store.schema.get_schema defines `tool.ruff` schema
[INFO] validate_pyproject_schema_store.schema.get_schema defines `tool.scikit-build` schema
[INFO] validate_pyproject.api.load_builtin_plugin defines `tool.setuptools` schema
[INFO] validate_pyproject_schema_store.schema.get_schema defines `tool.setuptools_scm` schema
[INFO] validate_pyproject_schema_store.schema.get_schema defines `tool.uv` schema
Invalid file: pyproject.toml
[ERROR] `tool.uv.dependency-metadata[1]` must contain ['version'] properties

DESCRIPTION:
    A subset of the Python Package Metadata 2.3 standard as specified in
    <https://packaging.python.org/specifications/core-metadata/>.

GIVEN VALUE:
    {
        "name": "dkimpy",
        "requires-dist": [
            "dnspython>=2.0.0"
        ]
    }

OFFENDING RULE: 'required'

DEFINITION:
    {
        "type": "object",
        "required": [
            "name",
            "version"
        ],
        "properties": {
            "name": {
                "description": "The normalized name of a package.\n\nConverts the name to lowercase and collapses runs of `-`, `_`, and `.` down to a single `-`. For example, `---`, `.`, and `__` are all converted to a single `-`.\n\nSee: <https://packaging.python.org/en/latest/specifications/name-normalization/>",
                "type": "string"
            },
            "provides-extras": {
                "default": [],
                "type": "array",
                "items": {
                    "description": "The normalized name of an extra dependency.\n\nConverts the name to lowercase and collapses runs of `-`, `_`, and `.` down to a single `-`. For example, `---`, `.`, and `__` are all converted to a single `-`.\n\nSee: - <https://peps.python.org/pep-0685/#specification/> - <https://packaging.python.org/en/latest/specifications/name-normalization/>",
                    "type": "string"
                }
            },
            "requires-dist": {
                "default": [],
                "type": "array",
                "items": {
                    "description": "A PEP 508 dependency specifier, e.g., `ruff >= 0.6.0`",
                    "type": "string"
                }
            },
            "requires-python": {
                "description": "PEP 508-style Python requirement, e.g., `>=3.10`",
                "type": [
                    "string",
                    "null"
                ]
            },
            "version": {
                "description": "PEP 440-style package version, e.g., `1.2.3`",
                "type": "string"
            }
        }
    }

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions