[Distutils] pkginfo python 3 port
barry at python.org
Fri May 28 20:02:18 CEST 2010
On May 28, 2010, at 01:54 PM, Tres Seaver wrote:
>"More correct" is debateable: The email.parser module does not remove
>the newline, for instance, which is what RFC2822 suggests for
>"unfolding" header lines:
>Collapsing extra leading whitespace in header continuation lines seems
>like a reasonable strategy: lines created by "folding" per RFC (2)822
>won't normally have them, while those which do (e.g, as created by
>distutils, or perhaps by hand) do, but they aren't meaningful.
Right. Over in email-sig land we're talking about how to access both the raw
header (i.e. what you parsed) and the intended semantic header which would
be the unfolded value. No need to re-hash that here in distutils-sig.
>> and what specific problem does that cause? Or is it
>> just that it's different so tools have to catch up to that?
>In particular, pkginfo wants to run across a wide range of Python
>versions, with Python 2.4 still actively supported. I therefore need to
>fall back to the rfc822 module when the newer module is not present. I
>have chosen for the moment to enforce the collapsing where email.parser
Probably best to manually unfold the header value regardless of where you got
it from. The email package should (and hopefully someday will) make this
-------------- next part --------------
A non-text attachment was scrubbed...
Size: 836 bytes
Desc: not available
More information about the Distutils-SIG