[New-bugs-announce] [issue43926] Clean metadata (importlib_metadata 4.0)
Jason R. Coombs
report at bugs.python.org
Fri Apr 23 16:45:44 EDT 2021
New submission from Jason R. Coombs <jaraco at jaraco.com>:
[importlib_metadata 4.0](https://importlib-metadata.readthedocs.io/en/latest/history.html#v4-0-0) introduced these important changes to the `metadata` function:
``PackageMetadata`` as returned by ``metadata()``
and ``Distribution.metadata()`` now provides normalized
metadata honoring PEP 566:
- If a long description is provided in the payload of the
RFC 822 value, it can be retrieved as the ``Description``
field.
- Any multi-line values in the metadata will be returned as
such.
- For any multi-line values, line continuation characters
are removed. This backward-incompatible change means
that any projects relying on the RFC 822 line continuation
characters being present must be tolerant to them having
been removed.
- Add a ``json`` property that provides the metadata
converted to a JSON-compatible form per PEP 566.
These changes would be a nice addition to Python 3.10.
----------
assignee: jaraco
components: Library (Lib)
messages: 391733
nosy: jaraco
priority: normal
severity: normal
status: open
title: Clean metadata (importlib_metadata 4.0)
type: enhancement
versions: Python 3.10
_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue43926>
_______________________________________
More information about the New-bugs-announce
mailing list