Atomic writes to files

Add an option to the file interface that lets users perform atomic writes, in an easier and less error-prone way.

Examples, for context:

There was an atomicwrites package, but it’s abandoned.

Atomicwrites was deprecated, not abandoned.

I thought it’d be a good time to deprecate this package. Python 3 has os.replace and os.rename which probably do well enough of a job for most usecases.

Given that the maintainer thinks that os.replace was sufficient, you’ll want to flesh out this proposal a lot more. Why isn’t it sufficient? Can it be improved rather than adding something else? What are the requirements? What is the API? Why does it need to be in the standard library?

Previous discussion:

3 Likes