Re: [sqlalchemy] SQLAlchemy 0.7.9 breaks SQLAlchemy-ORM-Tree flush behavior

2012-10-02 Thread Mark Friedenbach
an just what it knows to have changed.I'd have to > think about this as I'm not sure it's appropriate. > > > > On Oct 2, 2012, at 4:28 PM, Mark Friedenbach wrote: > > Indeed, session.dirty is non-empty within after_flush_postexec(). > > I'm working on a

Re: [sqlalchemy] SQLAlchemy 0.7.9 breaks SQLAlchemy-ORM-Tree flush behavior

2012-10-02 Thread Mark Friedenbach
Indeed, session.dirty is non-empty within after_flush_postexec(). I'm working on a fix for sqlalchemy-orm-tree first before I can think about doing a (smaller) regression test. Besides, it now occurs to me that in some cases I might be setting attributes on objects in the session but outside of th

Re: [sqlalchemy] SQLAlchemy 0.7.9 breaks SQLAlchemy-ORM-Tree flush behavior

2012-10-02 Thread Mark Friedenbach
I forgot to mention, this is picked up by SQLAlchemy-ORM-tree's unit tests, if you want to see the failure: git clone git://github.com/monetizeio/sqlalchemy-orm-tree.git cd sqlalchemy-orm-tree && make check On Tue, Oct 2, 2012 at 12:49 PM, Mark Friedenbach wrote: > Well it&#

Re: [sqlalchemy] SQLAlchemy 0.7.9 breaks SQLAlchemy-ORM-Tree flush behavior

2012-10-02 Thread Mark Friedenbach
doing? All the relevant code is in this file: https://github.com/monetizeio/sqlalchemy-orm-tree/blob/master/sqlalchemy_tree/orm.py On Tue, Oct 2, 2012 at 12:07 PM, Michael Bayer wrote: > > On Oct 2, 2012, at 2:14 PM, Mark Friedenbach wrote: > > SQLAlchemy 0.7.9 seems to hav

[sqlalchemy] SQLAlchemy 0.7.9 breaks SQLAlchemy-ORM-Tree flush behavior

2012-10-02 Thread Mark Friedenbach
SQLAlchemy 0.7.9 seems to have broken SQLAlchemy-ORM-tree (http://pypi.python.org/pypi/SQLAlchemy-ORM-tree/). Specifically, SQLAlchemy-ORM-Tree has a dependency on flush behavior prior to the fix for #2566. I'm currently investigating a way to detect (and ignore) the 2nd flush. But more genera

[sqlalchemy] Introducing SQLAlchemy-ORM-tree: a generic API for hierarchical data

2012-02-28 Thread Mark Friedenbach
I'd like to introduce a package I've been working on for a little while now: SQLAlchemy-ORM-tree, “an implementation for SQLAlchemy- based applications of the nested-sets/modified-pre-order-tree- traversal technique for storing hierarchical data in a relational database.” It's gone through a couple

[sqlalchemy] Set-based association proxy through AppenderQuery?

2012-02-11 Thread Mark Friedenbach
Hi, Is it possible to have an association_proxy (in the association object pattern) that emulates a set-based collection if it goes through a lazy='dynamic' relationship? I can't for the life of me find a way to make this work (setting collection_class on the dynamic relationship doesn't seem to d

[sqlalchemy] Re: Expiring only unchanged stale data

2012-02-05 Thread Mark Friedenbach
estricted to session/ORM queries only), but also before/after insert, update, and delete (where I only do SQL expression queries). On Feb 4, 8:52 am, Michael Bayer wrote: > On Feb 4, 2012, at 11:23 AM, Mark Friedenbach wrote: > > Hi, I'm running into a problem with my nested sets imp

[sqlalchemy] Expiring only unchanged stale data

2012-02-04 Thread Mark Friedenbach
Hi, I'm running into a problem with my nested sets implementation. Inserting, moving, or removing a node can potentially affect one or more of many other nodes' tree properties (tree id, left, right, depth, or parent relationship). For efficiency's sake this change occurs as a single, rather comple