> I wonder why we're not seeing other reports of this?

I'm also very curious about this - is SQLObject inheritance a not-oft-used 
feature?  Despite the overhead of additional single-row selects, the utility 
of it far outweights the performance hit for our applications.

> As of now, on my machine, I'm running a few revs behind on SQLObject
> (I'm at 1547 on the 0.7bugfix branch). There have been several changes
> to dbconnection.py, so perhaps something unpleasant has happened
> there.

I've been subscribing to the "printf" school of debugging in an attempt to 
track this down.  Adding three print statements to the SQLite connector in 
SQLObject I find that with the following:

Two SQLObject tables: SQLiteConnection.releaseConnection is not called.
SQLObject and InheritableSQLObject tables: releaseConnection is not called.
InheritableSQLObject and child table: releaseConnection called.

In all three cases DBAPI is imported successfully at the head of 
sqliteconnection.py (<class sqlobject.dbconnection.DBAPI at 0x2aaaac77f770>) 
while within releaseConnection, DBAPI is unset (None).

Very strange - attempting to re-import DBAPI within the function results in 
the following error:

Exception exceptions.ImportError: 'No module named sqlobject.dbconnection' in 
<bound method Transaction.__del__ of <sqlobject.dbconnection.Transaction 
object at 0x2aaaad3f4cd0>> ignored

It very badly looses track of its' global namespace, not to mention just why 
releaseConnection is being called...

> Can you changing your SQLObject? 

I'm currently using the latest bundled SQLObject from TG SVN.

Downgrading to SQLObject SVN 1547 does not change the issue.  Working 
backwards by hand, the 1516->1526 changeset is the breaker!  Changes in this 
revision:

U    sqlobject/sqlite/sqliteconnection.py
A    sqlobject/tests/test_sqlite_threaded.py

...the addition of a large number of routines overriding DBAPI defaults... 
releaseConnection, getConnection, and further checks for in-memory databases.

I'll be running 1516 until sqlite connectivity is fixed - the magic behind 
SQLite/SQLObject is currently beyond me.

 - Matthew

Attachment: pgpUOL6JEYlMp.pgp
Description: PGP signature

Reply via email to