[issue28908] pydoc getdocloc() is broken

2018-09-18 Thread Karthikeyan Singaravelan


Change by Karthikeyan Singaravelan :


--
nosy: +xtreak

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue28908] pydoc getdocloc() is broken

2016-12-08 Thread R. David Murray

R. David Murray added the comment:

It is possible that we only care about this for release builds.  I don't think 
maintain a hard-coded, hand-coded list is a good idea, regardless.  There might 
be some way to generate it at build time, though.

--
nosy: +r.david.murray

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue28908] pydoc getdocloc() is broken

2016-12-08 Thread Neil Schemenauer

Neil Schemenauer added the comment:

Attached is a first pass at the idea of just keeping a list of standard modules 
that have docs.  I generated the list with:

$ (cd Doc/library; ls *.rst | sed 's/.rst//')

Probably that should be incorporated into the Doc/Makefile somehow.

Perhaps instead of generating a text file, we should generate a Python module 
that contains a set literal, e.g. Lib/pydoc_data/libs.py.  That would have the 
advantage of working for frozen distributions or stdlib as Zip files.

--
Added file: http://bugs.python.org/file45801/pydoc_getdocloc.txt

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue28908] pydoc getdocloc() is broken

2016-12-08 Thread Neil Schemenauer

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 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com