summaryrefslogtreecommitdiff
path: root/repoze/bfg/settings.py
diff options
context:
space:
mode:
authorChris McDonough <chrism@agendaless.com>2009-11-23 04:51:35 +0000
committerChris McDonough <chrism@agendaless.com>2009-11-23 04:51:35 +0000
commit6fec211488f87f9207fda9c39b21e83c6359c727 (patch)
tree0ad5de2211e9b71aed1d12ad3cbc97efd50b7c22 /repoze/bfg/settings.py
parent8dd3ce0142e8055cfc6c9e793b5c781c4691e2c0 (diff)
downloadpyramid-6fec211488f87f9207fda9c39b21e83c6359c727.tar.gz
pyramid-6fec211488f87f9207fda9c39b21e83c6359c727.tar.bz2
pyramid-6fec211488f87f9207fda9c39b21e83c6359c727.zip
- The ``repoze.bfg.scripting.get_root`` API now uses a 'real' WebOb
request rather than a FakeRequest when it sets up the request as a threadlocal. - The ``repoze.bfg.traversal.traverse`` API now uses a 'real' WebOb request rather than a FakeRequest when it calls the traverser. - The ``repoze.bfg.request.FakeRequest`` class has been removed. ``repoze.bfg.url.route_url`` ``repoze.bfg.url.model_url`` ``repoze.bfg.url.static_url`` ``repoze.bfg.traversal.virtual_root`` Each of these functions now expects to be called with a request object that has a ``registry`` attribute which represents the current ZCA registry. Get rid of extraneous uses of ZCA threadlocal API.
Diffstat (limited to 'repoze/bfg/settings.py')
-rw-r--r--repoze/bfg/settings.py6
1 files changed, 4 insertions, 2 deletions
diff --git a/repoze/bfg/settings.py b/repoze/bfg/settings.py
index e9a03ad0b..500c4503c 100644
--- a/repoze/bfg/settings.py
+++ b/repoze/bfg/settings.py
@@ -1,10 +1,11 @@
import os
-from zope.component import queryUtility
from zope.interface import implements
from repoze.bfg.interfaces import ISettings
+from repoze.bfg.threadlocal import get_current_registry
+
class Settings(dict):
""" Deployment settings. Update application settings (usually
from PasteDeploy keywords) with framework-specific key/value pairs
@@ -62,7 +63,8 @@ def get_settings():
For backwards compatibility, dictionary keys can also be looked up
as attributes of the settings object.
"""
- return queryUtility(ISettings)
+ reg = get_current_registry()
+ return reg.queryUtility(ISettings)
def asbool(s):
s = str(s).strip()