Currently, merely importing ipdb causes it to initialize IPython. In turn, among other things, IPython installs its excepthook. Therefore on programs that import ipdb, the default exception behaviour is already wrapped with IPython's, even when both ipdb and IPython aren't run.
For example, take this program:
$ cat test.py
import ipdb
1 / 0
Running it with the latest master of ipdb, and most released versions, gives this error message:
$ python test.py
Traceback (most recent call last):
File "/.../ipdb/test.py", line 3, in <module>
1 / 0
ZeroDivisionError: division by zero
If you suspect this is an IPython 7.21.0 bug, please report it at:
https://github.com/ipython/ipython/issues
or send an email to the mailing list at ipython-dev@python.org
You can print a more detailed traceback right now with "%tb", or use "%debug"
to interactively debug it.
Extra-detailed tracebacks for bug-reporting purposes can be enabled via:
%config Application.verbose_crash=True
The IPython banner doesn't make any sense since, whilst instantiated, IPython was not used. I'd expect only Python's default exception output:
python test.py
Traceback (most recent call last):
File "/.../ipdb/test.py", line 3, in <module>
1 / 0
ZeroDivisionError: division by zero
This probably affects a lot of users through at least Django's test runner, which imports ipdb if available.
Currently, merely importing
ipdb
causes it to initialize IPython. In turn, among other things, IPython installs its excepthook. Therefore on programs that importipdb
, the default exception behaviour is already wrapped with IPython's, even when both ipdb and IPython aren't run.For example, take this program:
Running it with the latest
master
ofipdb
, and most released versions, gives this error message:The IPython banner doesn't make any sense since, whilst instantiated, IPython was not used. I'd expect only Python's default exception output:
This probably affects a lot of users through at least Django's test runner, which imports
ipdb
if available.