[sqlalchemy] sqlalchemy.util.queue.Empty

2013-11-24 Thread Sibylle Koczian
Hello, I'm using SQLAlchemy 0.8.3, psycopg2 2.5.1, Python 3.3.3 on Windows 7, PostgreSQL 9.3.1. No change to SQLAlchemy and psycopg2, update from Python 3.3.2 to 3.3.3 some days ago. Today I get this when trying to use this combination: Python 3.3.3 (v3.3.3:c3896275c0f6, Nov 18 2013,

[sqlalchemy] sqlalchemy.util.queue.Empty

2013-11-24 Thread Sibylle Koczian
Hello, I'm using SQLAlchemy 0.8.3, psycopg2 2.5.1, Python 3.3.3 on Windows 7, PostgreSQL 9.3.1. No change to SQLAlchemy and psycopg2, update from Python 3.3.2 to 3.3.3 some days ago. Today I get this when trying to use this combination: Python 3.3.3 (v3.3.3:c3896275c0f6, Nov 18 2013,

[sqlalchemy] Re: sqlalchemy.util.queue.Empty

2013-11-24 Thread Sibylle Koczian
Am 24.11.2013 13:33, schrieb Sibylle Koczian: Hello, I'm using SQLAlchemy 0.8.3, psycopg2 2.5.1, Python 3.3.3 on Windows 7, PostgreSQL 9.3.1. No change to SQLAlchemy and psycopg2, update from Python 3.3.2 to 3.3.3 some days ago. ... Sorry for the double posting, problems with my mail program.

Re: [sqlalchemy] Listener for metadata.create_all() event

2013-11-24 Thread Joseph Casale
I missed the obvious there on the choice of the target which caused my issues. Using @event.listens_for(Base.metadata, 'after_create') worked. Thanks Michael, jlc On Fri, Nov 22, 2013 at 8:18 AM, Michael Bayer mike...@zzzcomputing.comwrote: there’s an after_create event:

[sqlalchemy] Join query syntax

2013-11-24 Thread Joseph Casale
I have some sqlite tables such as: CREATE TABLE table_a ( id INTEGER NOT NULL, table_b_id INTEGER NOT NULL, name VARCHAR, PRIMARY KEY (id), FOREIGN KEY(table_b_id) REFERENCES table_b (id) ON DELETE CASCADE ); CREATE TABLE table_b ( id INTEGER NOT NULL, table_c_id INTEGER NOT NULL, name VARCHAR,

[sqlalchemy] Filter options

2013-11-24 Thread Joseph Casale
I am trying to write a convenience wrapper something like: def wrapper(self, arg_a=None, arg_a=None): query = self.session.query(Table_A).\ filter(Table_A.col_a == arg_a, Table_A.col_b == arg_b).\ all() ... The actual query is much longer, none the

Re: [sqlalchemy] sqlalchemy.util.queue.Empty

2013-11-24 Thread Michael Bayer
On Nov 24, 2013, at 7:33 AM, Sibylle Koczian nulla.epist...@web.de wrote: Hello, I'm using SQLAlchemy 0.8.3, psycopg2 2.5.1, Python 3.3.3 on Windows 7, PostgreSQL 9.3.1. No change to SQLAlchemy and psycopg2, update from Python 3.3.2 to 3.3.3 some days ago. the error is emitted by

Re: [sqlalchemy] Join query syntax

2013-11-24 Thread Michael Bayer
On Nov 24, 2013, at 3:34 PM, Joseph Casale jcas...@gmail.com wrote: I have some sqlite tables such as: CREATE TABLE table_a ( id INTEGER NOT NULL, table_b_id INTEGER NOT NULL, name VARCHAR, PRIMARY KEY (id), FOREIGN KEY(table_b_id) REFERENCES table_b (id)

Re: [sqlalchemy] Filter options

2013-11-24 Thread Michael Bayer
On Nov 24, 2013, at 5:33 PM, Joseph Casale jcas...@gmail.com wrote: I am trying to write a convenience wrapper something like: def wrapper(self, arg_a=None, arg_a=None): query = self.session.query(Table_A).\ filter(Table_A.col_a == arg_a, Table_A.col_b == arg_b).\

Re: [sqlalchemy] Filter options

2013-11-24 Thread Joseph Casale
On Sunday, November 24, 2013 3:44:32 PM UTC-7, Michael Bayer wrote conditonals? Yeah, the queries are just so long and with all the combinations of possible criteria it would get out of hand as I have about 6 optional arguments. Currently I leverage one filter method and use eval on formatted

Re: [sqlalchemy] sqlalchemy.util.queue.Empty

2013-11-24 Thread Michael Bayer
I just did a fresh build of Python 3.3.3 on OSX, upgrading from 3.3.2, didn’t re-install psycopg2, and I’m able to connect via SQLAlchemy. So the issue might be local to windows. On Nov 24, 2013, at 5:39 PM, Michael Bayer mike...@zzzcomputing.com wrote: On Nov 24, 2013, at 7:33 AM,