On Nov 12, 2012, at 9:37 PM, Michael Bayer wrote: > > On Nov 12, 2012, at 5:33 PM, Torsten Landschoff wrote: > >> >> BTW, I found one offender that breaks running database upgrades with my >> locking schemes: >> >> from sqlalchemy import * >> from sqlalchemy.pool import * >> >> engine = create_engine("sqlite:////home/torsten/some.db", >> poolclass=AssertionPool) >> conn = engine.connect() >> metadata = MetaData(conn, reflect=True) >> >> This results in the following backtrace here: >> >> raise AssertionError("connection is already checked out" + suffix) >> AssertionError: connection is already checked out at: >> File "demo.py", line 5, in <module> >> conn = engine.connect() >> >> I would have expected it to reflect using the connection passed to the >> MetaData constructor. > > if so then that's a bug, added http://www.sqlalchemy.org/trac/ticket/2604 to > take a look at that.
I've no idea how that silly API got in there, but seems a bit late to remove it. I'm going to deprecate it though, for now use this form: m = MetaData() m.reflect(conn) > > > -- > You received this message because you are subscribed to the Google Groups > "sqlalchemy" group. > To post to this group, send email to sqlalchemy@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 sqlalchemy@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.