doing away with the __del__() thing ? what would we gain by removing the __del__() call ? one thing I should do is insure ORM etc. do not rely upon __del__() (which they shouldnt, although I just tested with the AssertionPool and...surprise)
i dont see how this issue is a problem in the practical sense, if you have a connection pool with a reasonable size and a little bit of overflow, how many stack trace structures are going to hang around indefinitely in memory ? On Jan 26, 2007, at 3:40 PM, Jonathan Ellis wrote: > > So it turns out that in my script to reproduce the problem with just > Pool (http://deadbeefbabe.org/paste/3447) the reason the > ConnectionFairy __del__ isn't getting called after the exception is, > python's internal exception structures still have a reference to it. > If you change except: print to except: sys.exc_clear() the problem > goes away. (The problem of indefinite hanging, that is.) > > Unfortunately I can't think of a way to fix this other than not > relying on __del__ and saying, "thou shalt wrap all connection usage > with try/finally: close()." Which isn't bad in 2.5 (with new > ContextManager support) but kinda bites in earlier pythons. > > I'm willing to make this change if you want. > > > --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "sqlalchemy" group. To post to this group, send email to sqlalchemy@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/sqlalchemy?hl=en -~----------~----~----~----~------~----~------~--~---