Re: [sqlalchemy] Re: blocking on Base.metadata.drop_all() in test

2010-07-08 Thread Mariano Mara
Excerpts from zende's message of Thu Jul 08 13:27:27 -0300 2010: I reproduced the issue the script below: http://gist.github.com/468199 Sorry for the weak explanation before. This has little to do with being in tests except that's the only code that drops and creates the db for any reason.

[sqlalchemy] Re: blocking on Base.metadata.drop_all() in test

2010-07-08 Thread zende
Mariano, What db? postgres? On Jul 8, 9:41 am, Mariano Mara mariano.m...@gmail.com wrote: I'm on a similar situation. For lack of time I couldn't investigate it yet but I have a drop_all when running nosetests in my pylons project and it get stuck while dropping the tables. I have to kill the

Re: [sqlalchemy] Re: blocking on Base.metadata.drop_all() in test

2010-07-08 Thread jason kirtland
Your scoped session still has an active connection, which is blocking the drop. Call session.remove() before the drop, or configure the session with expires_on_commit=False to not issue SELECTs to fetch object state after the final commit(). On Thu, Jul 8, 2010 at 9:27 AM, zende

Re: [sqlalchemy] Re: blocking on Base.metadata.drop_all() in test

2010-07-08 Thread Mariano Mara
Excerpts from zende's message of Thu Jul 08 14:01:32 -0300 2010: Mariano, What db? postgres? On Jul 8, 9:41 am, Mariano Mara mariano.m...@gmail.com wrote: I'm on a similar situation. For lack of time I couldn't investigate it yet but I have a drop_all when running nosetests in my pylons

[sqlalchemy] Re: blocking on Base.metadata.drop_all() in test

2010-07-08 Thread zende
Jason, in the contrived example I came up with and posted, your solution worked but not in my tests. I tried both expires_on_commit=False and Session.remove() before the drop with no luck. Thanks for the suggestion On Jul 8, 10:03 am, jason kirtland j...@discorporate.us wrote: Your scoped

[sqlalchemy] Re: blocking on Base.metadata.drop_all() in test

2010-07-08 Thread zende
nope. Jason was right :D. I needed to add Session.remove() to my threads as well; though, I'm not sure why adding expires_on_commit=False alone didn't solve it. Oh well, works now Thanks! -- You received this message because you are subscribed to the Google Groups sqlalchemy group. To post