From b280f47364042e5aed75456509b7db13f419b0e9 Mon Sep 17 00:00:00 2001 From: Nick Coghlan Date: Sun, 9 Sep 2012 01:53:56 +1000 Subject: [PATCH] Update to latest metadata 1.3 draft --- pep-0426.txt | 27 +++++++++++++++------------ 1 file changed, 15 insertions(+), 12 deletions(-) diff --git a/pep-0426.txt b/pep-0426.txt index c7da991f2..a6e62fd0c 100644 --- a/pep-0426.txt +++ b/pep-0426.txt @@ -31,9 +31,10 @@ variable to the `environment markers` specification. Metadata Files ============== -The syntax defined in this PEP is for use with Python distribution metadata -files. This file format is a single set of RFC-822 headers parseable by -the ``rfc822`` or ``email`` modules. The field names listed in the +The syntax defined in this PEP is for use with Python distribution +metadata files. The file format is a simple UTF-8 encoded Key: value +format with no line length parsable by the ``email`` module with an +appropriate ``email.policy.Policy()``. The field names listed in the `Fields`_ section are used as the header names. There are two standard locations for these metadata files: @@ -51,8 +52,9 @@ binary distribution archive format). Encoding ======== -Keys must be ASCII. Values are expected to be displayed as UTF-8, -but should otherwise be treated as opaque bytes. +Metadata 1.3 files are UTF-8, with the restriction that keys must be +ASCII. Parsers should be aware that older versions of the Metadata +specification do not specify an encoding. Fields ====== @@ -435,9 +437,10 @@ The label is a free text limited to 32 signs. Provides-Extra (multiple use) ::::::::::::::::::::::::::::: -A string containing the name of an optional feature. Must be a valid Python -identifier. May be used to make a dependency conditional on whether the -optional feature has been requested. +A string containing the name of an optional feature. Must be printable +ASCII, not containing whitespace, comma (,), or square brackets []. +May be used to make a dependency conditional on whether the optional +feature has been requested. Example:: @@ -475,13 +478,13 @@ not been declared with `Provides-Extra`. Extension (multiple-use) :::::::::::::::::::::::: -An ASCII string, not containing whitespace or the - character, that +An ASCII string, not containing whitespace or the / character, that indicates the presence of extended metadata. Additional tags defined by -the extension should be of the form string-Name:: +the extension should be of the form string/Name:: Extension: Chili - Chili-Type: Poblano - Chili-Heat: Mild + Chili/Type: Poblano + Chili/Heat: Mild Version Specifiers