[Email-SIG] set_payload() -- SF bug # 1409455 (original) (raw)

Barry Warsaw barry at python.org
Mon Feb 6 04:53:49 CET 2006


Mark Sapiro submitted SF bug #1409455 against email 2.5.

https://sourceforge.net/tracker/index.php?func=detail&aid=1409455&group_id=5470&atid=105470

Mark attached an example program and a candidate patch. I've uploaded an alternative patch which encodes the payload immediately during the Message.set_payload() call when a charset is given. The patch also changes Generator.py to not doubly encode the payload.

This change passes Mark's example, and passes all the existing unit tests except one. But I think that test is actually wrong so the patch fixes that too (and adds a test for .get_payload(decode=True)).

Before I commit this I'd like to get some feedback. I haven't looked closely but I suspect that email 3.0 should similarly change.

-Barry

-------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 307 bytes Desc: This is a digitally signed message part Url : http://mail.python.org/pipermail/email-sig/attachments/20060205/a2d3fe00/attachment.pgp



More information about the Email-SIG mailing list