[issue11243] email/message.py str conversion

2011-03-16 Thread Steffen Daode Nurpmeso
Steffen Daode Nurpmeso sdao...@googlemail.com added the comment: On Tue, Mar 15, 2011 at 04:21:24AM +, R. David Murray wrote: Please test and let me know if it works Spending some more time on that, continuing yesterdays session where i got stuck. When i instead do (still in

[issue11243] email/message.py str conversion

2011-03-16 Thread R. David Murray
R. David Murray rdmur...@bitdance.com added the comment: Steffen, these look like different kinds of errors than the one you reported in this ticket. If they are, could you open a new issue? Either way, simple reproducers would be the most helpful. --

[issue11243] email/message.py str conversion

2011-03-16 Thread Steffen Daode Nurpmeso
Steffen Daode Nurpmeso sdao...@googlemail.com added the comment: On Wed, Mar 16, 2011 at 01:58:40PM +, R. David Murray wrote: Steffen, these look like different kinds of errors than the one you reported in this ticket. If they are, could you open a new issue? Either way, simple

[issue11243] email/message.py str conversion

2011-03-16 Thread Steffen Daode Nurpmeso
Steffen Daode Nurpmeso sdao...@googlemail.com added the comment: Sorry, i've forgot the test ;) -- Added file: http://bugs.python.org/file21241/11243-test.1.py ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue11243

[issue11243] email/message.py str conversion

2011-03-16 Thread Steffen Daode Nurpmeso
Steffen Daode Nurpmeso sdao...@googlemail.com added the comment: David, it's so hard to tell! If you want a big fat thing that misuses your code, try out my S-Postman (it's on Bitbucket and no URL from me and you need tip). And i could post you a small config and the EMAIL breaking patch for

[issue11243] email/message.py str conversion

2011-03-16 Thread R. David Murray
R. David Murray rdmur...@bitdance.com added the comment: Steffen, what you are doing in 11243-test is not something that the current email package supports. String input to message_as_string must be ASCII only in email 5.1/python3.2. Likewise for decode_header. To get unicode in to a

[issue11243] email/message.py str conversion

2011-03-16 Thread Roundup Robot
Roundup Robot devnull@devnull added the comment: New changeset 74a8c46fb272 by R David Murray in branch '3.2': #11243: tests and fixes for handling of 'dirty data' in additional methods http://hg.python.org/cpython/rev/74a8c46fb272 New changeset 82ecfcd31250 by R David Murray in branch

[issue11243] email/message.py str conversion

2011-03-16 Thread R. David Murray
R. David Murray rdmur...@bitdance.com added the comment: I'm closing this issue. If you have a specific test case that is still failing, please open a new issue. And thanks for testing this fix. -- resolution: - fixed stage: patch review - committed/rejected status: open - closed

[issue11243] email/message.py str conversion

2011-03-15 Thread Steffen Daode Nurpmeso
Steffen Daode Nurpmeso sdao...@googlemail.com added the comment: On Tue, Mar 15, 2011 at 04:21:24AM +, R. David Murray wrote: Please test and let me know if it works; it should, since the code patch is very close to the one you suggested. ;-) Hello David, hope you have a good time at

[issue11243] email/message.py str conversion

2011-03-14 Thread R. David Murray
R. David Murray rdmur...@bitdance.com added the comment: Here is a patch that adds tests for the methods I didn't previous have test for. There may still be some headers that I'm not testing for the 'contains binary' case, but this is certainly more comprehensive than we had before. Please

[issue11243] email/message.py str conversion

