Either we can make salted_hmac use hashlib.new (which is discouraged by
python's documentation).
Or change the documentation to not mentioned hashlib.new.
--
Ticket URL: <https://code.djangoproject.com/ticket/31985>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.
* type: Uncategorized => Cleanup/optimization
* component: Uncategorized => Utilities
* easy: 0 => 1
* stage: Unreviewed => Accepted
Comment:
Agreed. I would remove `new()` from the docstring:
{{{
- but any algorithm name supported by hashlib.new() can be passed.
+ but any algorithm name supported by hashlib can be passed.
}}}
--
Ticket URL: <https://code.djangoproject.com/ticket/31985#comment:1>
--
Ticket URL: <https://code.djangoproject.com/ticket/31985#comment:2>
* owner: nobody => Francisco Couzo
* status: new => assigned
Comment:
I can make the PR
--
Ticket URL: <https://code.djangoproject.com/ticket/31985#comment:3>
* has_patch: 0 => 1
Comment:
[https://github.com/django/django/pull/13394 PR]
--
Ticket URL: <https://code.djangoproject.com/ticket/31985#comment:4>
* status: assigned => closed
* resolution: => fixed
Comment:
In [changeset:"5ea1621c724e765c9a642a1b3b6e83419fda920b" 5ea1621]:
{{{
#!CommitTicketReference repository=""
revision="5ea1621c724e765c9a642a1b3b6e83419fda920b"
Fixed #31985 -- Corrected salted_hmac()'s docstring about supported
algorithms.
salted_hmac() validates supported algorithms by checking hashlib
methods.
}}}
--
Ticket URL: <https://code.djangoproject.com/ticket/31985#comment:5>