Well, the patch I've posted at ticket 397 for sqlobject DOES solve the problem. I'm pretty sure it is an SQLObject's bug as: it's also reported by Randall Smith, it's solved by this patch and, as I understand it, python doesn't guarantee thread-safeness for the __init__ method.
SQLObject's comments are outdated as they say something about the new() method of MetaSQLObject being threadsafe (at sqlobject/main.py), which therefore makes SQLObject instances initialization threadsafe. I've grepped around and could not find MetaSQLObject anywhere. On the other hand, SQLObject's metaclass is DeclariveMeta, which delegates the class's initialization to the class's __classinit__ method, so my guess is that the old behaviour has been replaced by this. Someone more familiar with sqlobject's internals, please correct me if I'm wrong. Anyway, what I wanted to say is that I'm pretty sure SQLObject is the cause of this bug, and the patch fixes it so I think it's better not to work around it but fixing the root cause as this is something that will affect ALL SQLObject instances, it just happens a TG_Visit instance is initizalized on each request, so the stressing with ab2 with many concurrent requests made the bug arise. I know this is not the (only) place I should post it, but this list seems more alive than sqlobject's AND TG has a Trac. > Hah. I wasn't really worried it was a visit/identity bug (it just didn't > feel like it), but I don't want anything to stand in the way of TG > developers *using* visit/identity. Don't worry, I'm using it ;) Cheers, Alberto

