[New-bugs-announce] [issue28908] pydoc getdocloc() is broken

Neil Schemenauer report at bugs.python.org
Thu Dec 8 14:24:29 EST 2016


New submission from Neil Schemenauer:

The getdocloc() method in pydoc.py is supposed to return the doc location for modules.  It uses a 'basedir' parameter that is supposed to point to the location of the standard library modules.

That logic is broken for a number of different scenarios, I think.  One is if you build Python in a sub-directory, not in the root of the source tree.  Another I think is if you are using a Zip file for the std lib.

Fixing this properly is not so easy.  One solution would be to explictly mark modules that have docs available.  E.g. create a __pydoc global variable or similar that the 'pydoc' module to inspect.  That would have to be done on every module that has documentation.

Another idea is at build time, crawl through Doc/library and generate a list of modules that have docs.  That's a bit tricky because that generation needs to work on all platforms that Python is built on.

A third idea is to manually add the list to the pydoc.py module.  When new documentation is created under Doc/library, that list would have to be updated.

----------
components: Library (Lib)
messages: 282729
nosy: nascheme
priority: normal
severity: normal
stage: needs patch
status: open
title: pydoc getdocloc() is broken
type: behavior
versions: Python 3.7

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue28908>
_______________________________________


More information about the New-bugs-announce mailing list