summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTshepang Lekhonkhobe <tshepang@gmail.com>2013-01-27 11:08:26 +0200
committerTshepang Lekhonkhobe <tshepang@gmail.com>2013-01-27 11:08:26 +0200
commit05e928bd9755614b0edbac0ab3b6d6b7fbbd0f17 (patch)
treeeb6ca56519808dd4eba33d13872762503501e7e5
parent00cee701066fc558d0becfa3bade7ce282600d6e (diff)
downloadpyramid-05e928bd9755614b0edbac0ab3b6d6b7fbbd0f17.tar.gz
pyramid-05e928bd9755614b0edbac0ab3b6d6b7fbbd0f17.tar.bz2
pyramid-05e928bd9755614b0edbac0ab3b6d6b7fbbd0f17.zip
make use of 'versionadded' and 'deprecated' directives in pyramid.view
-rw-r--r--pyramid/view.py23
1 files changed, 9 insertions, 14 deletions
diff --git a/pyramid/view.py b/pyramid/view.py
index 40d7c19b9..8e3292274 100644
--- a/pyramid/view.py
+++ b/pyramid/view.py
@@ -29,9 +29,11 @@ _marker = object()
class static(static_view):
""" Backwards compatibility alias for
:class:`pyramid.static.static_view`; it overrides that class' constructor
- to pass ``use_subpath=True`` by default. This class is deprecated as of
- :app:`Pyramid` 1.1. Use :class:`pyramid.static.static_view` instead
- (probably with a ``use_subpath=True`` argument).
+ to pass ``use_subpath=True`` by default.
+
+ .. deprecated:: 1.1
+ use :class:`pyramid.static.static_view` instead
+ (probably with a ``use_subpath=True`` argument)
"""
def __init__(self, root_dir, cache_max_age=3600, package_name=None):
if package_name is None:
@@ -312,6 +314,7 @@ See also :ref:`changing_the_notfound_view`.
class notfound_view_config(object):
"""
+ .. versionadded:: 1.3
An analogue of :class:`pyramid.view.view_config` which registers a
:term:`not found view`.
@@ -346,9 +349,6 @@ class notfound_view_config(object):
See :ref:`changing_the_notfound_view` for detailed usage information.
- .. note::
-
- This class is new as of Pyramid 1.3.
"""
venusian = venusian
@@ -377,6 +377,7 @@ class notfound_view_config(object):
class forbidden_view_config(object):
"""
+ .. versionadded:: 1.3
An analogue of :class:`pyramid.view.view_config` which registers a
:term:`forbidden view`.
@@ -403,9 +404,6 @@ class forbidden_view_config(object):
See :ref:`changing_the_forbidden_view` for detailed usage information.
- .. note::
-
- This class is new as of Pyramid 1.3.
"""
venusian = venusian
@@ -436,11 +434,8 @@ def is_response(ob):
""" Return ``True`` if ``ob`` implements the interface implied by
:ref:`the_response`. ``False`` if not.
- .. warning::
-
- This function is deprecated as of :app:`Pyramid` 1.1. New
- code should not use it. Instead, new code should use the
- :func:`pyramid.request.Request.is_response` method."""
+ .. deprecated:: 1.1
+ use :func:`pyramid.request.Request.is_response` instead"""
if ( hasattr(ob, 'app_iter') and hasattr(ob, 'headerlist') and
hasattr(ob, 'status') ):
return True