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: ConfigParser: cannot link to ConfigParser.optionxform(option)
Type: Stage:
Components: Documentation Versions:
process
Status: open Resolution:
Dependencies: Superseder:
Assigned To: docs@python Nosy List: docs@python, jugmac00, shreyanavigyan
Priority: normal Keywords:

Created on 2021-05-05 06:48 by jugmac00, last changed 2022-04-11 14:59 by admin.

Files
File name Uploaded Description Edit
Screenshot from 2021-05-05 08-46-05.png jugmac00, 2021-05-05 06:48
Messages (5)
msg392977 - (view) Author: Jürgen Gmach (jugmac00) * Date: 2021-05-05 06:48
I wanted to copy a hyperlink to the documentation section for ConfigParser's optionxform method, but in https://docs.python.org/3/library/configparser.html you cannot link to this one section, as the paragraph was marked with `:noindex:` via https://github.com/python/cpython/pull/21859 / bpo-40204

The `:noindex:` workaround was introduced to silence doc build errors which came with a new Sphinx version.

Without the workaround, you get errors like...

P.S.: I uploaded a screenshot of the documentation section showing the heading before optionxform has a permalink, optionsxform does not.


Warning, treated as error:
/home/jugmac00/Projects/cpython/Doc/library/configparser.rst:1170:duplicate object description of configparser.ConfigParser.optionxform, other instance in library/configparser, use :noindex: for one of them
Makefile:49: recipe for target 'build' failed
make: *** [build] Error 2

Looks like a possible fix to this problem would involve a major restructuring of the configparser documentation, to avoid the "duplicated object description".

Maybe there is a simpler solution?
msg392979 - (view) Author: Shreyan Avigyan (shreyanavigyan) * Date: 2021-05-05 07:07
No there's a hyperlink. See here https://docs.python.org/3/library/configparser.html#configparser.ConfigParser.optionxform. There's two duplicate definitions of ConfigParser.optionxform in configparser.html. One gives examples, the other one gives definition.
msg392980 - (view) Author: Jürgen Gmach (jugmac00) * Date: 2021-05-05 07:12
Shreyan Avigyan, thanks for your feedback, but you are linking to the wrong section.

And yes I know, there are two sections describing `optionxform`, which is the root cause for this problem in the first place.

Anyway, I wanted to reference the section which I marked in the screenshot, and it is not possible to do so, because of the `:noxindex:` directive.
msg392981 - (view) Author: Shreyan Avigyan (shreyanavigyan) * Date: 2021-05-05 07:16
If that's the problem then what about merging the two sections together?
msg392990 - (view) Author: Jürgen Gmach (jugmac00) * Date: 2021-05-05 08:47
> If that's the problem then what about merging the two sections together?

That would be one solution, which I suggested in my initial comment:

> Looks like a possible fix to this problem would involve a major restructuring of the configparser documentation, to avoid the "duplicated object description".
History
Date User Action Args
2022-04-11 14:59:45adminsetgithub: 88210
2021-05-05 08:47:39jugmac00setmessages: + msg392990
2021-05-05 07:16:35shreyanavigyansetmessages: + msg392981
2021-05-05 07:12:10jugmac00setmessages: + msg392980
2021-05-05 07:07:08shreyanavigyansetnosy: + shreyanavigyan
messages: + msg392979
2021-05-05 06:48:11jugmac00create