[Email-SIG] email.header.decode_header eats my spaces
Barry Warsaw
barry at python.org
Tue Mar 27 04:58:12 CEST 2007
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
On Mar 26, 2007, at 7:39 PM, Jasper Spaans wrote:
> Today I was playing around with the decode_header function of the
> email.header module, and it is eating my spaces.
> Some people have filed bugs about this [1] [2] and have proposed the
> following patch, which to me seems to be obviously correct:
>
> Is there any reason for this not to be incorporated into the package?
Have you run the test suite with this change?
I've been working on a branch since Pycon, which tries to fix this
and pass all the unit tests. ISTR that this patch causes several
tests to fail. However, resolving the tests was like pulling a
thread from a sweater. It now leads me to think that we really
aren't true to RFC 2822 wrt folding whitespace. However, I haven't
been able to fix that without breaking some current assumptions in
the email package. I've been trying to get my branch to a point
where it passes all the tests before I posted a message here, but I
haven't had a chance to finish it yet.
I'll try to get to that and follow up here in a day or so.
- -Barry
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.5 (Darwin)
iQCVAwUBRgiIRXEjvBPtnXfVAQLWeQP/XbjReQ6fODoRTnkBe2DDGl6IUQLPpcSg
WHrzh39X9oi4VDnGCECUPYHaM8mIBHTlYD4eVeMKAHnh0Wyo+Gq5TUEOu/44YCgp
1aJugVzrVMuUmgBR8IjKG4oumnSuuvHLLI0q5j6NlEKPk33vNwcd4gES791I0XFc
XOC+fS+XL5I=
=5dPZ
-----END PGP SIGNATURE-----
More information about the Email-SIG
mailing list