Skip to content

Add metadata validation #147

@bittner

Description

@bittner

I'm trying to help fix the issue of broken package descriptions on PyPI (e.g. pypa/setuptools#1390).

Following a suggestion of @di in pypa/setuptools#1390 (comment), I would do the following:

  1. Add a validation module to packaging that provides a class with a validate() method and an error list attribute (an interface that can be easily used in Web frameworks like Pyramid and Django).
  2. Use this module in setuptools.dist.write_pkg_file to validate all incoming data against their specification. Setuptools, specifically, would then abort with an InvalidMetadataError if the specs are not met (instead of continuing silently generating a broken PKG-INFO file, as today).

Does that sound like something that makes sense?

Should I proceed and open a PR for a validation module?

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions