Re: [sqlalchemy] Re: blocking on Base.metadata.drop_all() in test
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. Ctrl-C does nothing when it blocks. Chris, try running the script in the link, and let me know if you are able to reproduce the issue 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 process, because ^C doesn't help. I will check with pudb this afternoon to see if I can bring more data. I'm using sqlalchemy 0.6.1 Mariano -- You received this message because you are subscribed to the Google Groups sqlalchemy group. To post to this group, send email to sqlalch...@googlegroups.com. To unsubscribe from this group, send email to sqlalchemy+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/sqlalchemy?hl=en.
[sqlalchemy] Re: blocking on Base.metadata.drop_all() in test
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 process, because ^C doesn't help. I will check with pudb this afternoon to see if I can bring more data. I'm using sqlalchemy 0.6.1 Mariano -- You received this message because you are subscribed to the Google Groups sqlalchemy group. To post to this group, send email to sqlalch...@googlegroups.com. To unsubscribe from this group, send email to sqlalchemy+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/sqlalchemy?hl=en.
Re: [sqlalchemy] Re: blocking on Base.metadata.drop_all() in test
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 mtam...@gmail.com wrote: 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. Ctrl-C does nothing when it blocks. Chris, try running the script in the link, and let me know if you are able to reproduce the issue -- You received this message because you are subscribed to the Google Groups sqlalchemy group. To post to this group, send email to sqlalch...@googlegroups.com. To unsubscribe from this group, send email to sqlalchemy+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/sqlalchemy?hl=en. -- You received this message because you are subscribed to the Google Groups sqlalchemy group. To post to this group, send email to sqlalch...@googlegroups.com. To unsubscribe from this group, send email to sqlalchemy+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/sqlalchemy?hl=en.
Re: [sqlalchemy] Re: blocking on Base.metadata.drop_all() in test
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 project and it get stuck while dropping the tables. I have to kill the process, because ^C doesn't help. I will check with pudb this afternoon to see if I can bring more data. I'm using sqlalchemy 0.6.1 Mariano Zende, that's right: psql 8.4.4 Mariano -- You received this message because you are subscribed to the Google Groups sqlalchemy group. To post to this group, send email to sqlalch...@googlegroups.com. To unsubscribe from this group, send email to sqlalchemy+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/sqlalchemy?hl=en.
[sqlalchemy] Re: blocking on Base.metadata.drop_all() in test
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 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(). -- You received this message because you are subscribed to the Google Groups sqlalchemy group. To post to this group, send email to sqlalch...@googlegroups.com. To unsubscribe from this group, send email to sqlalchemy+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/sqlalchemy?hl=en.
[sqlalchemy] Re: blocking on Base.metadata.drop_all() in test
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 to this group, send email to sqlalch...@googlegroups.com. To unsubscribe from this group, send email to sqlalchemy+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/sqlalchemy?hl=en.