Re: [SQLObject] Bug? Spurious connection to postgresql
SQLObject is a Python ORM.
Brought to you by:
ianbicking,
phd
From: Oleg B. <ph...@ph...> - 2009-04-17 16:46:21
|
On Mon, Apr 13, 2009 at 09:28:36AM +0200, Iwan Vosloo wrote: > On Wed, 2009-04-08 at 00:37 +0400, Oleg Broytmann wrote: > > The problem with .server_version is that it's a property, so it is > > called at the very beginning of said __getattr__ and 'self' is the > > Connection, not the Transaction so server_version calls wrong > > self.queryOne(). I think, the simplest way to fix this would be to make the > > property a normal method. Then __getattr__ will wrap self and the > > .server_version() method will call .queryOne() on the Transaction, not > > Connection. > > This is an API change but I think it's a small evil 'cause it is a > > change in an API that is hardly used by many. > > What do you think? > > Sounds good to me. Even we do not really use server_version directly - > it is just being called as a side effect of doing other things. Fixed in the revisions 3853-3855 (branches 0.9, 0.10 and the trunk). Thank you! Oleg. -- Oleg Broytmann http://phd.pp.ru/ ph...@ph... Programmers don't die, they just GOSUB without RETURN. |