]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
[3.11] gh-112999: Replace the outdated "deprecated" directives with "versionchanged...
authorSerhiy Storchaka <storchaka@gmail.com>
Tue, 12 Dec 2023 17:17:35 +0000 (19:17 +0200)
committerGitHub <noreply@github.com>
Tue, 12 Dec 2023 17:17:35 +0000 (17:17 +0000)
(cherry picked from commit fe9991bb672dd95fb9cd38b5a03180719ac4e722)

Doc/library/hmac.rst
Doc/library/random.rst
Doc/using/cmdline.rst
Lib/hmac.py

index b2ca0455d3745c66c53e8d75d0eb6a0737ed539c..43012e03c580e8f102f7384942026e9a4282d41c 100644 (file)
@@ -14,7 +14,7 @@
 This module implements the HMAC algorithm as described by :rfc:`2104`.
 
 
-.. function:: new(key, msg=None, digestmod='')
+.. function:: new(key, msg=None, digestmod)
 
    Return a new hmac object.  *key* is a bytes or bytearray object giving the
    secret key.  If *msg* is present, the method call ``update(msg)`` is made.
@@ -27,10 +27,9 @@ This module implements the HMAC algorithm as described by :rfc:`2104`.
       Parameter *msg* can be of any type supported by :mod:`hashlib`.
       Parameter *digestmod* can be the name of a hash algorithm.
 
-   .. deprecated-removed:: 3.4 3.8
-      MD5 as implicit default digest for *digestmod* is deprecated.
-      The digestmod parameter is now required.  Pass it as a keyword
-      argument to avoid awkwardness when you do not have an initial msg.
+   .. versionchanged:: 3.8
+      The *digestmod* argument is now required.  Pass it as a keyword
+      argument to avoid awkwardness when you do not have an initial *msg*.
 
 
 .. function:: digest(key, msg, digest)
@@ -114,11 +113,9 @@ A hash object has the following attributes:
    .. versionadded:: 3.4
 
 
-.. deprecated:: 3.9
-
-   The undocumented attributes ``HMAC.digest_cons``, ``HMAC.inner``, and
-   ``HMAC.outer`` are internal implementation details and will be removed in
-   Python 3.10.
+.. versionchanged:: 3.10
+   Removed the undocumented attributes ``HMAC.digest_cons``, ``HMAC.inner``,
+   and ``HMAC.outer``.
 
 This module also provides the following helper function:
 
index 4af4f83e280ca793cfbaba5ec0d27721cd6a020b..2c1a6285846c4f7584ad0b6e1e40c32696b3f9a6 100644 (file)
@@ -221,8 +221,8 @@ Functions for sequences
    generated.  For example, a sequence of length 2080 is the largest that
    can fit within the period of the Mersenne Twister random number generator.
 
-   .. deprecated-removed:: 3.9 3.11
-      The optional parameter *random*.
+   .. versionchanged:: 3.11
+      Removed the optional parameter *random*.
 
 
 .. function:: sample(population, k, *, counts=None)
@@ -383,9 +383,9 @@ 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`,
+   .. versionchanged:: 3.11
+      Formerly the *seed* could be any hashable object.  Now it is limited to:
+      ``None``, :class:`int`, :class:`float`, :class:`str`,
       :class:`bytes`, or :class:`bytearray`.
 
 .. class:: SystemRandom([seed])
index c1a6f50ca349796fddc5fa546a6ca6601dea64cc..5389d33023096d5a53559315ee353ab8ede9b3cf 100644 (file)
@@ -569,9 +569,7 @@ Miscellaneous options
 
    .. versionadded:: 3.10
       The ``-X warn_default_encoding`` option.
-
-   .. deprecated-removed:: 3.9 3.10
-      The ``-X oldparser`` option.
+      Removed the ``-X oldparser`` option.
 
    .. versionadded:: 3.11
       The ``-X no_debug_ranges`` option.
index 8b4f920db954ca8e5e5844c6b91b52ea56d44d81..8b4eb2fe741e6070dacc138179f365d4b95f54dd 100644 (file)
@@ -53,7 +53,7 @@ class HMAC:
             raise TypeError("key: expected bytes or bytearray, but got %r" % type(key).__name__)
 
         if not digestmod:
-            raise TypeError("Missing required parameter 'digestmod'.")
+            raise TypeError("Missing required argument 'digestmod'.")
 
         if _hashopenssl and isinstance(digestmod, (str, _functype)):
             try: