database.py uses some module globals which assume there's only one TG app living in the process. TG 1.1 should allow mounting several apps, from different eggs, side by side in the same process so this pattern must be avoided.
A solution is to dump all these globals at the new turbogears.globals StackedObjectProxy? which is local to each app. Something like: turbogears.globals.hub, turbogears.globals.sa_engine, etc...
For backwards compatibility, a proxy to turbogears.globals.foo can be left at the old location. See view.engines at the trunk for an example.
This is can also be a good time to add support for multiple engines per app as long as the API remains compatible.
Alberto