[sqlalchemy] UnboundExecutionError gotcha when working with scoped_session

2010-07-13 Thread Steven Wei
I ran into an interesting behavior when working with SQLAlchemy 0.6.2 and scoped_sessions: if you instantiate a Session before you call Session.configure(bind=engine), none of the Sessions you create will be properly bound to the engine you configured. Here's a short sample snippet that

Re: [sqlalchemy] UnboundExecutionError gotcha when working with scoped_session

2010-07-13 Thread Michael Bayer
On Jul 13, 2010, at 5:18 PM, Steven Wei wrote: I ran into an interesting behavior when working with SQLAlchemy 0.6.2 and scoped_sessions: if you instantiate a Session before you call Session.configure(bind=engine), none of the Sessions you create will be properly bound to the engine you