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 documentation link error
Type: behavior Stage: resolved
Components: Documentation Versions: Python 3.7, Python 3.6
process
Status: closed Resolution: fixed
Dependencies: Superseder:
Assigned To: methane Nosy List: christian.heimes, docs@python, frankmillman, georg.brandl, gregory.p.smith, martin.panter, methane, python-dev, r.david.murray, serhiy.storchaka, xiang.zhang
Priority: normal Keywords: patch

Created on 2016-12-24 09:21 by frankmillman, last changed 2022-04-11 14:58 by admin. This issue is now closed.

Files
File name Uploaded Description Edit
29062-currentmodule.patch methane, 2016-12-26 10:48 review
merge-hashlib-blake2.patch methane, 2016-12-27 08:54 review
Messages (23)
msg283930 - (view) Author: Frank Millman (frankmillman) Date: 2016-12-24 09:21
If you call up online documentation for Python3.6, and select modules>h>hashlib, it takes you to 15.2. hashlib — BLAKE2 hash functions

It should take you to 15.1. hashlib — Secure hashes and message digests
msg283948 - (view) Author: Xiang Zhang (xiang.zhang) * (Python committer) Date: 2016-12-24 12:52
Is the https://docs.python.org/3/library/crypto.html section messed up? Two hashlib entries and some other bad entries?
msg283978 - (view) Author: Inada Naoki (methane) * (Python committer) Date: 2016-12-25 01:19
1. remove `.. module:: hashlib` from Doc/library/hashlib-blake2.rst
2. merge Doc/library/hashlib-blake2.rst content into Doc/library/hashlib.rst

Hmm, which is better?
msg283986 - (view) Author: Serhiy Storchaka (serhiy.storchaka) * (Python committer) Date: 2016-12-25 06:47
Replace ".. module" with ".. currentmodule".
msg284022 - (view) Author: Inada Naoki (methane) * (Python committer) Date: 2016-12-26 10:48
I like currentmodule directive.
msg284030 - (view) Author: Serhiy Storchaka (serhiy.storchaka) * (Python committer) Date: 2016-12-26 13:37
I didn't tested my suggestion. If it solves the issue and makes all related references correct, feel free to push the patch Inada.
msg284055 - (view) Author: Roundup Robot (python-dev) (Python triager) Date: 2016-12-27 03:20
New changeset 1970c9ea8572 by INADA Naoki in branch 'default':
Issue #29062: doc: Fix hashlib module index conflict
https://hg.python.org/cpython/rev/1970c9ea8572
msg284063 - (view) Author: Xiang Zhang (xiang.zhang) * (Python committer) Date: 2016-12-27 05:08
This fixed the index. But the section is still messed up: https://docs.python.org/3/library/crypto.html. The three entries: Module, Examples, Credits in my mind should not appear on the index.
msg284066 - (view) Author: Roundup Robot (python-dev) (Python triager) Date: 2016-12-27 06:07
New changeset c75ef013bca3 by INADA Naoki in branch 'default':
Issue #29062: doc: Fix heading level of hashlib-blake2
https://hg.python.org/cpython/rev/c75ef013bca3
msg284067 - (view) Author: Inada Naoki (methane) * (Python committer) Date: 2016-12-27 06:50
While section level of Module, Examples, and Credits is fixed,
https://docs.python.org/3/library/crypto.html seems still weird.
It looks like there are two `hashlib` modules.

Now I think hashlib-blake2 should be merged into hashlib.
msg284069 - (view) Author: Xiang Zhang (xiang.zhang) * (Python committer) Date: 2016-12-27 07:06
> Now I think hashlib-blake2 should be merged into hashlib.

+1

INADA, 3.6 branch also suffers the problems here, I didn't see you patch it.
msg284070 - (view) Author: Serhiy Storchaka (serhiy.storchaka) * (Python committer) Date: 2016-12-27 07:44
> While section level of Module, Examples, and Credits is fixed,
> https://docs.python.org/3/library/crypto.html seems still weird.
> It looks like there are two `hashlib` modules.

That is because hashlib-blake2.rst is explicitly added to the TOC list in Doc/library/crypto.rst.
msg284071 - (view) Author: Inada Naoki (methane) * (Python committer) Date: 2016-12-27 08:04
> That is because hashlib-blake2.rst is explicitly added to the TOC list in Doc/library/crypto.rst.

Yes. All rst should be explicitly added by `toctree` or `include`.

In this case, I feel there are no reason to use `include` directive
instead of merging two files.

Another option is adding `toctree` directive in `hashlib.rst`.
But it means we should organize to use sub toctree, like Doc/library/asyncio.rst.
msg284073 - (view) Author: Inada Naoki (methane) * (Python committer) Date: 2016-12-27 08:46
> INADA, 3.6 branch also suffers the problems here, I didn't see you patch it.

Oh, I'm sorry.
I'll update 3.6 branch in next time.
msg284376 - (view) Author: Inada Naoki (methane) * (Python committer) Date: 2016-12-31 07:58
May I commit merge-hashlib-blake2.patch to 3.6 branch?
msg285358 - (view) Author: Inada Naoki (methane) * (Python committer) Date: 2017-01-13 01:26
@christian.heimes Would you look merge-hashlib-blake2.patch?
This is blocker of our document translation project.
msg285359 - (view) Author: Xiang Zhang (xiang.zhang) * (Python committer) Date: 2017-01-13 02:41
Although I am +1 for merging it before but these days I find it's not the only case. There are also two unittest.mock entries. This is just FYI, no opinion on this issue.
msg285368 - (view) Author: Christian Heimes (christian.heimes) * (Python committer) Date: 2017-01-13 08:14
Go ahead if it makes your work easier. I kept the file separate because the blake2 documentation is maintained externally. It's not going to change any time soon, though. Let's merge it.
msg285378 - (view) Author: Roundup Robot (python-dev) (Python triager) Date: 2017-01-13 10:31
New changeset 799ed3122456 by INADA Naoki in branch '3.6':
Issue #29062: Merge hashlib-blake2.rst into hashlib.rst
https://hg.python.org/cpython/rev/799ed3122456

