[issue15222] mailbox.mbox writes without empty line after each message

2012-06-29 Thread Petri Lehtinen
Petri Lehtinen added the comment: Since there's no empty line between the content of mail 2 and the "From " line of mail 3, the body of mail 2 isn't really terminated by a newline. Reading the message confirms this: >>> import mailbox >>> mbox = mailbox.mbox('mbox') >>> mbox[1].get_payload()

[issue15222] mailbox.mbox writes without empty line after each message

2012-06-29 Thread lilydjwg
lilydjwg added the comment: Hi, Petri Lehtinen. That's a bug of mine. That mbox is made up by me for demo, not procmail which has the newline. However, a newline is indeed lost and in some way it does corrupt my real mbox. -- ___ Python tracker

[issue15222] mailbox.mbox writes without empty line after each message

2012-06-30 Thread Petri Lehtinen
Petri Lehtinen added the comment: I'm afraid that's not enough details to do any fixing. I would need a concrete way to reproduce the issue. -- status: open -> pending ___ Python tracker _

[issue15222] mailbox.mbox writes without empty line after each message

2012-07-03 Thread lilydjwg
lilydjwg added the comment: Hi, I have figured it out. The 'mbox2' file should be in correct format now. Run './bug.py' once to delete the last mail. 'cat newmail >> mbox2' to append a new mail to that mbox. Run './bug.py' again. Now, 'mbox2' doesn't have a newline at the end. (And I think a c

[issue15222] mailbox.mbox writes without empty line after each message

2012-07-03 Thread lilydjwg
Changes by lilydjwg : Added file: http://bugs.python.org/file26255/newmail ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscrib

[issue15222] mailbox.mbox writes without empty line after each message

2012-07-03 Thread lilydjwg
Changes by lilydjwg : Added file: http://bugs.python.org/file26256/bug.py ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe

[issue15222] mailbox.mbox writes without empty line after each message

2012-07-04 Thread Petri Lehtinen
Petri Lehtinen added the comment: Well, by appending newmail to the mailbox, you effectively break the next-to-last message by not inserting a newline after it. This can also be achieved by adding a message that doesn't end in a newline to the mbox (using the mailbox module). The real bug is

[issue15222] mailbox.mbox writes without empty line after each message

2012-07-07 Thread Petri Lehtinen
Petri Lehtinen added the comment: MDAs blindly write their message to the end of the user's mail spool file. So, if there's no newline at the end, the mailbox gets corrupted (the new message is "joined" with the previous one). I tested with Postfix, but this probably happens for other MDA's t

[issue15222] mailbox.mbox writes without empty line after each message

2012-08-25 Thread Petri Lehtinen
Petri Lehtinen added the comment: Attaching two patches. Patch 1 changes the common message template in mailbox tests to end in a newline. If this wasn't done, more or less all common mailbox tests would have to be special cased for mbox. Patch 2 adds a single blank line after each message in

[issue15222] mailbox.mbox writes without empty line after each message

2012-08-25 Thread Petri Lehtinen
Changes by Petri Lehtinen : -- keywords: +needs review stage: -> patch review Added file: http://bugs.python.org/file26999/issue15222_v1_0002_insert_blank_after_each_message_in_mbox.patch ___ Python tracker _

[issue15222] mailbox.mbox writes without empty line after each message

2012-09-02 Thread lilydjwg
lilydjwg added the comment: The last patch works fine here, thanks! -- ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubs

[issue15222] mailbox.mbox writes without empty line after each message

2012-09-08 Thread R. David Murray
R. David Murray added the comment: Looks like reitveld doesn't recognize your patch format, Petri. Instead of having the write_line flag, how about doing the newline write in the if body? A 'lastline=line' at the end of the loop in the buffer loop case is probably less expensive than doing th

[issue15222] mailbox.mbox writes without empty line after each message

2012-09-13 Thread Petri Lehtinen
Petri Lehtinen added the comment: Attached an updated version of the second patch. David: Is this what you meant? Also, the patch format should now be rietveld compatible :) -- Added file: http://bugs.python.org/file27188/issue15222_v2_0002_insert_blank_after_each_message_in_mbox.patch

[issue15222] mailbox.mbox writes without empty line after each message

2012-09-13 Thread Petri Lehtinen
Changes by Petri Lehtinen : Removed file: http://bugs.python.org/file27188/issue15222_v2_0002_insert_blank_after_each_message_in_mbox.patch ___ Python tracker ___ __

[issue15222] mailbox.mbox writes without empty line after each message

2012-09-13 Thread Petri Lehtinen
Changes by Petri Lehtinen : Added file: http://bugs.python.org/file27189/issue15222_v2_0002_insert_blank_after_each_message_in_mbox.patch ___ Python tracker ___

[issue15222] mailbox.mbox writes without empty line after each message

2012-09-13 Thread R. David Murray
R. David Murray added the comment: Yes, that looks better. I haven't worked through the rest of the logic in detail, I'll trust your months of cogitation and the tests on that part. -- ___ Python tracker

[issue15222] mailbox.mbox writes without empty line after each message

2012-09-25 Thread Roundup Robot
Roundup Robot added the comment: New changeset 6451be0e374a by Petri Lehtinen in branch '2.7': #15222: test_mailbox: End message template in a newline http://hg.python.org/cpython/rev/6451be0e374a New changeset d903d4981e33 by Petri Lehtinen in branch '2.7': #15222: Insert blank line after each

[issue15222] mailbox.mbox writes without empty line after each message

2012-09-25 Thread Petri Lehtinen
Petri Lehtinen added the comment: Fixed, thanks! -- keywords: -needs review resolution: -> fixed stage: patch review -> committed/rejected status: open -> closed ___ Python tracker ___

[issue15222] mailbox.mbox writes without empty line after each message

2012-09-25 Thread Roundup Robot
Roundup Robot added the comment: New changeset a87ab9b0c9e5 by Petri Lehtinen in branch '2.7': #15222: Fix a test failure on Windows http://hg.python.org/cpython/rev/a87ab9b0c9e5 -- ___ Python tracker _

[issue15222] mailbox.mbox writes without empty line after each message

2012-10-26 Thread lilydjwg
lilydjwg added the comment: My system has updated to Python 3.3.0 and this bugs me again :-( I don't see the changes in Python 3.3.0. So when will this be merged into 3.3? -- ___ Python tracker

[issue15222] mailbox.mbox writes without empty line after each message

2012-10-26 Thread Petri Lehtinen
Petri Lehtinen added the comment: The fix was committed when 3.3.0 was in release candidate mode, and wasn't considered important enough to be included in 3.3.0 anymore. It will be included in 3.3.1, which is to be released next month. -- ___ Python