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 pitrou
Recipients mark.dickinson, pitrou, rhettinger, serhiy.storchaka, tim.peters, vstinner
Date 2020-04-23.09:16:30
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1587633390.42.0.533546942254.issue40346@roundup.psfhosted.org>
In-reply-to
Content
If I believe what Victor wrote about:
"""
The implementation of random.Random, random.SystemRandom and
random.Random subclasses are not affected by this change.
"""

then I don't understand how the API is changed.  IIUC, users subclassing random.Random won't see a difference.  However, users now can subclass BaseRandom which makes it easier to obtain a full-featured random generator class.

However, if we want to think about a new subclassing API, it may be worth looking at the recent Numpy changes. Numpy added a new random generator API recently, with a design based on composition rather than inheritance (and also they switched from Mersenne Twister to another underlying PRNG!):
https://numpy.org/doc/stable/reference/random/index.html
History
Date User Action Args
2020-04-23 09:16:30pitrousetrecipients: + pitrou, tim.peters, rhettinger, mark.dickinson, vstinner, serhiy.storchaka
2020-04-23 09:16:30pitrousetmessageid: <1587633390.42.0.533546942254.issue40346@roundup.psfhosted.org>
2020-04-23 09:16:30pitroulinkissue40346 messages
2020-04-23 09:16:30pitroucreate