From 8f45bee662176e1b2a850a4a9fe25d26b03093a6 Mon Sep 17 00:00:00 2001 From: Chris McDonough Date: Sun, 12 Sep 2010 12:45:07 +0000 Subject: - The BFG router now emits an additional event unconditionally at the end of request processing: ``repoze.bfg.interfaces.IFinishedRequest``. This event is meant to be used when it is necessary to perform unconditional cleanup after request processing. See the ``repoze.bfg.events.FinishedRequest`` class documentation for more information. - The ``repoze.bfg.interfaces.IWSGIApplicationCreatedEvent`` event interface was renamed to ``repoze.bfg.interfaces.IApplicationCreated``. Likewise, the ``repoze.bfg.events.WSGIApplicationCreatedEvent`` class was renamed to ``repoze.bfg.events.ApplicationCreated``. The older aliases will continue to work indefinitely. - The ``repoze.bfg.interfaces.IAfterTraversal`` event interface was renamed to ``repoze.bfg.interfaces.IContextFound``. Likewise, the ``repoze.bfg.events.AfterTraveral`` class was renamed to ``repoze.bfg.events.ContextFound``. The older aliases will continue to work indefinitely. --- repoze/bfg/configuration.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'repoze/bfg/configuration.py') diff --git a/repoze/bfg/configuration.py b/repoze/bfg/configuration.py index f8fdcca07..e4ac824ef 100644 --- a/repoze/bfg/configuration.py +++ b/repoze/bfg/configuration.py @@ -50,7 +50,7 @@ from repoze.bfg.renderers import RendererHelper from repoze.bfg.authorization import ACLAuthorizationPolicy from repoze.bfg.compat import all from repoze.bfg.compat import md5 -from repoze.bfg.events import WSGIApplicationCreatedEvent +from repoze.bfg.events import ApplicationCreated from repoze.bfg.exceptions import Forbidden from repoze.bfg.exceptions import NotFound from repoze.bfg.exceptions import PredicateMismatch @@ -594,16 +594,16 @@ class Configurator(object): def make_wsgi_app(self): """ Returns a :mod:`repoze.bfg` WSGI application representing the current configuration state and sends a - :class:`repoze.bfg.interfaces.IWSGIApplicationCreatedEvent` + :class:`repoze.bfg.interfaces.IApplicationCreated` event to all listeners.""" from repoze.bfg.router import Router # avoid circdep app = Router(self.registry) # We push the registry on to the stack here in case any code # that depends on the registry threadlocal APIs used in - # listeners subscribed to the WSGIApplicationCreatedEvent. + # listeners subscribed to the IApplicationCreated event. self.manager.push({'registry':self.registry, 'request':None}) try: - self.registry.notify(WSGIApplicationCreatedEvent(app)) + self.registry.notify(ApplicationCreated(app)) finally: self.manager.pop() return app -- cgit v1.2.3