2011-02-22 Thread Steffen Daode Nurpmeso
Steffen Daode Nurpmeso sdao...@googlemail.com added the comment: (Of course you're right. It just reads, passes around and spits out that ... of a mail just the same it came in. Performance is very well, too, just about 1.5 seconds - some two weeks ago it took about 1.1 seconds, but with

[issue11243] email/message.py str conversion

2011-02-22 Thread R. David Murray
R. David Murray rdmur...@bitdance.com added the comment: We might wind up with a relatively quick 3.2.1, in which case we can get this fixed then. The parser is supposed to operate without throwing exceptions (just setting defects), so if you find a case where *parsing* throws an exception

[issue11243] email/message.py str conversion

2011-02-21 Thread R. David Murray
Changes by R. David Murray rdmur...@bitdance.com: -- priority: normal - high ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue11243 ___ ___

[issue11243] email/message.py str conversion

2011-02-19 Thread Steffen Daode Nurpmeso
Steffen Daode Nurpmeso sdao...@googlemail.com added the comment: I also got this now, it happens with and without the str() patch stuff. (Note that message.py line numbers are off by 1-2 lines ..). I don't know more about that in the moment, but the only thing that's changed is that i do:

[issue11243] email/message.py str conversion

2011-02-19 Thread Steffen Daode Nurpmeso
Steffen Daode Nurpmeso sdao...@googlemail.com added the comment: The latter one was my fault, i did LIST.append(name, HEADER.append(xy)), assuming that HEADER.append() returns self though it doesn't. Sorry. However - shouldn't Message.__setitem__ check for valid arguments (see msg128846 code

[issue11243] email/message.py str conversion

2011-02-19 Thread Steffen Daode Nurpmeso
Steffen Daode Nurpmeso sdao...@googlemail.com added the comment: However, maybe that 5.1 message.py thing doesn't like header.Header instances. Also extending msg128846, this one is related to the str() issue - added an extended email_message.2.patch. Traceback (most recent call last):

[issue11243] email/message.py str conversion

2011-02-19 Thread Steffen Daode Nurpmeso
Changes by Steffen Daode Nurpmeso sdao...@googlemail.com: Removed file: http://bugs.python.org/file20784/email_message.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue11243 ___

[issue11243] email/message.py str conversion

2011-02-19 Thread Steffen Daode Nurpmeso
Steffen Daode Nurpmeso sdao...@googlemail.com added the comment: David, i'm going down now. I'll raise the type to 'crash', because, in fact, EMail 5.1 doesn't really take care of header.Header objects in message.Message headers, which doesn't sound pretty useful to me! The patch is

[issue11243] email/message.py str conversion

2011-02-19 Thread Steffen Daode Nurpmeso
Steffen Daode Nurpmeso sdao...@googlemail.com added the comment: ... as a last though of mine, here is a header of the well known spam mail: From MAILER-DAEMON Sat Feb 19 15:58:47 2011 Date: =?latin1?q?Tue=2C_4_Jan_2011_17=3A37=3A26_+0100_=28CET=29?= From:

[issue11243] email/message.py str conversion

2011-02-19 Thread R. David Murray
R. David Murray rdmur...@bitdance.com added the comment: Well, it's not a crash, a crash is when the interpreter segfaults. I'm not clear on why you are having problems, actually, since if you treat the messages as binary (which they are), then you shouldn't be getting Headers introduced into

[issue11243] email/message.py str conversion

2011-02-19 Thread R. David Murray
R. David Murray rdmur...@bitdance.com added the comment: Ah, I think I see what is going on. If I'm right, then you are right, this is a serious problem for actually processing spam emails using email 5.1. Unfortunately it's too late to do anything for 3.2.0. But email 5.1 is still worlds

[issue11243] email/message.py str conversion [patch]

2011-02-18 Thread Steffen Daode Nurpmeso
New submission from Steffen Daode Nurpmeso sdao...@googlemail.com: Hy David, while hacking a bit on my thing i've found two places where header.Header needs to be explicitely converted via str(). Have a nice weekend. -- files: email_message.patch keywords: patch messages: 128782 nosy:

[issue11243] email/message.py str conversion [patch]

2011-02-18 Thread Steffen Daode Nurpmeso
Steffen Daode Nurpmeso sdao...@googlemail.com added the comment: (Will get that tracker right as time goes by.) -- type: - behavior versions: +Python 3.2 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue11243

[issue11243] email/message.py str conversion

2011-02-18 Thread R. David Murray
R. David Murray rdmur...@bitdance.com added the comment: Thanks for the report. I probably won't have time to look at this for a bit. -- assignee: - r.david.murray stage: - patch review title: email/message.py str conversion [patch] - email/message.py str conversion versions:

[issue11243] email/message.py str conversion

2011-02-18 Thread Steffen Daode Nurpmeso
Steffen Daode Nurpmeso sdao...@googlemail.com added the comment: We all know EMail 6.0 will blow them off the streets in the end. -- components: +Library (Lib) ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue11243

[issue11243] email/message.py str conversion

2011-02-18 Thread Steffen Daode Nurpmeso
Steffen Daode Nurpmeso sdao...@googlemail.com added the comment: P.S.: maybe this completes the byte. Have a nice weekend nevertheless - if you can. Traceback (most recent call last): File /Users/steffen/usr/bin/s-postman.py, line 1419, in _walk