Skip to content

[FR] Warn when invalid table [tools.setuptools] is present in pyproject.toml #4150

@SnoopJ

Description

@SnoopJ

What's the problem this feature will solve?

It is pretty easy to incorrectly spell the name of the table where setuptools metadata is declared, i.e. writing:

[tools.setuptools]

instead of:

[tool.setuptools]

And when setuptools metadata is not recognized because of this, it can be a slightly mysterious failure, even for experts, because the errant section is silently ignored.

Describe the solution you'd like

It would be nice if setuptools issued a warning when the invalid [tools.setuptools] table is present in a project's metadata, to provide a hint for users that their metadata has a typo.

Alternative Solutions

No response

Additional context

This has cropped up in #3803, and #3683 also includes an incidental example of this spelling error. I can also say that I have made this mistake multiple times. It feels like the kind of issue you only know to avoid when you've stubbed your toe on it a few times.

Code of Conduct

  • I agree to follow the PSF Code of Conduct

Metadata

Metadata

Assignees

No one assigned

    Labels

    Needs TriageIssues that need to be evaluated for severity and status.enhancement

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions