[Python-Dev] More fun with Python shutdown

Thomas Heller theller at python.net
Wed Nov 12 12:13:44 EST 2003

"Tim Peters" <tim.one at comcast.net> writes:

> That's almost certainly a bug in Python, but is almost certainly unrelated
> to the problem Jim is having.
> I was able to make your test case substantially smaller.  The key is that
> the "remove" callback trigger gc.  Apart from that, it doesn't matter at all
> what "remove" does.  I don't know what the bug is, though, and since the
> last of these consumed more than a day to track down and fix, I don't
> anticipate having time to do that again:

Thanks.  I've submitted a bug http://www.python.org/sf/840829 for it.
I have the impression that I'm not able to fix the bug myself, although
I consider it a critical bug since it basically makes weakref callbacks
unusable because gc can occur at any time.

My workaround for now is to disable gc as the fist action in the
callback and enable it again as the last action, but I'm unconvinced
that this does really help in all cases.


More information about the Python-Dev mailing list