Hi there,

I am on sqlobject 0.9.1.

This looks like a bug - correct me if I'm wrong.  Transaction.close()
does not close the underlying connection. Seems like the __getattr__ of
Transaction is to blame if I understand correctly.  Here is some code
showing the problem (fill in the xxx es):

import sqlobject

connectionURI = 'postgres://xxx:x...@localhost/xxx'
conn = sqlobject.connectionForURI(connectionURI).transaction()


conn.close()

assert conn._connection.closed, 'The underlying connection is open'

If you follow this with:
conn._connection.close()

Then things seems to work.

Regards
- Iwan



------------------------------------------------------------------------------
_______________________________________________
sqlobject-discuss mailing list
sqlobject-discuss@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/sqlobject-discuss

Reply via email to