Author tim.peters
Date 2001-11-27.23:36:47
SpamBayes Score
Marked as misclassified
Logged In: YES 

I repaired the tstate->recursion_depth counter for this 
case, in

Python/ceval.c; new revision: 2.291

It doesn't help much, though -- there are so many C stack 
frames per Python level here that sys.setrecursionlimit() 
has to be cranked way down from the default to do any 
good.  Even if you do that, the resulting "maximum 
recursion depth exceeded" exception occurs in a destructor 
so is ignored (you get a msg on a stderr, but the exception 
doesn't propagate outside the __del__ method -- note that 
this is true of *any* exception raised when in a __del__).

Marking this Fixed since it's the best we can do with what 
we've got, and concerned users can force 
sys.setrecursionlimit() to a low value.  I'm not opposed to 
schemes to guess stack limits in some other way, but 
discussion of that doesn't belong in this bug report, and 
we've already got the platform-dependent PyOS_CheckStack() 
gimmick that doesn't appear to be worth having anyway.
Date User Action Args
2007-08-23 13:57:28adminlinkissue483469 messages
2007-08-23 13:57:28admincreate