[issue28451] pydoc.safeimport() raises ErrorDuringImport() if __builtin__.__import__ is monkey patched

2021-09-06 Thread Irit Katriel
Irit Katriel added the comment: It is no longer using the traceback check: https://github.com/python/cpython/blob/37272f5800ee1e9fcb2da4a1766366519b9b3d94/Lib/pydoc.py#L445 -- nosy: +iritkatriel resolution: -> out of date stage: -> resolved status: open -> closed

[issue28451] pydoc.safeimport() raises ErrorDuringImport() if __builtin__.__import__ is monkey patched

2016-10-16 Thread R. David Murray
R. David Murray added the comment: Can you provide a test case that shows when this condition might occur? We'd want a test in any case if we accept the patch. -- nosy: +r.david.murray ___ Python tracker

[issue28451] pydoc.safeimport() raises ErrorDuringImport() if __builtin__.__import__ is monkey patched

2016-10-15 Thread Joon-Kyu Park
New submission from Joon-Kyu Park: `pydoc.safeimport()` should return `None` if the module isn't found. If Python's default `__import__` is monkey patched, (e.g., by using gevent) the function misbehaves. According to the current implementation, the function returns `None` by checking the only