summaryrefslogtreecommitdiff
path: root/CHANGES.txt
diff options
context:
space:
mode:
authorMichael Merickel <michael@merickel.org>2015-02-22 12:58:42 -0600
committerMichael Merickel <michael@merickel.org>2015-02-22 12:58:42 -0600
commit71bb8cc91d7c6ab919e0680e40d5c5c375955be3 (patch)
tree40e164a2677c2a089c86f6b8735c4e652533378b /CHANGES.txt
parent1e02bbfc0df09259bf207112acf019c8dba44a90 (diff)
parent04206845591cb5af1038a29f6e943bfb169c2d5c (diff)
downloadpyramid-71bb8cc91d7c6ab919e0680e40d5c5c375955be3.tar.gz
pyramid-71bb8cc91d7c6ab919e0680e40d5c5c375955be3.tar.bz2
pyramid-71bb8cc91d7c6ab919e0680e40d5c5c375955be3.zip
Merge pull request #1563 from Pylons/fix.idempotent-render-to-response
update render_to_response to prevent renderers from mutating request.response
Diffstat (limited to 'CHANGES.txt')
-rw-r--r--CHANGES.txt14
1 files changed, 14 insertions, 0 deletions
diff --git a/CHANGES.txt b/CHANGES.txt
index ca2020cdb..3084bcfe6 100644
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@ -102,6 +102,20 @@ Features
- Support keyword-only arguments and function annotations in views in
Python 3. See https://github.com/Pylons/pyramid/pull/1556
+- ``request.response`` will no longer be mutated when using the
+ ``pyramid.renderers.render_to_response()`` API. It is now necessary to
+ pass in a ``response=`` argument to ``render_to_response`` if you wish to
+ supply the renderer with a custom response object for it to use. If you
+ do not pass one then a response object will be created using the
+ application's ``IResponseFactory``. Almost all renderers
+ mutate the ``request.response`` response object (for example, the JSON
+ renderer sets ``request.response.content_type`` to ``application/json``).
+ However, when invoking ``render_to_response`` it is not expected that the
+ response object being returned would be the same one used later in the
+ request. The response object returned from ``render_to_response`` is now
+ explicitly different from ``request.response``. This does not change the
+ API of a renderer. See https://github.com/Pylons/pyramid/pull/1563
+
Bug Fixes
---------