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:
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
___
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
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
___
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
___
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
Changes by lilydjwg lilyd...@gmail.com:
--
nosy: +lilydjwg
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue9559
___
___
Python-bugs-list mailing
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
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
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
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
___
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
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
___
13 matches
Mail list logo