[Z3-sqlos] obj.destroySelf() broken in sqlos

Andrew Bennetts andrew-sqlos at puzzling.org
Sun Oct 24 00:17:28 CEST 2004


On Wed, Oct 20, 2004 at 05:19:11PM -0200, Sidnei da Silva wrote:
> On Wed, Oct 20, 2004 at 09:11:26PM +0200, Andrew Bennetts wrote:
[...]
> | 
> | Coming later tonight, I hope :)
> 
> Yay!

Ahem: apologies for the delay.

Attached is a test case for the bug (I've locally placed it in
tests/test_delete.py, but it probably doesn't care).

It's somewhat fragile due to using SamplePerson.createTable, so I haven't
checked it in yet.

And it turns out that current sqlos in SVN has already fixed the bug,
because calling syncUpdate on a destroySelf'd object is safe (although
that's probably an accident of implementation; Ian Bicking says on 
sqlobject-discuss that nothing should be relied on after destroySelf is
called).

The test does fail with the version of sqlos I'm currently developing
against.  Time to upgrade! :)

Ideas on improving the test so that we can commit it and slowly start
expanding the test suite are welcome :)

On the topic of the tests: ftests/test_transaction.py fails for me with:
    IOError: [Errno 2] No such file or directory:
    '/home/andrew/code/sqlos/ftesting.zcml'

Is there a file missing from SVN?

-Andrew.




More information about the z3-sqlos mailing list