[2.7] bpo-29960 _random.Random corrupted on exception in setstate(). … (#1289)

(cherry picked from commit 9616a82e7802241a4b74cf7ae38d43c37bf66e48)
4 files changed