I've decided I'm really not happy with the current approach to
extension fields in PEP 426. It's ugly, clunky, inflexible and is hard
to cleanly convert to more structured metadata.
Here's the current example from the PEP:
Here's what I'm thinking of changing it to:
So rather than allowing *arbitrary* additional headers as it does now,
an Extension declaration would allow only one new header:
That would then allow arbitrary embedded JSON (so long as you still
follow the "no blank lines, because that 's the end of the headers"
When converting the entire metadata definition to JSON for subsequent
processing, the extensions fields would then cleanly convert from
multiple extension entries to something like:
The other area where I think such an "embedded JSON" approach could
work is coming up with a clean format for an Entry-Points field.
Specifically, I am thinking of proposing the setuptools.setup
Nick Coghlan | ncoghlan(a)gmail.com | Brisbane, Australia