email: msg.add_payload not synonymous with msg.attach?

Magnus Lie Hetland mlh at vier.idi.ntnu.no
Sun Jun 9 18:57:20 EDT 2002


In article <slrnag5j96.17b.quinn at lira.ugcs.caltech.edu>, Quinn Dunkan wrote:
[snip]
>In 1.0 (comes with python 2.2.1), attach is defined as 'attach = add_payload'
>so it's synonymous.  It also doesn't have any mention of 'add_payload" being
>deprecated.  I hope it's not really, since I use it all the time.
>
>CVS is probably not at 1.0 anymore.

Probably not. There is a deprecation warning, and they behave
differently. Maybe it's a bug in the package -- maybe I'm using it
wrong.

[snip]
>What the error msg probably means is that your message somehow has multiple
>payloads, but doesn't have a multipart/* type.  Maybe they changed attach
>to always make _payload a list or something.

Arf... But I don't want a multipart message :|

>>(The code is very simple -- basically just instantiating Message and
>>adding a payload.)
>>
>>I'm using the email package from CVS (downloaded everything a day or
>>two ago).
>
>I wouldn't be surprised if the docs are not up to date with the
>latest CVS.

I'm sure they're not... But this sort of breakage is unfortunate
anyway...

> You should probably either use 1.0 or check the
>Message.py source.

I guess so.

--
Magnus Lie Hetland                                  The Anygui Project
http://hetland.org                                  http://anygui.org



More information about the Python-list mailing list