[issue15816] pydoc.py uses a hack that depends on implementation details and breaks help() when __builtin__.__import__ is overwritten.

2012-08-29 Thread David Kreuter
New submission from David Kreuter: help(compile) # this works import __builtin__ real_import = __import__ __builtin__.__import__ = lambda *a: real_import(*a) help(compile) # this fails The line responsible for this is in pydoc.py around line 300: ... elif exc is ImportError and

[issue15816] pydoc.py uses a hack that depends on implementation details and breaks help() when __builtin__.__import__ is overwritten.

2012-08-29 Thread R. David Murray
R. David Murray added the comment: Replacing __import__ is not supported. That said, this is fixed in 3.3. -- nosy: +r.david.murray resolution: - out of date stage: - committed/rejected status: open - closed type: - behavior versions: +Python 3.3 -Python 2.7, Python 3.1, Python 3.2