mirror of
https://github.com/python/cpython.git
synced 2025-09-26 10:19:53 +00:00
bpo-43926: Cleaner metadata with PEP 566 JSON support. (GH-25565)
* bpo-43926: Cleaner metadata with PEP 566 JSON support. * Add blurb * Add versionchanged and versionadded declarations for changes to metadata. * Use descriptor for PEP 566
This commit is contained in:
parent
0ad1e0384c
commit
37e0c7850d
12 changed files with 254 additions and 26 deletions
|
@ -170,6 +170,19 @@ the values are returned unparsed from the distribution metadata::
|
|||
>>> wheel_metadata['Requires-Python'] # doctest: +SKIP
|
||||
'>=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*'
|
||||
|
||||
``PackageMetadata`` also presents a ``json`` attribute that returns
|
||||
all the metadata in a JSON-compatible form per :PEP:`566`::
|
||||
|
||||
>>> wheel_metadata.json['requires_python']
|
||||
'>=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*'
|
||||
|
||||
.. versionchanged:: 3.10
|
||||
The ``Description`` is now included in the metadata when presented
|
||||
through the payload. Line continuation characters have been removed.
|
||||
|
||||
.. versionadded:: 3.10
|
||||
The ``json`` attribute was added.
|
||||
|
||||
|
||||
.. _version:
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue