8 messages in com.googlegroups.sqlalchemy[sqlalchemy] Re: is pool supposed to ...
FromSent OnAttachments
Jonathan Ellis25 Jan 2007 12:54 
Michael Bayer25 Jan 2007 13:54 
Jonathan Ellis25 Jan 2007 14:07 
Jonathan Ellis26 Jan 2007 12:39 
Michael Bayer26 Jan 2007 14:49 
Michael Bayer26 Jan 2007 15:05 
Jonathan Ellis26 Jan 2007 15:05 
Michael Bayer26 Jan 2007 20:03 
Subject:[sqlalchemy] Re: is pool supposed to be able to handle its target db restarting?
From:Michael Bayer (zzz@gmail.com)
Date:01/26/2007 03:05:16 PM
List:com.googlegroups.sqlalchemy

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)

actually scratch that, the unit tests themselves call a bunch of insert() and delete() executes for which they dont close the result set (and therefore __del__ is what returns the connection in those cases). If i remove the __del__ from pool.py, change line 69 of test/orm/polymorph.py to close() the result of the table delete, and then run the test with --mockpool (asserts only one connection used throughout the app), all tests pass, which is a few dozen full blown round trips through the mapper/session. so the ORM is closing everything it opens.