bpo-42222: Modernize integer test/conversion in randrange() (#23064)
diff --git a/Doc/library/random.rst b/Doc/library/random.rst
index fa5c74b..07ee011 100644
--- a/Doc/library/random.rst
+++ b/Doc/library/random.rst
@@ -135,6 +135,15 @@
values. Formerly it used a style like ``int(random()*n)`` which could produce
slightly uneven distributions.
+ .. deprecated:: 3.10
+ The automatic conversion of non-integer types to equivalent integers is
+ deprecated. Currently ``randrange(10.0)`` is losslessly converted to
+ ``randrange(10)``. In the future, this will raise a :exc:`TypeError`.
+
+ .. deprecated:: 3.10
+ The exception raised for non-integral values such as ``range(10.5)``
+ will be changed from :exc:`ValueError` to :exc:`TypeError`.
+
.. function:: randint(a, b)
Return a random integer *N* such that ``a <= N <= b``. Alias for