Mike Orr wrote: > On 5/30/07, Mike Orr <[EMAIL PROTECTED]> wrote: >> On 5/30/07, Mike Orr <[EMAIL PROTECTED]> wrote: >> > On 5/30/07, Philip Jenvey <[EMAIL PROTECTED]> wrote: >> > > >> > > >> > > On May 30, 2007, at 3:27 PM, Mike Orr wrote: >> > > >> > > > >> > > > My app can find paste.deploy.CONFIG['sqlalchemy.echo_pool'] when >> run >> > > > under 'paster shell', but it moves to >> > > > CONFIG['app_conf']['sqlalchemy.echo_pool'] under 'paster >> serve'. Yet >> > > > myapp/config/middleware.py contains: >> >> Ayayay! CONFIG is correct throughout middleware.py, but it changes >> sometime before myapp/lib/base.py is imported. > > > OK, it happens in paste.deploy.config line 163. Before > CONFIG.push_thread_config(conf), CONFIG contains all the app config > values. After that line, CONFIG contains just two keys: 'app_conf' > and 'global_conf'. > > The code before that line is: > > # PasteDeploy 1.3 > # paste/deploy/config.py > class ConfigMiddleware(object): > def __call__(self, environ, start_response): > global wsgilib > if wsgilib is None: > import pkg_resources > pkg_resources.require('Paste') > from paste import wsgilib > popped_config = None > if 'paste.config' in environ: > popped_config = environ['paste.config'] > conf = environ['paste.config'] = self.config.copy() > app_iter = None > > CONFIG.push_thread_config(conf) > > So does anybody know why Paste is doing this? Why does it need to > override my nicely set CONFIG with the one in environ['paste.config'], > and why is that one being set wrong?
It's setting it because that's what the config middleware is supposed to do. It sets that value. I don't know why the one it is setting is wrong, but that's what should be fixed. -- Ian Bicking | [EMAIL PROTECTED] | http://blog.ianbicking.org | Write code, do good | http://topp.openplans.org/careers --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "pylons-discuss" group. To post to this group, send email to pylons-discuss@googlegroups.com 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 -~----------~----~----~----~------~----~------~--~---