This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

classification
Title: hashlib's pbkdf2_hmac documentation "rounds" does not match source
Type: enhancement Stage: resolved
Components: Documentation Versions: Python 3.6, Python 3.5
process
Status: closed Resolution: fixed
Dependencies: Superseder:
Assigned To: docs@python Nosy List: dbakker, docs@python, martin.panter, python-dev
Priority: normal Keywords: patch

Created on 2016-02-19 00:00 by dbakker, last changed 2022-04-11 14:58 by admin. This issue is now closed.

Files
File name Uploaded Description Edit
pbkdf2_4.patch dbakker, 2016-02-19 00:00 Patch file updating only the documentation review
pbkdf2_5.patch dbakker, 2016-02-19 10:34 Patch documentation for pbkdf2_hmac in 3 places review
pbkdf2_6.patch martin.panter, 2016-02-22 09:46 review
Messages (5)
msg260490 - (view) Author: Daan Bakker (dbakker) Date: 2016-02-19 00:00
The documentation for pbkdf2_hmac at https://docs.python.org/3/library/hashlib.html uses the "rounds" keyword:

hashlib.pbkdf2_hmac(name, password, salt, rounds, dklen=None)

However, the actual source code uses "iterations". No-one has probably noticed it before because no error is raised if the number of iterations is given as a positional argument.
msg260494 - (view) Author: Martin Panter (martin.panter) * (Python committer) Date: 2016-02-19 01:24
Thanks for the patch. The documentation still mentions *rounds* in one place, which I presume was meant to be a direct reference to the parameter.
msg260515 - (view) Author: Daan Bakker (dbakker) Date: 2016-02-19 10:34
Good catch. I updated that reference now from rounds to iterations as well.
msg260664 - (view) Author: Martin Panter (martin.panter) * (Python committer) Date: 2016-02-22 09:46
Here is an updated patch. I also fixed the hash_name parameter, some more minor offences in the documentation, and added a test case.
msg260887 - (view) Author: Roundup Robot (python-dev) (Python triager) Date: 2016-02-26 01:14
New changeset 7609aaf180b4 by Martin Panter in branch '3.5':
Issue #26390: Fix and test pbkdf2_hmac() parameter names
https://hg.python.org/cpython/rev/7609aaf180b4

New changeset a74420677e6b by Martin Panter in branch 'default':
Issue #26390: Merge pbkdf2_hmac() doc from 3.5
https://hg.python.org/cpython/rev/a74420677e6b
History
Date User Action Args
2022-04-11 14:58:27adminsetgithub: 70578
2016-02-26 02:15:20martin.pantersetstatus: open -> closed
resolution: fixed
stage: patch review -> resolved
2016-02-26 01:14:08python-devsetnosy: + python-dev
messages: + msg260887
2016-02-22 09:46:47martin.pantersetfiles: + pbkdf2_6.patch

messages: + msg260664
2016-02-19 10:34:08dbakkersetfiles: + pbkdf2_5.patch

messages: + msg260515
2016-02-19 01:24:27martin.pantersetversions: - Python 3.4
nosy: + martin.panter

messages: + msg260494

stage: patch review
2016-02-19 00:00:57dbakkercreate