[docs] [issue37218] Default hmac.new() digestmod has not been removed from documentation

Alex Willmer report at bugs.python.org
Mon Jun 10 17:02:15 EDT 2019


New submission from Alex Willmer <alex at moreati.org.uk>:

Until Python 3.8 hmc.new() defaulted the digestmod argument to 'hmac-md5'. This was deperecated, to be removed in Python 3.8. In Python 3.8.0b1 it is gone, e.g.

Python 3.8.0b1 (default, Jun  6 2019, 03:44:52) 
[GCC 7.4.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import hmac
>>> hmac.new(b'qwertyuiop').name
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/usr/lib/python3.8/hmac.py", line 146, in new
    return HMAC(key, msg, digestmod)
  File "/usr/lib/python3.8/hmac.py", line 49, in __init__
    raise ValueError('`digestmod` is required.')
ValueError: `digestmod` is required.

but the deprecation note, and the documented signature haven't been updated.

PR incoming

----------
assignee: docs at python
components: Documentation
messages: 345144
nosy: Alex.Willmer, docs at python
priority: normal
severity: normal
status: open
title: Default hmac.new() digestmod has not been removed from documentation
versions: Python 3.8, Python 3.9

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue37218>
_______________________________________


More information about the docs mailing list