Changed the implementation of returning tuples from functions

This commit is contained in:
Armin Ronacher 2012-04-09 15:56:33 +01:00
parent 3249eeb438
commit cf1641e5be
5 changed files with 61 additions and 33 deletions

View file

@ -19,6 +19,21 @@ installation, make sure to pass it the ``-U`` parameter::
$ easy_install -U Flask
Version 0.9
-----------
The behavior of returning tuples from a function was simplified. If you
return a tuple it no longer defines the arguments for the response object
you're creating, it's now always a tuple in the form ``(response, status,
headers)`` where at least one item has to be provided. If you depend on
the old behavior, you can add it easily by subclassing Flask::
class TraditionalFlask(Flask):
def make_response(self, rv):
if isinstance(rv, tuple):
return self.response_class(*rv)
return Flask.make_response(self, rv)
Version 0.8
-----------