From 7292d4d6a7d63c55a718dc50943bc9cbf90ae6fe Mon Sep 17 00:00:00 2001 From: Chris McDonough Date: Sat, 24 Jan 2009 10:31:20 +0000 Subject: Behavior Changes ---------------- - The ``repoze.bfg.view.render_view_to_response`` API will no longer raise a ValueError if an object returned by a view function it calls does not possess certain attributes (``headerlist``, ``app_iter``, ``status``). This API used to attempt to perform a check using the ``is_response`` function in ``repoze.bfg.view``, and raised a ``ValueError`` if the ``is_response`` check failed. The responsibility is now the caller's to ensure that the return value from a view function is a "real" response. - WSGI environ dicts passed to ``repoze.bfg`` 's Router must now contain a REQUEST_METHOD key/value; if they do not, a KeyError will be raised (speed). Implementation Changes ---------------------- - Various speed micro-tweaks. --- repoze/bfg/registry.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'repoze/bfg/registry.py') diff --git a/repoze/bfg/registry.py b/repoze/bfg/registry.py index 26feb73e0..41012a7c9 100644 --- a/repoze/bfg/registry.py +++ b/repoze/bfg/registry.py @@ -28,20 +28,20 @@ class Registry(Components): # for optimization purposes, if no listeners are listening, don't try # to notify them - _has_listeners = False + has_listeners = False def registerSubscriptionAdapter(self, *arg, **kw): result = Components.registerSubscriptionAdapter(self, *arg, **kw) - self._has_listeners = True + self.has_listeners = True return result def registerHandler(self, *arg, **kw): result = Components.registerHandler(self, *arg, **kw) - self._has_listeners = True + self.has_listeners = True return result def notify(self, *events): - if self._has_listeners: + if self.has_listeners: # iterating over subscribers assures they get executed for ignored in self.subscribers(events, None): """ """ -- cgit v1.2.3