[issue20703] RuntimeError caused by lazy imports in pdb

Xavier de Gaye report at bugs.python.org
Thu Feb 26 12:03:06 CET 2015


Xavier de Gaye added the comment:

> I can reproduce this on Windows 8.1 with 3.4.3 but cannot do so with 3.5.0a1.

I can still reproduce this on linux on today's tip:
'3.5.0a1+ (default:7185a35fb293, Feb 26 2015, 11:27:11) \n[GCC 4.9.2 20150204 (prerelease)]'.

Maybe you tried reproducing it with the interactive interpreter. When this code
is run from the interactive interpreter and not as a script as suggested in the
initial post, then readline is already imported by the interpreter at startup
and the RuntimeError is not raised.

Also interestingly, the bdb module takes lot of steps to ensure that linecache
and reprlib are lazyly imported, but pdb and bdb cannot do anything interesting
without these modules.

----------

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue20703>
_______________________________________


More information about the Python-bugs-list mailing list