From: Michael W. Hudson Date: Tue, 24 Sep 2002 10:27:28 +0000 (+0000) Subject: Finish up the random fixes that Raymond started yesterday. X-Git-Tag: v2.2.2b1~142 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=bd5ba4bba6a92325105018da2ac5708250a7f3d2;p=thirdparty%2FPython%2Fcpython.git Finish up the random fixes that Raymond started yesterday. --- diff --git a/Lib/test/test_random.py b/Lib/test/test_random.py index 5f60f4b7b235..d508c9fa6569 100644 --- a/Lib/test/test_random.py +++ b/Lib/test/test_random.py @@ -1,4 +1,4 @@ -from test import test_support +import test_support import random # Ensure that the seed() method initializes all the hidden state. In diff --git a/Misc/NEWS b/Misc/NEWS index 99704c8b54d1..a1ff3316ec52 100644 --- a/Misc/NEWS +++ b/Misc/NEWS @@ -52,6 +52,13 @@ Extension modules Library +- random.gauss() uses a piece of hidden state used by nothing else, + and the .seed() and .whseed() methods failed to reset it. In other + words, setting the seed didn't completely determine the sequence of + results produced by random.gauss(). It does now. Programs repeatedly + mixing calls to a seed method with calls to gauss() may see different + results now. + - Some fixes in the copy module: when an object is copied through its __reduce__ method, there was no check for a __setstate__ method on the result [SF patch 565085]; deepcopy should treat instances of