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: pydoc includes unnecessary files for a package.
Type: enhancement Stage: test needed
Components: Library (Lib) Versions: Python 2.7
process
Status: closed Resolution: rejected
Dependencies: Superseder:
Assigned To: Nosy List: belyi, georg.brandl
Priority: normal Keywords: easy, patch

Created on 2005-06-09 23:38 by belyi, last changed 2022-04-11 14:56 by admin. This issue is now closed.

Files
File name Uploaded Description Edit
pydoc__all__.patch belyi, 2005-06-10 02:18 Patch adding visiblename(modname, all) check for Package Contents
Messages (3)
msg25518 - (view) Author: Igor Belyi (belyi) Date: 2005-06-09 23:38
PyDoc lists all files present in a package directory in
a "Package Contents" table instead of only the ones
listed in __all__ variable in __init__.py file.

This is very inconvenient for packages which are
wrappers for some C library since the shared library
and a Wrapper get the reference on the package page but
then they do not have any comments and their pages are
not generated. As a result package page has those
annoying dead links.

One can probably fix this by creating a special dummy
pages for those unused files but it's an agly solution.
I do believe that using __all__ variable from
__init__.py file when it is defined is more appropriate
way to know what files represent the contents of the
package.

Cheers,
Igor
msg25519 - (view) Author: Igor Belyi (belyi) Date: 2005-06-10 02:18
Logged In: YES 
user_id=995711

Interestingly, the patch to do this is very small since
__all__ variable is already heavy used for other items.

Hope it will help,
Igor
msg85530 - (view) Author: Georg Brandl (georg.brandl) * (Python committer) Date: 2009-04-05 17:21
I don't think that it is common practice to list submodules in __all__,
only names really exported from the package.  Therefore, this does not
seem like a good change to make.
History
Date User Action Args
2022-04-11 14:56:11adminsetgithub: 42069
2009-04-05 17:21:58georg.brandlsetstatus: open -> closed

nosy: + georg.brandl
messages: + msg85530

resolution: rejected
2009-02-16 02:25:35ajaksu2setkeywords: + patch, easy
stage: test needed
type: enhancement
components: + Library (Lib), - Extension Modules
versions: + Python 2.7, - Python 2.4
2005-06-09 23:38:39belyicreate