> > During the upgrade to the current version of Pylons (0.9.6.1) and
> > Beaker (0.8) db-based session and cache handling broke.

> I had thought that just url should be enough, however, I apparently  
> missed enforcing some consistency in it. So, if you're using  
> SQLAlchemy 0.3, the .url arg is fine. However, under 0.4, all SA  
> args, including the url, should be under sa., like so:
> beaker.session.sa.url = mysql....
> beaker.session.sa.pool_recycle = 30
> beaker.session.sa.echo = false

I ported the application to sqlalchemy 0.4 and removed the patch to
beaker.
Everything works as you describe. Thanks.

There is one other thing that I did a while ago which might be handled
in a smarter way.

$PYLONS_APP/config/environment.py

def load_environment(global_conf, app_conf):
    """Configure the Pylons environment via the ``pylons.config``
object"""

    # The beaker code expects a class while the config option is
    # a string containing the name of the class.
    # If we recognize the option and value we replace the string
    # with the actual class
    from beaker.ext.database import DatabaseNamespaceManager
    if ('beaker.session.namespace_class' in app_conf and
        app_conf['beaker.session.namespace_class'] == 'ext:database'):
        app_conf['beaker.session.namespace_class'] =
DatabaseNamespaceManager
    if ('beaker.cache.namespace_class' in app_conf and
        app_conf['beaker.cache.namespace_class'] == 'ext:database'):
        app_conf['beaker.cache.namespace_class'] =
DatabaseNamespaceManager

Is it possible to have beaker use the DatabaseNamespaceManager without
intermediate parsing of the pylons config?

Bob


--~--~---------~--~----~------------~-------~--~----~
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