In aa95a42 (via #3390) atomicwrites was added to fix an issue on Windows (to fix #3008).
It does not appear to have been necessary for non-Windows systems, and is actually causing a slowdown there (pytest --collect-only: 5s => 8s on pytest's repo, with cleaned .pyc files of course).
The problem is that it calls fsync on the dir, which is not really necessary (untitaker/python-atomicwrites#17 (comment)).
I think we should revert / change this to only use atomicwrites on Windows.