From d75fe70228c89e3606e51a4d5775faf549252a90 Mon Sep 17 00:00:00 2001 From: Chris McDonough Date: Wed, 30 Sep 2009 03:27:28 +0000 Subject: - The import of ``repoze.bfg.view.NotFound`` is deprecated in favor of ``repoze.bfg.exceptions.NotFound``. The old location still functions, but emits a deprecation warning. - The import of ``repoze.bfg.security.Unauthorized`` is deprecated in favor of ``repoze.bfg.exceptions.Forbidden``. The old location still functions but emits a deprecation warning. The rename from ``Unauthorized`` to ``Forbidden`` brings parity to the the name of the exception and the system view it invokes when raised. - New ``repoze.bfg.exceptions`` module was created to house exceptions that were previously sprinkled through various modules. - An ``exceptions`` API chapter was added, documenting the new ``repoze.bfg.exceptions`` module. --- repoze/bfg/interfaces.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'repoze/bfg/interfaces.py') diff --git a/repoze/bfg/interfaces.py b/repoze/bfg/interfaces.py index 8896c883e..5d8394484 100644 --- a/repoze/bfg/interfaces.py +++ b/repoze/bfg/interfaces.py @@ -26,8 +26,10 @@ class IResponse(Interface): class IView(Interface): def __call__(context, request): """ Must return an object that implements IResponse. May - optionally raise ``repoze.bfg.security.Unauthorized`` if an - authorization failure is detected during view execution.""" + optionally raise ``repoze.bfg.exceptions.Forbidden`` if an + authorization failure is detected during view execution or + ``repoze.bfg.exceptions.NotFound`` if the not found page is + meant to be returned.""" class ISecuredView(IView): """ *Internal only* interface. Not an API. """ -- cgit v1.2.3