[issue41297] Remove doctest import from heapq

Steven D'Aprano report at bugs.python.org
Tue Jul 14 18:56:08 EDT 2020


Steven D'Aprano <steve+python at pearwood.info> added the comment:

The idiom of a module running doctests on itself when executed as a script is a common idiom.

If modulegraph and pyinstaller can't cope a module importing another module from inside an if statement, that's a bug in them, not in the heapq module (and many others).

This requested change is a regression, taking away functionality. 3.8 and older are in feature freeze, so this could only apply to 3.9 and 3.10, and even then, I do not believe it should apply at all.

----------
nosy: +steven.daprano
versions:  -Python 3.5, Python 3.6, Python 3.7, Python 3.8

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue41297>
_______________________________________


More information about the Python-bugs-list mailing list