summaryrefslogtreecommitdiffstats
path: root/Doc/library
diff options
context:
space:
mode:
authorRaymond Hettinger <rhettinger@users.noreply.github.com>2019-08-22 16:19:36 (GMT)
committerGitHub <noreply@github.com>2019-08-22 16:19:36 (GMT)
commitd0cdeaab76fef8a6e5a04665df226b6659111e4e (patch)
tree71f9d3b0791543ef421090997152c713ef4f8684 /Doc/library
parent4109263a7edce11194e301138cf66fa2d07f7ce4 (diff)
downloadcpython-d0cdeaab76fef8a6e5a04665df226b6659111e4e.zip
cpython-d0cdeaab76fef8a6e5a04665df226b6659111e4e.tar.gz
cpython-d0cdeaab76fef8a6e5a04665df226b6659111e4e.tar.bz2
bpo-32554: Deprecate hashing arbitrary types in random.seed() (GH-15382)
Diffstat (limited to 'Doc/library')
-rw-r--r--Doc/library/random.rst10
1 files changed, 10 insertions, 0 deletions
diff --git a/Doc/library/random.rst b/Doc/library/random.rst
index 90b8624..1bd1856 100644
--- a/Doc/library/random.rst
+++ b/Doc/library/random.rst
@@ -86,6 +86,11 @@ Bookkeeping functions
.. versionchanged:: 3.2
Moved to the version 2 scheme which uses all of the bits in a string seed.
+ .. deprecated:: 3.9
+ In the future, the *seed* must be one of the following types:
+ *NoneType*, :class:`int`, :class:`float`, :class:`str`,
+ :class:`bytes`, or :class:`bytearray`.
+
.. function:: getstate()
Return an object capturing the current internal state of the generator. This
@@ -316,6 +321,11 @@ Alternative Generator
Class that implements the default pseudo-random number generator used by the
:mod:`random` module.
+ .. deprecated:: 3.9
+ In the future, the *seed* must be one of the following types:
+ :class:`NoneType`, :class:`int`, :class:`float`, :class:`str`,
+ :class:`bytes`, or :class:`bytearray`.
+
.. class:: SystemRandom([seed])
Class that uses the :func:`os.urandom` function for generating random numbers