[Python-Dev] Edits to Metadata 1.2 to add extras (optional ependencies)

Daniel Holth dholth at gmail.com
Fri Aug 31 19:12:29 CEST 2012


On Fri, Aug 31, 2012 at 12:53 PM, R. David Murray <rdmurray at bitdance.com> wrote:
> On Fri, 31 Aug 2012 12:18:05 -0400, Daniel Holth <dholth at gmail.com> wrote:
>> Some edits to include / and remove rfc822 again. What is the right
>> email.policy.Policy()?
>
> When I discussed using email to parse metadata with Tarek a long time
> ago, I thought he was going to move to using a delimiter-substitution
> algorithm to encode and recover the line breaks.  Perhaps that discussion
> wasn't in this same context, but I thought it was.  If you did that,
> then 'SMTP' would be the correct policy for RFC2822/5322.
>
> But that isn't really going to work for this use case, even with the above
> hack.  As Martin pointed out, RFC2822 does not allow utf-8 in the values.

Thanks. For the time being I am happily using the
surrogateescape/bytesgenerator hack and it preserves UTF-8 and
linebreaks. I don't have a strong opinion about the line continuation
policy; I do not have code that relies on parsing the long description
from PKG-INFO files.


More information about the Python-Dev mailing list