summaryrefslogtreecommitdiff
path: root/docs/whatsnew-1.3.rst
diff options
context:
space:
mode:
authorChris McDonough <chrism@plope.com>2012-02-22 19:28:58 -0500
committerChris McDonough <chrism@plope.com>2012-02-22 19:28:58 -0500
commit6d0bce1dabce486cd6a6bc1fa7668ca863c0656a (patch)
tree18f0c2d4c7cee39e8938d6c77b4e0792761382bd /docs/whatsnew-1.3.rst
parentbb40d09a0241b9e19cdc86186a7abd30d4d491d3 (diff)
parente9b51b719db22e3e41e3b22c584f40b20971aa98 (diff)
downloadpyramid-6d0bce1dabce486cd6a6bc1fa7668ca863c0656a.tar.gz
pyramid-6d0bce1dabce486cd6a6bc1fa7668ca863c0656a.tar.bz2
pyramid-6d0bce1dabce486cd6a6bc1fa7668ca863c0656a.zip
Merge branch '1.3-branch'
Diffstat (limited to 'docs/whatsnew-1.3.rst')
-rw-r--r--docs/whatsnew-1.3.rst80
1 files changed, 79 insertions, 1 deletions
diff --git a/docs/whatsnew-1.3.rst b/docs/whatsnew-1.3.rst
index d2df88093..101caed94 100644
--- a/docs/whatsnew-1.3.rst
+++ b/docs/whatsnew-1.3.rst
@@ -128,7 +128,6 @@ application developer.
New APIs were added to support introspection
:attr:`pyramid.registry.Introspectable`,
-:attr:`pyramid.registry.noop_introspector`,
:attr:`pyramid.config.Configurator.introspector`,
:attr:`pyramid.config.Configurator.introspectable`,
:attr:`pyramid.registry.Registry.introspector`.
@@ -212,6 +211,38 @@ added, as well, but the configurator method should be preferred as it
provides conflict detection and consistency in the lifetime of the
properties.
+Not Found and Forbidden View Helpers
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+Not Found helpers:
+
+- New API: :meth:`pyramid.config.Configurator.add_notfound_view`. This is a
+ wrapper for :meth:`pyramid.Config.configurator.add_view` which provides
+ support for an "append_slash" feature as well as doing the right thing when
+ it comes to permissions (a not found view should always be public). It
+ should be preferred over calling ``add_view`` directly with
+ ``context=HTTPNotFound`` as was previously recommended.
+
+- New API: :class:`pyramid.view.notfound_view_config``. This is a decorator
+ constructor like :class:`pyramid.view.view_config` that calls
+ :meth:`pyramid.config.Configurator.add_notfound_view` when scanned. It
+ should be preferred over using ``pyramid.view.view_config`` with
+ ``context=HTTPNotFound`` as was previously recommended.
+
+Forbidden helpers:
+
+- New API: :meth:`pyramid.config.Configurator.add_forbidden_view`. This is a
+ wrapper for :meth:`pyramid.Config.configurator.add_view` which does the
+ right thing about permissions. It should be preferred over calling
+ ``add_view`` directly with ``context=HTTPForbidden`` as was previously
+ recommended.
+
+- New API: :class:`pyramid.view.forbidden_view_config`. This is a decorator
+ constructor like :class:`pyramid.view.view_config` that calls
+ :meth:`pyramid.config.Configurator.add_forbidden_view` when scanned. It
+ should be preferred over using ``pyramid.view.view_config`` with
+ ``context=HTTPForbidden`` as was previously recommended.
+
Minor Feature Additions
-----------------------
@@ -409,6 +440,38 @@ Backwards Incompatibilities
``pyramid.interfaces.IContextURL`` adapter is found when
:meth:`pyramid.request.Request.resource_url` is called.
+- Remove ``pyramid.config.Configurator.with_context`` class method. It was
+ never an API, it is only used by ``pyramid_zcml`` and its functionality has
+ been moved to that package's latest release. This means that you'll need
+ to use the 0.9.2 or later release of ``pyramid_zcml`` with this release of
+ Pyramid.
+
+- The older deprecated ``set_notfound_view`` Configurator method is now an
+ alias for the new ``add_notfound_view`` Configurator method. Likewise, the
+ older deprecated ``set_forbidden_view`` is now an alias for the new
+ ``add_forbidden_view`` Configurator method. This has the following impact:
+ the ``context`` sent to views with a ``(context, request)`` call signature
+ registered via the ``set_notfound_view`` or ``set_forbidden_view`` will now
+ be an exception object instead of the actual resource context found. Use
+ ``request.context`` to get the actual resource context. It's also
+ recommended to disuse ``set_notfound_view`` in favor of
+ ``add_notfound_view``, and disuse ``set_forbidden_view`` in favor of
+ ``add_forbidden_view`` despite the aliasing.
+
+Deprecations
+------------
+
+- The API documentation for ``pyramid.view.append_slash_notfound_view`` and
+ ``pyramid.view.AppendSlashNotFoundViewFactory`` was removed. These names
+ still exist and are still importable, but they are no longer APIs. Use
+ ``pyramid.config.Configurator.add_notfound_view(append_slash=True)`` or
+ ``pyramid.view.notfound_view_config(append_slash=True)`` to get the same
+ behavior.
+
+- The ``set_forbidden_view`` and ``set_notfound_view`` methods of the
+ Configurator were removed from the documentation. They have been
+ deprecated since Pyramid 1.1.
+
Documentation Enhancements
--------------------------
@@ -441,6 +504,21 @@ Documentation Enhancements
Rationale: it provides the correct info for the Python 2.5 version of GAE
only, and this version of Pyramid does not support Python 2.5.
+- Updated the :ref:`changing_the_forbidden_view` section, replacing
+ explanations of registering a view using ``add_view`` or ``view_config``
+ with ones using ``add_forbidden_view`` or ``forbidden_view_config``.
+
+- Updated the :ref:`changing_the_notfound_view` section, replacing
+ explanations of registering a view using ``add_view`` or ``view_config``
+ with ones using ``add_notfound_view`` or ``notfound_view_config``.
+
+- Updated the :ref:`redirecting_to_slash_appended_routes` section, replacing
+ explanations of registering a view using ``add_view`` or ``view_config``
+ with ones using ``add_notfound_view`` or ``notfound_view_config``
+
+- Updated all tutorials to use ``pyramid.view.forbidden_view_config`` rather
+ than ``pyramid.view.view_config`` with an HTTPForbidden context.
+
Dependency Changes
------------------