diff options
| author | Juliusz Gonera <jgonera@gmail.com> | 2011-04-19 11:29:40 +0200 |
|---|---|---|
| committer | Juliusz Gonera <jgonera@gmail.com> | 2011-04-19 11:29:40 +0200 |
| commit | e099a08f680c96afb931842ed15003626611dd7a (patch) | |
| tree | abe55237dee442ef43edd4c7886f7cec570ba7f4 /CHANGES.txt | |
| parent | e39ddf10c908d176915da23a6bd209e46815d3c0 (diff) | |
| parent | 6717ccbcd7f481e2a15c4ba318ccf6d63a1b7649 (diff) | |
| download | pyramid-e099a08f680c96afb931842ed15003626611dd7a.tar.gz pyramid-e099a08f680c96afb931842ed15003626611dd7a.tar.bz2 pyramid-e099a08f680c96afb931842ed15003626611dd7a.zip | |
Merge branch 'master' of git://github.com/Pylons/pyramid
Diffstat (limited to 'CHANGES.txt')
| -rw-r--r-- | CHANGES.txt | 49 |
1 files changed, 49 insertions, 0 deletions
diff --git a/CHANGES.txt b/CHANGES.txt index 15ec0d8e0..95387b03b 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -28,6 +28,14 @@ Documentation Features -------- +- Accessing the ``response`` attribute of a ``pyramid.request.Request`` + object (e.g. ``request.response`` within a view) now produces a new + ``pyramid.response.Response`` object. This feature is meant to be used + mainly when a view configured with a renderer needs to set response + attributes, but it can be used by any code to produce a response object + (although the response object produced must still be returned unless a + renderer is used). + - Integers and longs passed as ``elements`` to ``pyramid.url.resource_url`` or ``pyramid.request.Request.resource_url`` e.g. ``resource_url(context, request, 1, 2)`` (``1`` and ``2`` are the ``elements``) will now be @@ -124,6 +132,47 @@ Bug Fixes - Redirects issued by a static view did not take into account any existing ``SCRIPT_NAME`` (such as one set by a url mapping composite). Now they do. +Deprecations +------------ + +- Deprecated all assignments to ``request.response_*`` attributes (for + example ``request.response_content_type = 'foo'`` is now deprecated). + Assignments and mutations of assignable request attributes that were + considered by the framework for response influence are now deprecated: + ``response_content_type``, ``response_headerlist``, ``response_status``, + ``response_charset``, and ``response_cache_for``. Instead of assigning + these to the request object for later detection by the rendering machinery, + users should use the appropriate API of the Response object created by + accessing ``request.response`` (e.g. code which does + ``request.response_content_type = 'abc'`` should be changed to + ``request.response.content_type = 'abc'``). + +Behavior Changes +---------------- + +- A custom request factory is now required to return a response object that + has a ``response`` attribute (or "reified"/lazy property) if they the + request is meant to be used in a view that uses a renderer. This + ``response`` attribute should be an instance of the class + ``pyramid.response.Response``. + +- The JSON and string renderer factories now assign to + ``request.response.content_type`` rather than + ``request.response_content_type``. Each renderer factory determines + whether it should change the content type of the response by comparing the + response's content type against the response's default content type; if the + content type is not the default content type (usually ``text/html``), the + renderer changes the content type (to ``application/json`` or + ``text/plain`` for JSON and string renderers respectively). + +Dependencies +------------ + +- Pyramid now depends on WebOb >= 1.0.2 as tests depend on the bugfix in that + release: "Fix handling of WSGI environs with missing ``SCRIPT_NAME``". + (Note that in reality, everyone should probably be using 1.0.4 or better + though, as WebOb 1.0.2 and 1.0.3 were effectively brownbag releases.) + 1.0 (2011-01-30) ================ |
