PEP 426: extensions are 0..1
This commit is contained in:
parent
6e6ede120a
commit
405a5ad476
16
pep-0426.txt
16
pep-0426.txt
|
@ -2,7 +2,7 @@ PEP: 426
|
|||
Title: Metadata for Python Software Packages 2.0
|
||||
Version: $Revision$
|
||||
Last-Modified: $Date$
|
||||
Author: Daniel Holth <dholth@fastmail.fm>,
|
||||
Author: Daniel Holth <dholth@gmail.com>,
|
||||
Donald Stufft <donald@stufft.io>,
|
||||
Nick Coghlan <ncoghlan@gmail.com>
|
||||
BDFL-Delegate: Nick Coghlan <ncoghlan@gmail.com>
|
||||
|
@ -527,13 +527,22 @@ Extension (multiple use)
|
|||
An ASCII string, not containing whitespace or the ``/`` character, that
|
||||
indicates the presence of extended metadata. The additional fields
|
||||
defined by the extension are then prefixed with the name of the extension
|
||||
and the ``/`` character.
|
||||
and the ``/`` character. The additional fields are optional (0..1).
|
||||
|
||||
For example::
|
||||
|
||||
Extension: Chili
|
||||
Chili/Type: Poblano
|
||||
Chili/Heat: Mild
|
||||
Chili/json: {
|
||||
"type" : "Poblano",
|
||||
"heat" : "Mild" }
|
||||
|
||||
The special ``{extension name}/json`` permits embedded JSON. It may be
|
||||
parsed automatically by a future tool.
|
||||
|
||||
Values in extension fields must still respect the general formatting
|
||||
requirements for metadata headers.
|
||||
|
||||
To avoid name conflicts, it is recommended that distribution names be used
|
||||
to identify metadata extensions. This practice will also make it easier to
|
||||
|
@ -543,9 +552,6 @@ As the order of the metadata headers is not constrained, the
|
|||
``Extension: Chili`` field may appear before or after the corresponding
|
||||
extension fields ``Chili/Type:`` etc.
|
||||
|
||||
Values in extension fields must still respect the general formatting
|
||||
requirements for metadata headers.
|
||||
|
||||
A bare ``Extension: Name`` entry with no corresponding extension fields is
|
||||
permitted. It may, for example, indicate the expected presence of an
|
||||
additional metadata file rather than the presence of extension fields.
|
||||
|
|
Loading…
Reference in New Issue