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:
- 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).
- 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?
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:
validationmodule to packaging that provides a class with avalidate()method and anerrorlist attribute (an interface that can be easily used in Web frameworks like Pyramid and Django).InvalidMetadataErrorif 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
validationmodule?