On Wed, 2009-04-08 at 00:40 +0400, Oleg Broytmann wrote: > On Mon, Mar 30, 2009 at 04:16:16PM +0200, Iwan Vosloo wrote: > > 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. > > I think .close() on a Transaction must be forbidden. I am going to add a > .close() method to Transaction that raises an exception saying "Do not call > close() - call either commit(), commit(close=True) or rollback()". Ok?
Sounds good to me Oleg. Only thing is that if one is familiar with the DBAPI, one intuitively expects a sqlobject Transaction so work like a DBAPI Connection (or is it just me?). If so, you sortof expect it to have .commit and .close methods. But having it complain with a nice error message like that make the difference with the DBAPI explicit. Which is also good. Thanks -i ------------------------------------------------------------------------------ This SF.net email is sponsored by: High Quality Requirements in a Collaborative Environment. Download a free trial of Rational Requirements Composer Now! http://p.sf.net/sfu/www-ibm-com _______________________________________________ sqlobject-discuss mailing list sqlobject-discuss@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/sqlobject-discuss