[issue11116] mailbox and email errors

2011-02-11 Thread Georg Brandl
Georg Brandl added the comment: Thanks! -- ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.

[issue11116] mailbox and email errors

2011-02-11 Thread R. David Murray
R. David Murray added the comment: Decided to backport the fix to 2.7, even though the tests won't backport. r88406. -- ___ Python tracker ___

[issue11116] mailbox and email errors

2011-02-11 Thread R. David Murray
R. David Murray added the comment: Committed in r88403. -- resolution: -> fixed stage: patch review -> committed/rejected status: open -> closed ___ Python tracker ___

[issue11116] mailbox and email errors

2011-02-11 Thread R. David Murray
R. David Murray added the comment: Woops. Thanks for catching that. Will fix before commit. -- ___ Python tracker ___ ___ Python-bu

[issue11116] mailbox and email errors

2011-02-11 Thread SilentGhost
SilentGhost added the comment: compileall.rst diff doesn't seem to belong in that patch. -- ___ Python tracker ___ ___ Python-bugs-li

[issue11116] mailbox and email errors

2011-02-11 Thread R. David Murray
R. David Murray added the comment: Revised patch using BaseException. -- Added file: http://bugs.python.org/file20746/mailbox_cleanup2.patch ___ Python tracker ___ _

[issue11116] mailbox and email errors

2011-02-11 Thread R. David Murray
R. David Murray added the comment: Duh. After writing all that you'd think I'd have seen my mistake. That's what reviews are for. So I guess it should be BaseException, since the most likely one is keyboard interrupt and this would prevent a corrupted mailbox in that case. -- ___

[issue11116] mailbox and email errors

2011-02-11 Thread R. David Murray
R. David Murray added the comment: The finally was doing a _sync_close, which flushes the tmp file and closes it. The except Exception is checking if any non-BaseException error occurs, *removing* the tmp file, and re-raising the exception. There's nothing to flush/close in that case. Then

[issue11116] mailbox and email errors

2011-02-10 Thread Georg Brandl
Georg Brandl added the comment: Hmm, is "except Exception" the right thing to use here? The "finally" before executed for really all exceptions. Otherwise, this can go in. -- ___ Python tracker

[issue11116] mailbox and email errors

2011-02-10 Thread R. David Murray
R. David Murray added the comment: Here is the promised patch, with tests. For once writing the patch was harder than writing the tests, but only just :) I'm not sure all the 100% sure the cleanups will work on all systems (I'm looking at you, Windows), but since any problems will occur in a

[issue11116] mailbox and email errors

2011-02-10 Thread R. David Murray
R. David Murray added the comment: Upon reflection I don't think my suggested email API change is a good one. Currently it is possible to create a Message using non-ASCII headers and manipulate that message. The fact that you can't serialize that message is, really, a bug: one can and I thin

[issue11116] mailbox and email errors

2011-02-07 Thread Georg Brandl
Georg Brandl added the comment: > The traceback from email.generator is unfortunate. I should have > message_from-string reject non-ASCII input with a clear error message > like mailbox.add does now, but I didn't think of it. I will see if > the release manager will let me make that change. S

[issue11116] mailbox and email errors

2011-02-06 Thread Steffen Daode Nurpmeso
Steffen Daode Nurpmeso added the comment: Thanks for spending your free time, almost alone in such a widespread area like this. -- ___ Python tracker ___ __

[issue11116] mailbox and email errors

2011-02-05 Thread R. David Murray
R. David Murray added the comment: Thanks, much easier to communicate when runnable code is involved :) Now I can see what you mean about it writing the From. I will figure out why and fix it so that the From line is not written. The traceback from email.generator is unfortunate. I should h

[issue11116] mailbox and email errors

