[New-bugs-announce] [issue15122] Add an option to always rewrite single-file mailboxes in-place.

Petri Lehtinen report at bugs.python.org
Thu Jun 21 12:45:50 CEST 2012

New submission from Petri Lehtinen <petri at digip.org>:

This seems like a common feature request. Many people suffer from the fact that upon flush, the contents of single-file mailboxes are written into a new file which is then renamed over the old file.

For example: #1599254, #5346, #7359, #7360, #9559, 

The original design rationale was probably to prepare for crashes. When changes are made like this, a power loss, other sytem crash, or even a bug in the mailbox.py code in the middle of writing the mailbox, cannot destroy all the data in the mailbox file.

We could add a flag to the constructors of all single-file mailboxes that changes this behavior to in-place rewriting. This would of course need accompanying documentation that warns about that the same safety guarantees don't apply with this flag.

messages: 163322
nosy: petri.lehtinen
priority: normal
severity: normal
status: open
title: Add an option to always rewrite single-file mailboxes in-place.
type: enhancement
versions: Python 3.4

Python tracker <report at bugs.python.org>

More information about the New-bugs-announce mailing list