diff options
| -rw-r--r-- | docs/api/request.rst | 2 | ||||
| -rw-r--r-- | docs/narr/renderers.rst | 3 | ||||
| -rw-r--r-- | pyramid/config/factories.py | 4 | ||||
| -rw-r--r-- | pyramid/interfaces.py | 8 | ||||
| -rw-r--r-- | pyramid/response.py | 12 |
5 files changed, 11 insertions, 18 deletions
diff --git a/docs/api/request.rst b/docs/api/request.rst index 9f1f71b31..7b843f86e 100644 --- a/docs/api/request.rst +++ b/docs/api/request.rst @@ -245,7 +245,7 @@ influence response values from a view that uses a renderer (such as the status code, a header, the content type, etc) you would set these attributes. See :ref:`response_prefixed_attrs` for further discussion. - As of Pyramid 1.1, assignment to ``response_*`` attrs are deprecated. + As of Pyramid 1.1, assignment to ``response_*`` attrs is deprecated. Assigning to one is still supported but will cause a deprecation warning to be emitted, and eventually the feature will be removed. For new code, instead of assigning ``response_*`` attributes to the diff --git a/docs/narr/renderers.rst b/docs/narr/renderers.rst index 863932e83..34b9ad00c 100644 --- a/docs/narr/renderers.rst +++ b/docs/narr/renderers.rst @@ -565,9 +565,6 @@ in :ref:`request_module`. For more information on the API of Deprecated Mechanism to Vary Attributes of Rendered Responses ------------------------------------------------------------- -.. deprecated:: 1.1 - The behavior described in this entire section. - In previous releases of Pyramid (1.0 and before), the ``request.response`` attribute did not exist. Instead, Pyramid required users to set special ``response_`` -prefixed attributes of the request to influence response diff --git a/pyramid/config/factories.py b/pyramid/config/factories.py index ef7975d92..d30df3b74 100644 --- a/pyramid/config/factories.py +++ b/pyramid/config/factories.py @@ -182,9 +182,7 @@ class FactoriesConfiguratorMixin(object): def set_request_property(self, callable, name=None, reify=False): """ Add a property to the request object. - .. warning:: - - This method has been docs-deprecated as of Pyramid 1.4. + .. deprecated:: 1.4 :meth:`pyramid.config.Configurator.add_request_method` should be used instead. diff --git a/pyramid/interfaces.py b/pyramid/interfaces.py index 54bce6fd2..0a5ec9588 100644 --- a/pyramid/interfaces.py +++ b/pyramid/interfaces.py @@ -744,10 +744,8 @@ class IResourceURL(Interface): class IContextURL(IResourceURL): """ An adapter which deals with URLs related to a context. - ..warning:: - - This interface is deprecated as of Pyramid 1.3 with the introduction of - IResourceURL. + .. deprecated:: 1.3 + use IResourceURL instead. """ # this class subclasses IResourceURL because request.resource_url looks # for IResourceURL via queryAdapter. queryAdapter will find a deprecated @@ -792,7 +790,7 @@ deprecated( 'scheduled to be removed. Use the ' '"pyramid.config.Configurator.add_resource_url_adapter" method to register ' 'a class that implements "pyramid.interfaces.IResourceURL" instead. ' - 'See the "What\'s new In Pyramid 1.3" document for a further description.' + 'See the "What\'s new In Pyramid 1.3" document for more details.' ) class IPackageOverrides(Interface): diff --git a/pyramid/response.py b/pyramid/response.py index 1dccb7ae8..0f61af472 100644 --- a/pyramid/response.py +++ b/pyramid/response.py @@ -35,20 +35,20 @@ class FileResponse(Response): ``path`` is a file path on disk. - ``request`` must be a Pyramid :term:`request` object if passed. Note + ``request`` must be a Pyramid :term:`request` object. Note that a request *must* be passed if the response is meant to attempt to use the ``wsgi.file_wrapper`` feature of the web server that you're using to serve your Pyramid application. - ``cache_max_age`` if passed, is the number of seconds that should be used + ``cache_max_age`` is the number of seconds that should be used to HTTP cache this response. - ``content_type``, if passed, is the content_type of the response. + ``content_type`` is the content_type of the response. - ``content_encoding``, if passed is the content_encoding of the response. + ``content_encoding`` is the content_encoding of the response. It's generally safe to leave this set to ``None`` if you're serving a - binary file. This argument will be ignored if you don't also pass - ``content-type``. + binary file. This argument will be ignored if you also leave + ``content-type`` as ``None``. """ def __init__(self, path, request=None, cache_max_age=None, content_type=None, content_encoding=None): |
