Opened 4 years ago

Closed 4 years ago

#31985 closed Cleanup/optimization (fixed)

salted_hmac() docstring shouldn't mention

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


On its documentation, it mentions "any algorithm name supported by can be passed",
but this is not true, algorithms supported by may not accessible through getattr,
This was mentioned here:
But it wasn't addressed.

Either we can make salted_hmac use (which is discouraged by python's documentation).
Or change the documentation to not mentioned

Change History (5)

comment:1 by Mariusz Felisiak, 4 years ago

Component: UncategorizedUtilities
Easy pickings: set
Summary: salted_hmac incorrect documentationsalted_hmac docstring shouldn't mention
Triage Stage: UnreviewedAccepted
Type: UncategorizedCleanup/optimization

Agreed. I would remove new() from the docstring:

-    but any algorithm name supported by can be passed.
+    but any algorithm name supported by hashlib can be passed.

comment:2 by Mariusz Felisiak, 4 years ago

Summary: salted_hmac docstring shouldn't mention docstring shouldn't mention

comment:3 by Francisco Couzo, 4 years ago

Owner: changed from nobody to Francisco Couzo
Status: newassigned

I can make the PR

comment:4 by Francisco Couzo, 4 years ago

Has patch: set

comment:5 by GitHub <noreply@…>, 4 years ago

Resolution: fixed
Status: assignedclosed

In 5ea1621:

Fixed #31985 -- Corrected salted_hmac()'s docstring about supported algorithms.

salted_hmac() validates supported algorithms by checking hashlib

Note: See TracTickets for help on using tickets.
Back to Top