summaryrefslogtreecommitdiff
path: root/repoze/bfg/configuration.py
diff options
context:
space:
mode:
authorChris McDonough <chrism@agendaless.com>2009-12-20 11:14:23 +0000
committerChris McDonough <chrism@agendaless.com>2009-12-20 11:14:23 +0000
commiteee8fb4a6d28a2e84b313b5518914b0fe1ab043e (patch)
treec591ed279da5c5f6725c3c9cddffb0269c8968c2 /repoze/bfg/configuration.py
parente9c88cab25de6e0024ff0207ac6f541756a43a27 (diff)
downloadpyramid-eee8fb4a6d28a2e84b313b5518914b0fe1ab043e.tar.gz
pyramid-eee8fb4a6d28a2e84b313b5518914b0fe1ab043e.tar.bz2
pyramid-eee8fb4a6d28a2e84b313b5518914b0fe1ab043e.zip
Get rid of add_adapter and add_utility APIs (config.registry.registerAdapter and config.registry.registerUtility will work).
Diffstat (limited to 'repoze/bfg/configuration.py')
-rw-r--r--repoze/bfg/configuration.py45
1 files changed, 0 insertions, 45 deletions
diff --git a/repoze/bfg/configuration.py b/repoze/bfg/configuration.py
index ccfeb7347..8663a0567 100644
--- a/repoze/bfg/configuration.py
+++ b/repoze/bfg/configuration.py
@@ -323,51 +323,6 @@ class Configurator(object):
utility = self._set_settings(settings)
utility.update(settings)
- def add_subscription_adapter(self, factory, required=None, provided=None,
- info=u''):
- """Add a Zope Component Architecture subscription adapter.
- What is a subscription adapter, you ask? I have no idea
- either. This is currently only here to support the
- ``subscriber`` ZCML directive. This is not a published API
- until I figure out why I would need a subscription adapter."""
- self.registry.registerSubscriptionAdapter(factory, required=required,
- provided=provided, info=info)
-
- def add_adapter(self, factory, required=None, provided=None, name='',
- info=u''):
- """Add a :term:`Zope Component Architecture` adapter. Use of
- this method is the equivalent of using an ``adapter``
- :term:`ZCML declaration` or the ``registerAdapter`` method of
- a ZCA registry.
-
- .. note:: This method is not useful unless you use :term:`Zope
- Component Architecture` APIs in your :mod:`repoze.bfg`
- application directly.
- """
- self.registry.registerAdapter(factory, required=required,
- provided=provided, name=name, info=info)
-
- def add_utility(self, component=None, provided=None, name=u'', info=u'',
- factory=None):
- """Add a :term:`Zope Component Architecture` utility. Use of
- this method is the equivalent of using a ``utility``
- :term:`ZCML declaration` or the ``registerUtility`` method of
- a ZCA registry.
-
- .. note:: This method is not useful unless you use :term:`Zope
- Component Architecture` APIs in your :mod:`repoze.bfg`
- application directly.
- """
- if factory:
- kw = dict(factory=factory)
- else:
- # older component registries don't accept factory as a kwarg,
- # so if we don't need it, we don't pass it
- kw = {}
- self.registry.registerUtility(
- component=component, provided=provided, name=name, info=info,
- **kw)
-
def make_wsgi_app(self):
""" Returns a :mod:`repoze.bfg` WSGI application representing
the current configuration state and sends a