8000 gh-112999: Replace the outdated "deprecated" directives with "version… · python/cpython@fe9991b · GitHub
[go: up one dir, main page]

Skip to content

Commit fe9991b

Browse files
gh-112999: Replace the outdated "deprecated" directives with "versionchanged" (GH-113000)
1 parent eafc238 commit fe9991b

File tree

4 files changed

+13
-18
lines changed

4 files changed

+13
-18
lines changed

Doc/library/hmac.rst

Lines changed: 7 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
This module implements the HMAC algorithm as described by :rfc:`2104`.
1515

1616

17-
.. function:: new(key, msg=None, digestmod='')
17+
.. function:: new(key, msg=None, digestmod)
1818

1919
Return a new hmac object. *key* is a bytes or bytearray object giving the
2020
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`.
2727
Parameter *msg* can be of any type supported by :mod:`hashlib`.
2828
Parameter *digestmod* can be the name of a hash algorithm.
2929

30-
.. deprecated-removed:: 3.4 3.8
31-
MD5 as implicit default digest for *digestmod* is deprecated.
32-
The digestmod parameter is now required. Pass it as a keyword
33-
argument to avoid awkwardness when you do not have an initial msg.
30+
.. versionchanged:: 3.8
31+
The *digestmod* argument is now required. Pass it as a keyword
32+
argument to avoid awkwardness when you do not have an initial *msg*.
3433

3534

3635
.. function:: digest(key, msg, digest)
@@ -114,11 +113,9 @@ A hash object has the following attributes:
114113
.. versionadded:: 3.4
115114

116115

117-
.. deprecated:: 3.9
118-
119-
The undocumented attributes ``HMAC.digest_cons``, ``HMAC.inner``, and
120-
``HMAC.outer`` are internal implementation details and will be removed in
121-
Python 3.10.
116+
.. versionchanged:: 3.10
117+
Removed the undocumented attributes ``HMAC.digest_cons``, ``HMAC.inner``,
118+
and ``HMAC.outer``.
122119

123120
This module also provides the following helper function:
124121

Doc/library/random.rst

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -220,8 +220,8 @@ Functions for sequences
220220
generated. For example, a sequence of length 2080 is the largest that
221221
can fit within the period of the Mersenne Twister random number generator.
222222

223-
.. deprecated-removed:: 3.9 3.11
224-
The optional parameter *random*.
223+
.. versionchanged:: 3.11
224+
Removed the optional parameter *random*.
225225

226226

227227
.. function:: sample(population, k, *, counts=None)
@@ -407,9 +407,9 @@ Alternative Generator
407407
Class that implements the default pseudo-random number generator used by the
408408
:mod:`random` module.
409409

410-
.. deprecated-removed:: 3.9 3.11
410+
.. versionchanged:: 3.11
411411
Formerly the *seed* could be any hashable object. Now it is limited to:
412-
:class:`NoneType`, :class:`int`, :class:`float`, :class:`str`,
412+
``None``, :class:`int`, :class:`float`, :class:`str`,
413413
:class:`bytes`, or :class:`bytearray`.
414414

415415
.. class:: SystemRandom([seed])

Doc/using/cmdline.rst

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -590,9 +590,7 @@ Miscellaneous options
590590

591591
.. versionadded:: 3.10
592592
The ``-X warn_default_encoding`` option.
593-
594-
.. deprecated-removed:: 3.9 3.10
595-
The ``-X oldparser`` option.
593+
Removed the ``-X oldparser`` option.
596594

597595
.. versionadded:: 3.11
598596
The ``-X no_debug_ranges`` option.

Lib/hmac.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ def __init__(self, key, msg=None, digestmod=''):
5353
raise TypeError("key: expected bytes or bytearray, but got %r" % type(key).__name__)
5454

5555
if not digestmod:
56-
raise TypeError("Missing required parameter 'digestmod'.")
56+
raise TypeError("Missing required argument 'digestmod'.")
5757

5858
if _hashopenssl and isinstance(digestmod, (str, _functype)):
5959
try:

0 commit comments

Comments
 (0)
0