[sqlalchemy] Re: Savepoints and expiry

2014-02-12 Thread Wolfgang Schnerring
* Michael Bayer [2014-02-12 09:19]: > On Feb 12, 2014, at 1:49 AM, Wolfgang Schnerring wrote: > > I know that flush does not trigger expiry. ;) I was wondering whether > > savepoints qualified as being a stronger boundary than flush and thus might > > be worthy of triggerin

[sqlalchemy] Re: Savepoints and expiry

2014-02-11 Thread Wolfgang Schnerring
On 11 Feb 2014 06:54:22 Michael Bayer wrote: > On Feb 11, 2014, at 3:44 AM, Wolfgang Schnerring wrote: > >parent = session.query(Parent).first() > >self.assertEqual(1, len(parent.children)) > >session.begin_nested() > >sessi

[sqlalchemy] Re: Savepoints and expiry

2014-02-11 Thread Wolfgang Schnerring
On 3 Feb 2014 09:51:20 Michael Bayer wrote: > On Feb 3, 2014, at 2:39 AM, Wolfgang Schnerring wrote: > > I guess I didn't make it clear enough that I'm talking mainly about > > this collections issue. Sorry about that; let me try again: > > I feel it would be mu

[sqlalchemy] Re: Savepoints and expiry

2014-02-02 Thread Wolfgang Schnerring
* Michael Bayer wrote: > On Jan 31, 2014, at 9:27 AM, Wolfgang Schnerring wrote: > > savepoint = session.begin_nested() > > session.delete(stuff) > > session.begin_nested() > > # Now, if I don't call session.expire_all() here, stuff

[sqlalchemy] Savepoints and expiry

2014-01-31 Thread Wolfgang Schnerring
Hello list, pardon the innocent/dumb question: wouldn't it make sense to expire_all() on begin_nested() and rollback()? My concrete example goes like this: savepoint = session.begin_nested() session.delete(stuff) session.begin_nested() # Now, if I don't call session.expire_all() here, st

[sqlalchemy] Re: Rollback raises "connection already closed"

2012-04-25 Thread Wolfgang Schnerring
* Michael Bayer [2012-04-24 15:21]: > On Apr 24, 2012, at 3:12 AM, Wolfgang Schnerring wrote: >> So, if I understand you correctly, >> 1. sqlalchemy indeed detects disconnect situations on rollback >> 2. psycopg2 should signal those correctly >> 3. my synthetic

[sqlalchemy] Re: Rollback raises "connection already closed"

2012-04-24 Thread Wolfgang Schnerring
Hello Mike, thank you very much for your detailed analysis! * Michael Bayer [2012-04-23 16:43]: > On Apr 23, 2012, at 4:41 AM, Wolfgang Schnerring wrote: >> - The database connection goes away (due to networking issues) >> - A transaction is committed >> - This fails (of c

[sqlalchemy] Rollback raises "connection already closed"

2012-04-23 Thread Wolfgang Schnerring
hand that this doesn't really help me much from a pragmatic point of view: since the commit didn't go through, there should be no harm in the rollback failing (right?), so why complain? Thanks for any insights, Wolfgang -- Wolfgang Schnerring · w...@gocept.com · Software develop