[issue39364] Automatically tabulate module contents in the docs

2020-01-16 Thread alex c


New submission from alex c :

By default, the docs.python.org page for a module does not list or tabulate the 
contents of that module. This makes it difficult to browse a module's functions 
or get a bird's-eye view.

For example, the logging module 
(https://docs.python.org/3/library/logging.html) has almost 70 functions, 
methods, and attributes. But it's impossible to scan them without scrolling the 
entire length of the entry (~18 pages of US letter). Compare to the 
browsability of itertools (https://docs.python.org/3/library/itertools.html), 
which manually tabulates its functions in the first section.

docs.python.org should automatically generate a TOC of the module's contents 
(classes, functions, etc) in the navigation sidebar, below the existing sidebar 
sections (perhaps in a collapsible section). Rust's documentation does this 
(example: https://doc.rust-lang.org/std/time/struct.Duration.html), and 
doc.rust-lang.org also effectively allows the entire page to function as a TOC 
by providing a "collapse page" button.

--
assignee: docs@python
components: Documentation
messages: 360148
nosy: alexchandel, docs@python
priority: normal
severity: normal
status: open
title: Automatically tabulate module contents in the docs
type: enhancement
versions: Python 2.7, Python 3.5, Python 3.6, Python 3.7, Python 3.8, Python 3.9

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



[issue41297] Remove doctest import from heapq

2020-07-14 Thread alex c


New submission from alex c :

heapq.py imports doctest in the last 4 lines to perform unit tests:

if __name__ == "__main__":

import doctest # pragma: no cover
print(doctest.testmod()) # pragma: no cover

This disrupts dependency tracking modules and software, like modulegraph and 
pyinstaller, as doctest brings in many dependencies (including ctypes as of 
3.8).

This functionality could be factored out into a separate unit-testing file.

--
components: Tests
messages: 373658
nosy: alexchandel
priority: normal
severity: normal
status: open
title: Remove doctest import from heapq
type: resource usage
versions: Python 3.10, Python 3.5, Python 3.6, Python 3.7, Python 3.8, Python 
3.9

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