bpo-32554: Deprecate hashing arbitrary types in random.seed() (GH-15382)
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 @@
.. 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 @@
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