A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://mail.python.org/pipermail/python-dev/2012-June/120826.html below:

[Python-Dev] cpython (2.7): #9559: Append data to single-file mailbox files if messages are only added

[Python-Dev] cpython (2.7): #9559: Append data to single-file mailbox files if messages are only added [Python-Dev] cpython (2.7): #9559: Append data to single-file mailbox files if messages are only addedPetri Lehtinen petri at digip.org
Thu Jun 28 15:16:45 CEST 2012
Antoine Pitrou wrote:
> > If messages were only added, a new file is no longer created and
> > renamed over the old file when flush() is called on an mbox, MMDF or
> > Babyl mailbox.
> 
> Why so? Appending is not atomic and, if it fails in the middle, you
> could get a corrupt mbox file.
> Furthermore, I disagree that it's a bugfix: IMO it should wait for 3.4.

The code previosly already appended messages to the end of the file
when calling add(). This patch just changed it to not do a full
rewrite when flush() is called. Having a partially written message in
the end of your mailbox doesn't seem like a fatal corruption to me.

Furthermore, I (and R. David Murray) think this is not so surprising
for users. Most (or all) other implementations always write changes
in-place without renaming, as this makes it possible to find out
whether new mail has arrived.
More information about the Python-Dev mailing list

RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4