Autogenerate regenerates base mixin FKs

2016-09-08 Thread Charles Chin
I have something similar to this setup from sqlalchemy.ext.declarative import declared_attr class BaseClass(object): @declared_attr def created_by return created_by = sa.Column(sa.Integer(), sa.ForeignKey()) class RealDBObject(BaseClass): Alembic with autogenerate always

Re: [sqlalchemy] Strange (Heisen)bug with dictionary association_proxy

2016-09-08 Thread Mike Bayer
On 09/08/2016 03:03 PM, Dominik George wrote: Hi, I am encountering a strange bug in my project OSMAlchemy: https://github.com/Natureshadow/OSMAlchemy/issues/4 The model is a lot like in this example: https://groups.google.com/group/sqlalchemy/attach/e0e54817232da/mwe.py?part=0.1=0=1 I

[sqlalchemy] Strange (Heisen)bug with dictionary association_proxy

2016-09-08 Thread Dominik George
Hi, I am encountering a strange bug in my project OSMAlchemy: https://github.com/Natureshadow/OSMAlchemy/issues/4 The model is a lot like in this example: https://groups.google.com/group/sqlalchemy/attach/e0e54817232da/mwe.py?part=0.1=0=1 I cannot make a real MWE for this bug because I really

Re: [sqlalchemy] Re: postgres/pyscopg failing to connect after a certain number of tests, stuck!

2016-09-08 Thread Jonathan Vanasco
On Thursday, September 8, 2016 at 12:32:41 PM UTC-4, Iain Duncan wrote: > > Hi Jonathan, sure can, here it is below. I think maybe this has something > to do with the fact that we are creating a new engine and dropping the > schema on each pass maybe? Because it seems to *only* happen when we

Re: [sqlalchemy] postgres/pyscopg failing to connect after a certain number of tests, stuck!

2016-09-08 Thread Iain Duncan
Thanks Mike! engine.dispose() fixed it. Makes sense that it was a garbage collection problem. For any others finding this, I just added a call to engine.dispose() to class level tearDown and it's all good. On Thu, Sep 8, 2016 at 10:39 AM, Iain Duncan wrote: > I've

Re: [sqlalchemy] postgres/pyscopg failing to connect after a certain number of tests, stuck!

2016-09-08 Thread Iain Duncan
I've discovered too that the issue only happens when all my test suites get called from one call to discovery. I've I run then in 8 calls (one to each package, with each holding 1 to 5 test suites of about 1 to 10 tests each), there's no issue. :-/ iain On Thu, Sep 8, 2016 at 10:36 AM, Iain

Re: [sqlalchemy] postgres/pyscopg failing to connect after a certain number of tests, stuck!

2016-09-08 Thread Iain Duncan
Thanks Mike, no we aren't. I think we are just making a new engine per suite, not per test though, we have the engine init code in the class level setup function, and per test setUp is making new sessions. We do drop the tables per test, which I expect we are not doing correctly as I'm a postgres

Re: [sqlalchemy] postgres/pyscopg failing to connect after a certain number of tests, stuck!

2016-09-08 Thread Mike Bayer
Engine per test is v inefficient, are you at least calling dispose() on each one in teardown? On Thursday, September 8, 2016, Iain Duncan wrote: > Hi Jonathan, sure can, here it is below. I think maybe this has something > to do with the fact that we are creating a

Re: [sqlalchemy] Re: postgres/pyscopg failing to connect after a certain number of tests, stuck!

2016-09-08 Thread Iain Duncan
Hi Jonathan, sure can, here it is below. I think maybe this has something to do with the fact that we are creating a new engine and dropping the schema on each pass maybe? Because it seems to *only* happen when we run about 75 tests in a row. Thanks for looking! class

[sqlalchemy] kdb+/q dialect

2016-09-08 Thread Seth P
Has anyone written a SQLAlchemy dialect for kdb+/q? I realize q isn't exactly SQL, but I figure if it's possible to write a dialect for Pandas tables (https://bitbucket.org/zzzeek/calchipan) it should be possible to do so for q. -- You received this message because you are subscribed to the