[issue9559] mailbox.mbox creates new file when adding message to mbox

2012-06-29 Thread Roundup Robot
Roundup Robot devn...@psf.upfronthosting.co.za added the comment: New changeset 3d7a75e945ee by Petri Lehtinen in branch '2.7': #9559: Don't call _pre_mailbox_hook more than once http://hg.python.org/cpython/rev/3d7a75e945ee New changeset 7cf5a629fde2 by Petri Lehtinen in branch '3.2': #9559:

[issue9559] mailbox.mbox creates new file when adding message to mbox

2012-06-29 Thread Petri Lehtinen
Changes by Petri Lehtinen pe...@digip.org: -- resolution: - fixed stage: patch review - committed/rejected status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue9559 ___

[issue9559] mailbox.mbox creates new file when adding message to mbox

2012-06-28 Thread Roundup Robot
Roundup Robot devn...@psf.upfronthosting.co.za added the comment: New changeset c37cb11b546f by Petri Lehtinen in branch '2.7': #9559: Append data to single-file mailbox files if messages are only added http://hg.python.org/cpython/rev/c37cb11b546f New changeset 5f447a005d67 by Petri Lehtinen

[issue9559] mailbox.mbox creates new file when adding message to mbox

2012-06-28 Thread Petri Lehtinen
Petri Lehtinen pe...@digip.org added the comment: Fixed. I removed the extra newlines. -- resolution: - fixed status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue9559 ___

[issue9559] mailbox.mbox creates new file when adding message to mbox

2012-06-28 Thread Petri Lehtinen
Petri Lehtinen pe...@digip.org added the comment: See #15122 for always modifying single-file mailboxes in-place. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue9559 ___

[issue9559] mailbox.mbox creates new file when adding message to mbox

2012-06-28 Thread Petri Lehtinen
Petri Lehtinen pe...@digip.org added the comment: The _pre_mailbox_hook may be called twice, like this: babyl = mailbox.Babyl('new_file') babyl.add('foo\n') babyl.remove(0) babyl.add('bar\n') This only affects Babyl, that writes the mailbox header in _pre_mailbox_hook. The mailbox is

[issue9559] mailbox.mbox creates new file when adding message to mbox

2012-06-28 Thread lilydjwg
Changes by lilydjwg lilyd...@gmail.com: -- nosy: +lilydjwg ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue9559 ___ ___ Python-bugs-list mailing

[issue9559] mailbox.mbox creates new file when adding message to mbox

2012-06-26 Thread Petri Lehtinen
Petri Lehtinen pe...@digip.org added the comment: Attached a patch that doesn't rewrite+rename if messages have only been added. In this case, flush() only syncs the mailbox file to make sure all changes have been written to disk. David Barry: what do you think about including this on bugfix

[issue9559] mailbox.mbox creates new file when adding message to mbox

2012-06-26 Thread R. David Murray
R. David Murray rdmur...@bitdance.com added the comment: Could someone be depending on it? Sure. Is that likely enough to block this as a bug fix? Personally I think not. Appending to the mailbox when adding messages is, I think, the expected behavior, and always rewriting it is the

[issue9559] mailbox.mbox creates new file when adding message to mbox

2012-06-18 Thread Petri Lehtinen
Petri Lehtinen pe...@digip.org added the comment: This is actually not true. When calling add(), mbox (and MMDF and Babyl) append the message to the file without rewriting it. It's the following flush() call that rewrites the whole mailbox contents. I think this could be changed to work

[issue9559] mailbox.mbox creates new file when adding message to mbox

2012-05-06 Thread Ezio Melotti
Changes by Ezio Melotti ezio.melo...@gmail.com: -- stage: - needs patch versions: +Python 3.3 -Python 3.1 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue9559 ___

[issue9559] mailbox.mbox creates new file when adding message to mbox

2010-08-10 Thread Chris Green
New submission from Chris Green ch...@isbd.co.uk: When you call mailbox.mbox.add() the old mbox file is copied, the new file is modified and then renamed to the name of the'old' mbox file. This breaks the way that many MUAs detect and manage new mail in an mbox, in particular I discovered

[issue9559] mailbox.mbox creates new file when adding message to mbox

2010-08-10 Thread R. David Murray
Changes by R. David Murray rdmur...@bitdance.com: -- nosy: +akuchling versions: +Python 3.1, Python 3.2 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue9559 ___