diff options
| author | Chris McDonough <chrism@plope.com> | 2011-10-06 13:27:30 -0400 |
|---|---|---|
| committer | Chris McDonough <chrism@plope.com> | 2011-10-06 13:27:30 -0400 |
| commit | 627593bbcd4ab52adc7ee569001cdda91c670d5d (patch) | |
| tree | 2dec02e1a6ab3f4089191b9c18a50cd38d05f01a /webob/response.py | |
| parent | 13b848b21df10e559452ec031f55c5537a4fa5e6 (diff) | |
| download | webob-627593bbcd4ab52adc7ee569001cdda91c670d5d.tar.gz | |
* ``Response.request`` and ``Response.environ`` attrs are undeprecated and no
longer raise exceptions when used. These can also be passed to the
Response constructor. This is to support codebases that pass them to the
constructor or assign them to a response instance. However, some behavior
differences from 1.1 exist. In particular, synchronization is no longer
done between environ and request attribute properties of Response; you may
pass either to the constructor (or both) or assign one or the other or
both, but they wont be managed specially and will remain the same over the
lifetime of the response just as you passed them. Default values for both
``request`` and ``environ`` on any given response are ``None`` now.
Diffstat (limited to 'webob/response.py')
| -rw-r--r-- | webob/response.py | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/webob/response.py b/webob/response.py index 3c1163a..853985d 100644 --- a/webob/response.py +++ b/webob/response.py @@ -51,7 +51,6 @@ from webob.descriptors import ( serialize_content_range, serialize_etag_response, serialize_int, - deprecated_property, ) from webob.headers import ResponseHeaders @@ -74,6 +73,8 @@ class Response(object): default_charset = 'UTF-8' # TODO: deprecate unicode_errors = 'strict' # TODO: deprecate (why would response body have errors?) default_conditional_response = False + request = None + environ = None # # __init__, from_file, copy @@ -1177,8 +1178,3 @@ def _error_unicode_in_app_iter(app_iter, body): raise TypeError( 'An item of the app_iter (%s) was text, causing a ' 'text body: %r' % (app_iter_repr, body)) - - -# TODO: remove in 1.4 -Response.request = deprecated_property('request', 'request', 'Response.request will be removed completely in 1.4', '1.2') -Response.environ = deprecated_property('environ', 'environ', 'Response.environ will be removed completely in 1.4', '1.2') |
