[Python-bugs-list] [ python-Bugs-626119 ] email incompatibility upgrading to 2.2.2

SourceForge.net noreply@sourceforge.net
Thu, 06 Mar 2003 11:15:13 -0800


Bugs item #626119, was opened at 2002-10-20 19:02
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=105470&aid=626119&group_id=5470

Category: Python Library
Group: Python 2.2.2
>Status: Closed
>Resolution: Wont Fix
Priority: 6
Submitted By: Kevin M. Turner (acapnotic)
Assigned to: Barry A. Warsaw (bwarsaw)
Summary: email incompatibility upgrading to 2.2.2

Initial Comment:
This code broke when I upgraded python from 2.2.1 to
2.2.2.  Suddenly, my e-mail is base64 encoded, with no
indication of this in the message header, so the
message body shows up as garbage in my inbox.
http://twistedmatrix.com/users/acapnotic/wares/code/E2Email/e2email-1.7.py

I do get a warning:
/home/kevint/bin/e2email:188: DeprecationWarning:
_encoder argument is obsolete.
but it just issues the warning in passing and doesn't
stop it from eating my message.


----------------------------------------------------------------------

>Comment By: Barry A. Warsaw (bwarsaw)
Date: 2003-03-06 14:15

Message:
Logged In: YES 
user_id=12800

Looking at this again, note that the encoder has nothing to
do with it.  If you remove it you still get base64 encoded
body, which /is/ reflected in the Content-Transfer-Encoding
header.

The base64 conversion is due to your use of the utf-8
character set for the body of the message.  The utf-8
charset is defined as converting body text to base64.  One
approach to changing this may be to extend the SHORTEST
notion to body encodings.

I'm not inclined to change this, but if you want to discuss
the matter, please bring it up on
mimelib-devel@lists.python.org.

----------------------------------------------------------------------

Comment By: Kevin M. Turner (acapnotic)
Date: 2002-10-26 06:11

Message:
Logged In: YES 
user_id=9300

Ok, here's your smaller version.  In Python 2.2.2, this
makes a message with a base64 encoded body which is not
automagically decoded by my email client.  In Python 2.2.1,
the body is cleartext. 

#!/usr/bin/env python2.2
from email.MIMEText import MIMEText
from email import Encoders

print MIMEText("e-mail message body", 'html', "utf-8",
Encoders.encode_7or8bit)


----------------------------------------------------------------------

Comment By: Kevin M. Turner (acapnotic)
Date: 2002-10-21 04:53

Message:
Logged In: YES 
user_id=9300

I can't debug as much as I'd like, as I don't have parallel
installations of 2.2.1 and 2.2.2, but I'll see if I can at
least trim that down for you by throwing out all the
non-email-package related bits.

----------------------------------------------------------------------

Comment By: Barry A. Warsaw (bwarsaw)
Date: 2002-10-21 01:50

Message:
Logged In: YES 
user_id=12800

I have not idea what the url has to do with it either, but I
was hoping it would be a simple example of "this code [that]
broke when [he] upgraded python from 2.2.1 to 2.2.2".  It
doesn't appear to be, or at least it doesn't appear to be a
simple boiled down example, and I'm too tired right now to
slog through all this code.

Kevin, can you please upload a simple, reproducible script
illustrating the breakage?  I'll look at it tomorrow, unless
Insomniac Timbot beats me to it.

----------------------------------------------------------------------

Comment By: Tim Peters (tim_one)
Date: 2002-10-21 01:31

Message:
Logged In: YES 
user_id=31435

I don't know what the URL has to do with this, but since I'm 
running on a modern OS I was able to get it for you 
<wink>.  See attachment.

----------------------------------------------------------------------

Comment By: Barry A. Warsaw (bwarsaw)
Date: 2002-10-21 01:12

Message:
Logged In: YES 
user_id=12800

Is that url meant to point to the example code that
illustrates the problem?  If so, could you please upload it
to this bug report instead.  I'm not able to grab the file
with wget.

----------------------------------------------------------------------

Comment By: Neal Norwitz (nnorwitz)
Date: 2002-10-20 19:28

Message:
Logged In: YES 
user_id=33168

Barry, I raised priority.  This sounds like it could be
important.

----------------------------------------------------------------------

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=105470&aid=626119&group_id=5470