Skip to content

Context formatting of project.dependencies is not standard compliant? #1331

@sbidoul

Description

@sbidoul

It seems that hatchling supports context formatting in project.dependencies or project.optional_dependencies, so resulting metadata in the built artifacts differs from what is specified in pyproject.toml.

However, the pyproject.toml spec says: A build back-end MUST honour statically-specified metadata (which means the metadata did not list the key in dynamic)..

So it seems that hatchling is deviating from the spec in this respect?

This is potentially problematic as some tools may rely on metadata in pyproject.toml being static as an optimization to bypass a potentially costly PEP 517 metadata preparation step. For instance this kind optimization is considered for implementation of pip install --only-deps.

What do you think?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions