[sqlalchemy] [Q] How to fix a circular dependency error?

2014-05-27 Thread Ladislav Lenart
Hello. A specific DML request crashed with a CircularDependencyError on our test env. I know that I should set post_update=True to the problematic relationship. The thing is I do not see the cycle and the error description is quite big. Could you please provide some guidance as to how to find the

[sqlalchemy] history and postgresql arrays

2014-05-27 Thread Jon Nelson
I noticed something kinda weird the other day. Let's say I have an object 'o' with two fields: num (an integer) and nums (an array of integers). Using 'inspect' and some trickery: d = dict(sa.inspect(o).attrs) d['num'].history History(added=(), unchanged=(10), deleted=()) d['nums'].history

Re: [sqlalchemy] history and postgresql arrays

2014-05-27 Thread Michael Bayer
On May 27, 2014, at 12:39 PM, Jon Nelson jnel...@jamponi.net wrote: I noticed something kinda weird the other day. Let's say I have an object 'o' with two fields: num (an integer) and nums (an array of integers). Using 'inspect' and some trickery: d = dict(sa.inspect(o).attrs)

Re: [sqlalchemy] [Q] How to fix a circular dependency error?

2014-05-27 Thread Michael Bayer
some improvement was made to this formatting in 0.8 or so, though even now it's not very easy to read directly. Typically I try to look at the classes and relationships being mentioned in the error and then inspect the mappings. In this case it appears like the cycle is just on the Partner