This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author vstinner
Recipients mark.dickinson, pitrou, rhettinger, serhiy.storchaka, tim.peters, vstinner
Date 2020-04-22.22:53:31
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1587596011.17.0.134836008274.issue40346@roundup.psfhosted.org>
In-reply-to
Content
Ok, PR 19631 is now ready for a review. I completed the documentation to better explain the rationale.

Copy of the What's New in Python 3.9 documentation:

"Add a new random.BaseRandom class: random number generator base class. A random.BaseRandom subclass must only implement a single method: getrandbits(), whereas a random.Random subclass must override 6 methods (getrandbits(), random(), randbytes(), seed(), getstate() and setstate())."

Copy of the commit message:

"BaseRandom implements random() and randbytes() using getrandbits().
It has no state and its gauss() method is thread safe. It has no
VERSION attribute and its seed() method has no version parameter.

The implementation of random.Random, random.SystemRandom and
random.Random subclasses are not affected by this change."
History
Date User Action Args
2020-04-22 22:53:31vstinnersetrecipients: + vstinner, tim.peters, rhettinger, mark.dickinson, pitrou, serhiy.storchaka
2020-04-22 22:53:31vstinnersetmessageid: <1587596011.17.0.134836008274.issue40346@roundup.psfhosted.org>
2020-04-22 22:53:31vstinnerlinkissue40346 messages
2020-04-22 22:53:31vstinnercreate