On Jan 26, 2007, at 6:05 PM, Jonathan Ellis wrote:
> > On 1/26/07, Michael Bayer <[EMAIL PROTECTED]> wrote: >> >> doing away with the __del__() thing ? what would we gain by >> removing the __del__() call ? > > relying on it is buggy. so why have it? youre basically saying, "do away with implicit execution". which is the ability to say somestatement.execute(). since if everyone has to try/finally with a close() or whatever, youre pretty much going to want to say conn = engine.connect() / conn.execute(statement) / conn.close()....remembering to pull it off of arbitrary execute()'s is not really worth it. this is nothing new, its the exact same paradigm presented to me at the end of the 0.1 series, so i came up with an entirely new way to do everything, i.e. explicit execution via Connection. some people wanted to do it that way, so i gave it to them. at the end of the day, and after all that pain i put on everyone to upgrade when i put out the 0.2 series, 99% of all examples people mail to me (including yours) still use implicit execution totally. i think the __del__() thing works just fine for a huge set of use cases...if youre writing some application where you want to totally control your connections, then you dont use it. we can add an option to disable it (or raise an assertion) for those apps that want to insure they arent relying upon it. i dont think theres too many situations where reliance upon __del__() is going to realistically cause an app to totally hang. if you artificially set a connection pool to exactly one connection and to indefinitely hang on a subsequent request, and then create a command line app that just holds its state statically at that point of hang, then yes youre going to hang. but a web application thats doing requests and then garbage collecting the full state of that request each time....i dont see it happening. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "sqlalchemy" group. To post to this group, send email to [email protected] 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 -~----------~----~----~----~------~----~------~--~---
