#1393: Avoid module-globals in database.py
------------------------+---------------------------------------------------
 Reporter:  alberto     |       Owner:  anonymous       
     Type:  defect      |      Status:  new             
 Priority:  normal      |   Milestone:  1.1             
Component:  TurboGears  |     Version:  trunk           
 Severity:  normal      |    Keywords:  database, sprint
------------------------+---------------------------------------------------
 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

-- 
Ticket URL: <http://trac.turbogears.org/ticket/1393>
TurboGears <http://www.turbogears.org/>
TurboGears front-to-back web development
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"TurboGears Tickets" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/turbogears-tickets?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to