Opened 4 years ago
Closed 4 years ago
#31985 closed Cleanup/optimization (fixed)
salted_hmac() docstring shouldn't mention hashlib.new().
Reported by: | Francisco Couzo | Owned by: | Francisco Couzo |
---|---|---|---|
Component: | Utilities | Version: | 3.1 |
Severity: | Normal | Keywords: | |
Cc: | Triage Stage: | Accepted | |
Has patch: | yes | Needs documentation: | no |
Needs tests: | no | Patch needs improvement: | no |
Easy pickings: | yes | UI/UX: | no |
Description
On its documentation, it mentions "any algorithm name supported by hashlib.new() can be passed",
but this is not true, algorithms supported by hashlib.new() may not accessible through getattr,
This was mentioned here:
https://github.com/django/django/pull/12291#discussion_r364348132
But it wasn't addressed.
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.
Change History (5)
comment:1 by , 4 years ago
Component: | Uncategorized → Utilities |
---|---|
Easy pickings: | set |
Summary: | salted_hmac incorrect documentation → salted_hmac docstring shouldn't mention hashlib.new(). |
Triage Stage: | Unreviewed → Accepted |
Type: | Uncategorized → Cleanup/optimization |
comment:2 by , 4 years ago
Summary: | salted_hmac docstring shouldn't mention hashlib.new(). → salted_hmac() docstring shouldn't mention hashlib.new(). |
---|
Note:
See TracTickets
for help on using tickets.
Agreed. I would remove
new()
from the docstring: