#794: sqlalchemy echo is broken or has changed ( 0.9a4 using PackageEngine
--------------------------------+-------------------------------------------
 Reporter:  [EMAIL PROTECTED]  |       Owner:  anonymous
     Type:  defect              |      Status:  new      
 Priority:  normal              |   Milestone:           
Component:  TurboGears          |     Version:  0.9a4    
 Severity:  normal              |    Keywords:           
--------------------------------+-------------------------------------------
 The wiki shows tg to support echo in sqlalchemy as such:
     http://trac.turbogears.org/turbogears/wiki/UsingSqlAlchemy

 That no longer works , perhaps becise of the new PackageEngine method
 ---
 [dev.cfg]
 sqlalchemy.dburi="postgres://database=xxxx&host=localhost&user=xxx"
 sqlalchemy.echo = 1

 [model.py]
 import turbogears
 engine = __engine__ = turbogears.database.PackageEngine("findmeon")
 engine.echo = True
 ---

 i think the issue is because echo isn't carried over into the engine
 instantiation.

 I did a bunch of tracing / debugging / exploring and found that this will
 turn echo on (at least in 'tg-admin shell' ) AFTER another sql query has
 been made

    engine._engine.echo = True

 engine._engine is a None type on startup - its not a
 'sqlalchemy.databases.postgres.PGSQLEngine object' until a query is
 made

 onece a query is made, it is instantiated, but there is no .echo set based
 on the config defaults

 at that point, using tg-admin shell, one can set 'engine._engine.echo =
 True' , and echo will work.
 setting it before a query is made ( which instantiates a connection ),
 will just raise an exception on a None Type.

 I posted something on the group, but no one commented , so i'm ticketing
 it
 http://groups.google.com/group/turbogears/browse_frm/thread/10dc9a5bae2929ee

 I'm not sure if this is an error on documentation or just if support has
 broken

-- 
Ticket URL: <http://trac.turbogears.org/turbogears/ticket/794>
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
-~----------~----~----~----~------~----~------~--~---

Reply via email to