[IPython-dev] Shutdown __del__ methods bug
Sat Oct 16 11:16:05 CDT 2010
On Sat, Oct 16, 2010 at 8:29 AM, Thomas Kluyver <firstname.lastname@example.org> wrote:
> Unfortunately, this commit appears to have undone Fernando's fix for the bug
> with __del__ methods that I found:
> I can reproduce the bug in trunk. This also highlights that the doctest to
> catch it evidently doesn't do so. Running iptest IPython.core shows the
> error message on the console (among the ... of passed tests), but it doesn't
> fail. I'm not a console ninja, but could it be that the message goes to
> stderr, and the evaluation only checks stdout?
Ouch, thanks for catching that... Your intuition is indeed correct:
and the problem is that this exception is caught internally by python
itself, and not accessible to us by normal mechanisms.
We may try to hack either by redirecting sys.stderr to sys.stdout
temporarily, or replacing sys.excepthook. If you can have a go at
these and find something interesting please let us know, I'm at a
conference this weekend with very limited time.
More information about the IPython-dev