On Feb 10, 10:16 pm, Philip Jenvey <[EMAIL PROTECTED]> wrote:
> On Feb 8, 2007, at 5:08 PM, Mike Orr wrote:
>
> > pylons.database does not provide a way to set the SQLAlchemy
> > connection options beyond 'echo'.  But MySQL needs 'pool_recycle'
> > [1], and users may want to set other options in their config.  I tried
> > a few different ways and eventually came up with this.  It adds
> > "sqlalchemy.pool_recycle" and "sqlalchemy.echo_pool", and is
> > expandable for other options.  Would this approach be suitable for
> > pylons.database?  If so I'll make a Trac patch.
>
> We definitely need to solve this somehow for 0.9.5. I was already  
> thinking about adding *kwargs to create_engine, and possibly adding  
> kwargs to make_session and having them passthru to create_engine.
>
> I think some might want to also pass specific arguments to  
> SQLAlchemy's create_session call too, though.
>
> > Two differences:
>
> > get_engine_conf() returns a dict of args for
> > sqlalchemy.create_engine() rather than a tuple of (uri, echo).
>
> > create_engine(), get_engine_conf(), and make_session() do not accept
> > args.  In pylons.database they take optional 'url' and 'echo' args
> > which override the values in the config file.  Does anybody actually
> > use this feature?  If so, I could make them take an arbitrary set of
> > **engine_args, which get_engine_conf() would not look up in the config
> > file.
>
> I like the idea of allowing more engine specific options to be set in  
> the config file. However we need to support sending arguments  
> programatically as well. Some engine options are impossible to set  
> via the config file, such as the the 'pool' keyword argument -- it  
> takes an instance of a Pool object.
>
> --
> Philip Jenvey

I needed to pass "convert_unicode=True" to sqlalchemy.create_engine
and made a simple patch for database.py for passing keyword arguments
to "create_engine".
After that I found this thread :) So I am not sure if it can be of any
value, but the patch is added to the ticket:
http://pylonshq.com/project/pylonshq/ticket/198



--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"pylons-discuss" 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/pylons-discuss?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to