Re: [sqlalchemy] Problems handling an Amazon RDS Multi-AZ failover with SqlSoup and SqlAlchemy 0.7.8

2012-11-15 Thread JonathanQ
Thanks Michael - I think I am starting to see where we have gone wrong with our session handling. Looks like calling remove() on the session at the end of a unit of work is probably the best approach. Here is a bit more detail on what these applications are doing - and perhaps you can

[sqlalchemy] v0.7.9 text() and multi-row inserts failing - sqlite driver issue?

2012-11-15 Thread Adam Venturella
Maybe I am just doing something wrong, but I have been fighting with this for a while to no avail. Here's my code: query = '''INSERT INTO users_roles (user_id, role_id) VALUES (:user_id, :perm0), (:user_id, :perm1)''' t = text(query).execution_options(autocommit=True) self.conn.execute(t,

Re: [sqlalchemy] v0.7.9 text() and multi-row inserts failing - sqlite driver issue?

2012-11-15 Thread Michael Bayer
On Nov 15, 2012, at 2:43 PM, Adam Venturella wrote: Maybe I am just doing something wrong, but I have been fighting with this for a while to no avail. Tried it with the stdlib sqlite3 driver as well, it fails there too: import sqlite3 conn = sqlite3.connect('example.db') c =

Re: [sqlalchemy] _DBProxy.dispose() doesn't actually dispose of the pool/connections?

2012-11-15 Thread Michael Bayer
On Nov 15, 2012, at 7:26 PM, Carl Meyer wrote: Hi, I'm using SQLAlchemy's connection pool implementation directly (via manage() and _DBProxy), and it seems to me that _DBProxy does not dispose of its pools/connections the way that the documentation/docstrings/method names seem to imply it

Re: [sqlalchemy] Re: Is it possible to define multiple model objects that refer to the same table?

2012-11-15 Thread Michael Bayer
On Nov 15, 2012, at 7:33 PM, Rob Crowell wrote: Sorry, that got cut off at the end. class IssueTag(Base): __tablename__ = 'issue_user_tag' sqlalchemy.exc.InvalidRequestError: Table 'issue_user_tag' is already defined for this MetaData instance. Specify 'extend_existing=True' to

[sqlalchemy] adding an association_proxy to mapper properties?

2012-11-15 Thread Gerald Thibault
I have an association proxy set up to proxy an attribute from a parent to a one to one child. That proxied column does not show when I do class.__mapper__.iterate_properties. How would I go about adding a property so the proxied columns are exposed via iterate_properties? I'll add some code if