This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author pitrou
Recipients doko, pitrou
Date 2009-11-19.16:52:18
SpamBayes Score 6.629253e-07
Marked as misclassified No
Message-id <1258649540.01.0.139522097353.issue7360@psf.upfronthosting.co.za>
In-reply-to
Content
> the mailbox._singlefileMailbox class is not safe with concurrent access,
> because mailbox._singlefileMailbox.flush() replaces the underlying file
> with a new copy by constructing a temporary file and then renaming it.
> This breaks all other class instances which have this mailbox open.

I don't think this class aims at being safe against concurrent access,
so having it fail loudly is a good thing.
Besides, the proposed cure (overwriting instead of renaming) looks worse
than the illness. The virtue of renaming is that it is atomic (on POSIX
systems at least), so you can't end up with a half-written mailbox if
there's a crash or an IO problem in the middle.
History
Date User Action Args
2009-11-19 16:52:20pitrousetrecipients: + pitrou, doko
2009-11-19 16:52:20pitrousetmessageid: <1258649540.01.0.139522097353.issue7360@psf.upfronthosting.co.za>
2009-11-19 16:52:18pitroulinkissue7360 messages
2009-11-19 16:52:18pitroucreate