In the release of SQLObject packaged with TurboGears
0.9a5 I have encountered quite a problem -
descendants of InheritableSQLObjects attempt to
connect to the database, while the parent object or
normal SQLObjects do not until used.
Specifically, when you have a python package
registered as a TurboGears extension it gets queried
upon load (by TG's own __init__.py script) before
anything else can possibly happen. While this
ordinarily doesn't matter, there is something strange
going on inside InheritableSQLObject descendants that
is causing this error.
There is the following ticket against TG right now:
This ticket, along with the forum discussion linked
to in that ticket, describes the problem in detail.