New changeset 380e63b7fc82 by INADA Naoki in branch 'default':
Issue #29062: Merge hashlib-blake2.rst into hashlib.rst
https://hg.python.org/cpython/rev/380e63b7fc82
msg285379 - (view) Author: Inada Naoki (methane) * (Python committer) Date: 2017-01-13 10:32
Thanks.
msg285460 - (view) Author: Martin Panter (martin.panter) * (Python committer) Date: 2017-01-14 06:54
Looks like Doc/tools/susp-ignored.csv needs updating:

$ make -C Doc/ suspicious
[. . .]
writing output... [ 49%] library/hashlib                                        
WARNING: [library/hashlib:502] ":vatrogasac" found in ">>> cookie = b'user:vatrogasac'"
WARNING: [library/hashlib:502] ":vatrogasac" found in "user:vatrogasac,349cf904533767ed2d755279a8df84d0"
WARNING: [library/hashlib:502] ":policajac" found in ">>> compare_digest(b'user:policajac', sig)"
WARNING: [library/hashlib:646] ":LEAF" found in "... h00 = blake2b(buf[0:LEAF_SIZE], fanout=FANOUT, depth=DEPTH,"
[. . .]
WARNING: Found 4/327 unused rules:
library/hashlib-blake2,,:vatrogasac,>>> cookie = b'user:vatrogasac'
library/hashlib-blake2,,:vatrogasac,user:vatrogasac,349cf904533767ed2d755279a8df84d0
library/hashlib-blake2,,:policajac,>>> compare_digest(b'user:policajac', sig)
library/hashlib-blake2,,:LEAF,h00 = blake2b(buf[0:LEAF_SIZE], fanout=FANOUT, depth=DEPTH,
build finished with problems, 7 warnings.
make[1]: *** [build] Error 1
make[1]: Leaving directory `/media/disk/home/proj/python/cpython/Doc'
Suspicious check complete; look for any errors in the above output or in build/suspicious/suspicious.csv.  If all issues are false positives, append that file to tools/susp-ignored.csv.
make: *** [suspicious] Error 1
msg285476 - (view) Author: Roundup Robot (python-dev) (Python triager) Date: 2017-01-14 12:05
New changeset ea0c488b9bac by INADA Naoki in branch '3.6':
Issue #29062: Doc: Fix make suspicious
https://hg.python.org/cpython/rev/ea0c488b9bac

New changeset 5c48fbe12cb8 by INADA Naoki in branch 'default':
Issue #29062: Doc: Fix make suspicious
https://hg.python.org/cpython/rev/5c48fbe12cb8
msg285477 - (view) Author: Inada Naoki (methane) * (Python committer) Date: 2017-01-14 12:06
Martin, thank you for pointing it out.
I hadn't know about suspicious check.
History
Date User Action Args
2022-04-11 14:58:41adminsetgithub: 73248
2017-01-14 13:53:30methanesetstatus: open -> closed
2017-01-14 12:06:30methanesetmessages: + msg285477
2017-01-14 12:05:06python-devsetmessages: + msg285476
2017-01-14 06:54:13martin.pantersetstatus: closed -> open

messages: + msg285460
2017-01-13 10:32:30methanesetstatus: open -> closed
resolution: fixed
messages: + msg285379

stage: resolved
2017-01-13 10:31:28python-devsetmessages: + msg285378
2017-01-13 08:14:13christian.heimessetmessages: + msg285368
2017-01-13 02:41:34xiang.zhangsetmessages: + msg285359
2017-01-13 01:26:57methanesetmessages: + msg285358
2016-12-31 08:02:24serhiy.storchakasetnosy: + r.david.murray, martin.panter
2016-12-31 07:58:21methanesetmessages: + msg284376
2016-12-27 08:54:35methanesetfiles: + merge-hashlib-blake2.patch
2016-12-27 08:46:40methanesetmessages: + msg284073
2016-12-27 08:04:36methanesetmessages: + msg284071
2016-12-27 07:44:29serhiy.storchakasetmessages: + msg284070
2016-12-27 07:06:29xiang.zhangsetmessages: + msg284069
2016-12-27 06:50:35methanesetstatus: closed -> open
resolution: fixed -> (no value)
messages: + msg284067

stage: resolved -> (no value)
2016-12-27 06:07:26python-devsetmessages: + msg284066
2016-12-27 05:08:37xiang.zhangsetmessages: + msg284063
2016-12-27 03:28:27methanesetstatus: open -> closed
resolution: fixed
stage: commit review -> resolved
2016-12-27 03:20:01python-devsetnosy: + python-dev
messages: + msg284055
2016-12-26 13:37:15serhiy.storchakasetassignee: docs@python -> methane
messages: + msg284030
stage: commit review
2016-12-26 10:48:49methanesetfiles: + 29062-currentmodule.patch
keywords: + patch
messages: + msg284022
2016-12-25 06:47:58serhiy.storchakasetnosy: + serhiy.storchaka
messages: + msg283986
2016-12-25 01:19:51methanesetnosy: + methane
messages: + msg283978
2016-12-24 12:52:42xiang.zhangsetnosy: + xiang.zhang
messages: + msg283948
2016-12-24 09:40:11serhiy.storchakasetnosy: + georg.brandl, gregory.p.smith, christian.heimes
title: Documentation link error -> hashlib documentation link error

versions: + Python 3.7
2016-12-24 09:21:43frankmillmancreate