-
-
Notifications
You must be signed in to change notification settings - Fork 93
Closed
Description
While investigating the details of Python packaging metadata for a Setuptools issue, I learned that PEP 566 allows the Description to be indicated as a field or as the payload of the metadata and in fact the latter approach is what is seen in dist-info metadata as produced by today's tools.
That means that the PackageMetadata Protocol does not expose that information. For example:
draft $ pip-run -q setuptools
>>> import importlib.metadata
>>> dist = importlib.metadata.distribution('setuptools')
>>> dist.metadata['Description'] or 'missing'
'missing'
But the content is there:
>>> dist.metadata.get_payload()[:10]
'.. image::'
Probably importlib.metadata could copy that payload into the Description field, but it probably needs to first encode the content according to this spec (yuck).
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels