Backport a Python issue13146 to Python 2.7 on EL 7
This bug causes mysterious, nondeterministic crash of Python applications.
https://bugs.python.org/issue13146
Writing a pyc file is not atomic
The Python 2.7 patch https://bugs.python.org/file30324/13146-2.7.patch works fine.
It would help if we could backport it to the Python 2.7 in the upcoming EL 7.5 release.
Nice to have another patch that fixes a selftest failure too. https://bugs.python.org/issue31158: read returns 5 bytes only.
Thanks.