diff options
| author | Michael Merickel <michael@merickel.org> | 2012-08-16 02:28:43 -0500 |
|---|---|---|
| committer | Michael Merickel <michael@merickel.org> | 2012-08-16 02:28:43 -0500 |
| commit | 2c25342383eed7b10e349b2396eed08d332cfb80 (patch) | |
| tree | 32a6d3df47e1a9453412c6032e6c3b0fa2ab98a6 | |
| parent | 7e13f5bd32cf3df99f8b4d3993cb99023021477c (diff) | |
| download | pyramid-2c25342383eed7b10e349b2396eed08d332cfb80.tar.gz pyramid-2c25342383eed7b10e349b2396eed08d332cfb80.tar.bz2 pyramid-2c25342383eed7b10e349b2396eed08d332cfb80.zip | |
docs-deprecated set_request_property
| -rw-r--r-- | CHANGES.txt | 24 | ||||
| -rw-r--r-- | docs/api/config.rst | 4 | ||||
| -rw-r--r-- | docs/narr/advconfig.rst | 2 | ||||
| -rw-r--r-- | pyramid/config/factories.py | 10 |
4 files changed, 28 insertions, 12 deletions
diff --git a/CHANGES.txt b/CHANGES.txt index f02925585..b2f37355b 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -64,13 +64,17 @@ Features HEAD is a variant of GET that omits the body, and WebOb has special support to return an empty body when a HEAD is used. -- ``config.set_request_property`` now causes less code to be executed at - request construction time. - -- Don't add a ``?`` to URLs generated by request.resource_url if the +- ``config.set_request_method`` has been introduced to support extending + request objects with arbitrary callables. This method expands on the + previous ``config.set_request_property`` by supporting methods as well as + properties. This method now causes less code to be executed at + request construction time than ``config.set_request_property`` in + version 1.3. + +- Don't add a ``?`` to URLs generated by ``request.resource_url`` if the ``query`` argument is provided but empty. -- Don't add a ``?`` to URLs generated by request.route_url if the +- Don't add a ``?`` to URLs generated by ``request.route_url`` if the ``_query`` argument is provided but empty. - The static view machinery now raises (rather than returns) ``HTTPNotFound`` @@ -100,3 +104,13 @@ Features config = Configurator() config.add_permission('view') + +Deprecations +------------ + +- The documentation for + ``pyramid.config.Configurator.set_request_property`` has been removed. + The method remains usable but the more featureful + ``pyramid.config.Configurator.set_request_method`` should be used in its + place. It has all of the same capabilities but can also extend the + request object with methods. diff --git a/docs/api/config.rst b/docs/api/config.rst index 1b887988a..8dbe6de91 100644 --- a/docs/api/config.rst +++ b/docs/api/config.rst @@ -38,9 +38,9 @@ .. automethod:: set_default_permission .. automethod:: add_permission - :methodcategory:`Setting Request Properties` + :methodcategory:`Extending the Request Object` - .. automethod:: set_request_property + .. automethod:: set_request_method :methodcategory:`Using I18N` diff --git a/docs/narr/advconfig.rst b/docs/narr/advconfig.rst index 2949dc808..0ad2fdc95 100644 --- a/docs/narr/advconfig.rst +++ b/docs/narr/advconfig.rst @@ -296,7 +296,7 @@ These are the methods of the configurator which provide conflict detection: :meth:`~pyramid.config.Configurator.add_renderer`, :meth:`~pyramid.config.Configurator.set_request_factory`, :meth:`~pyramid.config.Configurator.set_session_factory`, -:meth:`~pyramid.config.Configurator.set_request_property`, +:meth:`~pyramid.config.Configurator.set_request_method`, :meth:`~pyramid.config.Configurator.set_root_factory`, :meth:`~pyramid.config.Configurator.set_view_mapper`, :meth:`~pyramid.config.Configurator.set_authentication_policy`, diff --git a/pyramid/config/factories.py b/pyramid/config/factories.py index cf4f0fdf0..e3637cbd2 100644 --- a/pyramid/config/factories.py +++ b/pyramid/config/factories.py @@ -184,10 +184,12 @@ class FactoriesConfiguratorMixin(object): def set_request_property(self, callable, name=None, reify=False): """ Add a property to the request object. - This method has been replaced by - :meth:`pyramid.config.Configurator.set_request_method` in - version :app:`Pyramid` version 1.4, more details can be found - there. + .. warning:: + + This method has been replaced by + :meth:`pyramid.config.Configurator.set_request_method` in + version :app:`Pyramid` version 1.4, more details can be found + there. .. versionadded:: 1.3 """ |