2011-02-05 Thread Steffen Daode Nurpmeso
Steffen Daode Nurpmeso added the comment: Well, here is the long-asked-for 'fp_mailbox.py' test thing. Note: it generates a 'test.mbox' in CWD! print("USAGE: fp_mailbox.py 0|1|2", " 0 = use raw UTF-8 string", " 1 = use UTF-8 string", " 2 = use

[issue11116] mailbox and email errors

2011-02-04 Thread R. David Murray
R. David Murray added the comment: Again, can you provide example input data and a short program that demonstrates the problem? There's nothing I can reproduce in your report/question. As far as I noticed, the caught exceptions all occur at places where no output has yet been done to the m

[issue11116] mailbox and email errors

2011-02-04 Thread Steffen Daode Nurpmeso
Steffen Daode Nurpmeso added the comment: However, as a last peep from me before i'll burn to ashes, and now with all fresh Python 3.2rc2+ all through, i do want to ask a question. I'm still not finished with my broken thing, so the usual exception still occurs in respect to the malformed spa

[issue11116] mailbox and email errors

2011-02-04 Thread Steffen Daode Nurpmeso
Steffen Daode Nurpmeso added the comment: I thought about it. It's worse. You did a good job and i was not even able to create symlinks the way it should have been done. This is a real shame - for me. -- ___ Python tracker

[issue11116] mailbox and email errors

2011-02-04 Thread Steffen Daode Nurpmeso
Steffen Daode Nurpmeso added the comment: Dear RDM, now i'm really ashamed. To be absolutely sure that i am up-to-date if diff'd and found that test_mailbox.py contained a sys.exit(1) i've inserted this - it was the lunch break, really! Forget everything i've posted. Please close this. Sham

[issue11116] mailbox and email errors

2011-02-04 Thread Steffen Daode Nurpmeso
Steffen Daode Nurpmeso added the comment: P.S.: it's that messed UNIX with the nice user-experience *G*UI. And the __pycache__ files state 'cpython-32'. -- ___ Python tracker

[issue11116] mailbox and email errors

2011-02-04 Thread Steffen Daode Nurpmeso
Steffen Daode Nurpmeso added the comment: You're right, the python3 executable is indeed 20:05 ~/tmp $ python3 -V Python 3.2rc1+ The relevant .py files (mailbox.py, email/*.py, (email/mime/*.py), test/test_mailbox.py are symlinked to the repo files. (And, different to this morning - sorry, *s

[issue11116] mailbox and email errors

2011-02-04 Thread R. David Murray
R. David Murray added the comment: Perhaps your problem with test_mailbox is that you are running the test_mailbox from a checkout, but using an installed python3 that is not RC2, rather than the python3 built from the checkout? -- ___ Python track

[issue11116] mailbox and email errors

2011-02-04 Thread R. David Murray
Changes by R. David Murray : -- assignee: -> r.david.murray ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: ht

[issue11116] mailbox and email errors

2011-02-04 Thread R. David Murray
R. David Murray added the comment: Steffen, I appreciate your testing this. Your error report doesn't have enough information for me to reproduce the problem. Can you post a short test case, including a sample email/mailbox file if needed, that reproduces the problem you are seeing? With a

[issue11116] (mailbox and) email (errors) -> patch

2011-02-04 Thread SilentGhost
SilentGhost added the comment: The patch would be better to say: if not lines: continue However, it could be even simpler to do: for string, charset in self._chunks: if not string: continue -- nosy: +SilentGhost ___ Python tracker

[issue11116] (mailbox and) email (errors) -> patch

2011-02-04 Thread STINNER Victor
Changes by STINNER Victor : -- nosy: +r.david.murray ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mai

[issue11116] (mailbox and) email (errors) -> patch

2011-02-04 Thread Steffen Daode Nurpmeso
Changes by Steffen Daode Nurpmeso : -- title: mailbox and email errors -> (mailbox and) email (errors) -> patch ___ Python tracker ___ ___

[issue11116] mailbox and email errors

2011-02-04 Thread Steffen Daode Nurpmeso
Changes by Steffen Daode Nurpmeso : Removed file: http://bugs.python.org/file20673/email_mbox.txt ___ Python tracker ___ ___ Python-bugs-list

[issue11116] mailbox and email errors

2011-02-04 Thread Steffen Daode Nurpmeso
Steffen Daode Nurpmeso added the comment: This simplemost patch (email_header.patch) seems to work at first glance. It heals *everything* (except for babyl format, see issue 11062). (I feel a bit like Charlie Chaplin and i think you know what i mean.) -- keywords: +patch Added file:

[issue11116] mailbox and email errors

2011-02-04 Thread Steffen Daode Nurpmeso
Steffen Daode Nurpmeso added the comment: Oops - please be aware that these outputs were saved at the end of a frustrating session. I'm doing things to show *you* what's passed around and the like, i.e. that the message is indeed a mboxMessage etc. The error which occurs is always: Fil

[issue11116] mailbox and email errors

2011-02-04 Thread Steffen Daode Nurpmeso
New submission from Steffen Daode Nurpmeso : Following Issue 9124 discussion: it took longer than i thought, but now i could rework my thing and got errors. I've also tried Lib/test/test_mailbox.py, and that produces 0xA errors and 0xA failures. I'll attach the entire tracebacks and test out