From 5f47801ae33d89a0ac87d9d227639d60aed23ff1 Mon Sep 17 00:00:00 2001 From: Chris McDonough Date: Wed, 19 Jan 2011 22:00:43 -0500 Subject: - Using the ``pyramid.view.bfg_view`` alias for ``pyramid.view.view_config`` (a backwards compatibility shim) now issues a deprecation warning. --- CHANGES.txt | 6 ++++++ TODO.txt | 2 -- pyramid/view.py | 7 +++++++ 3 files changed, 13 insertions(+), 2 deletions(-) diff --git a/CHANGES.txt b/CHANGES.txt index 416de00f9..8df963aac 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -18,6 +18,12 @@ Documentation - Fix deprecated example showing ``chameleon_zpt`` API call in testing narrative chapter. +Deprecations +------------- + +- Using the ``pyramid.view.bfg_view`` alias for ``pyramid.view.view_config`` + (a backwards compatibility shim) now issues a deprecation warning. + Backwards Incompatibilities --------------------------- diff --git a/TODO.txt b/TODO.txt index 09ca50585..5b78e2a74 100644 --- a/TODO.txt +++ b/TODO.txt @@ -22,8 +22,6 @@ Must-Have (before 1.0) - Add docs for ``route_path`` and ``route_url``, etc to Request API docs (see also https://github.com/Pylons/pyramid/issues#issue/19). -- Deprecate ``@bfg_view``. - - Reversing (context, request) in function view callable arglist produces incomprehensible traceback:: diff --git a/pyramid/view.py b/pyramid/view.py index 310e6d58f..10a0b7b60 100644 --- a/pyramid/view.py +++ b/pyramid/view.py @@ -13,6 +13,7 @@ if hasattr(mimetypes, 'init'): import venusian from zope.interface import providedBy +from zope.deprecation import deprecated from pyramid.interfaces import IRoutesMapper from pyramid.interfaces import IView @@ -415,6 +416,12 @@ class view_config(object): bfg_view = view_config # permanent b/c +deprecated( + 'bfg_view', + 'pyramid.view.bfg_view is deprecated as of Pyramid 1.0. Use ' + 'pyramid.view.view_config instead (API-compat, simple ' + 'rename).') + def default_exceptionresponse_view(context, request): if not isinstance(context, Exception): # backwards compat for an exception response view registered via -- cgit v1.2.3