docs/changes/1.1.0.rst
.. falcon-release: 2016-10-27
(None)
A new bounded_stream property was added to :class:falcon.Request
that can be used in place of the stream property to mitigate
the blocking behavior of input objects used by some WSGI servers.
A new uri_template property was added to :class:~falcon.Request
to expose the template for the route corresponding to the
path requested by the user agent.
A context property was added to :class:~falcon.Response to mirror
the same property that is already available for
:class:~falcon.Request.
JSON-encoded query parameter values can now be retrieved and decoded
in a single step via :meth:~falcon.Request.get_param_as_dict.
CSV-style parsing of query parameter values can now be disabled.
:meth:~falcon.Request.get_param_as_bool now recognizes "on" and
"off" in support of IE's default checkbox values.
An accept_ranges property was added to :class:~falcon.Response to
facilitate setting the Accept-Ranges header.
Added the :class:~falcon.HTTPUriTooLong and
:class:~falcon.HTTPGone error classes.
When a title is not specified for :class:~falcon.HTTPError, it now
defaults to the HTTP status text.
All parameters are now optional for most error classes.
Cookie-related documentation has been clarified and expanded
The :class:falcon.testing.Cookie class was added to represent a
cookie returned by a simulated request. :class:falcon.testing.Result
now exposes a cookies attribute for examining returned cookies.
pytest support was added to Falcon's testing framework. Apps can now choose to either write unittest- or pytest-style tests.
The test runner for Falcon's own tests was switched from nose to pytest.
When simulating a request using Falcon's testing framework, query
string parameters can now be specified as a :class:dict, as
an alternative to passing a raw query string.
A flag is now passed to the process_request middleware method to
signal whether or not an exception was raised while processing the
request. A shim was added to avoid breaking existing middleware
methods that do not yet accept this new parameter.
A new CLI utility, falcon-print-routes, was added that takes in a
module:callable, introspects the routes, and prints the
results to stdout. This utility is automatically installed along
with the framework::
$ falcon-print-routes commissaire:api -> /api/v0/status -> /api/v0/cluster/{name} -> /api/v0/cluster/{name}/hosts -> /api/v0/cluster/{name}/hosts/{address}
Custom attributes can now be attached to instances of
:class:~falcon.Request and :class:~falcon.Response. This can be
used as an alternative to adding values to the context property,
or implementing custom subclasses.
:meth:~falcon.get_http_status was implemented to provide a way to
look up a full HTTP status line, given just a status code.
auto_parse_form_urlencoded is
set to True, the framework now checks the HTTP method before
attempting to consume and parse the body.~falcon.HTTPMethodNotAllowed, rather
than modifying the :class:~falcon.Request object directly. This
improves visibility for custom error handlers and for middleware
methods.~falcon.Response object) before middleware
methods are called.~falcon.HTTPError or
:class:~falcon.HTTPStatus was raised.~falcon.uri.encode method will now attempt to detect
whether the specified string has already been encoded, and return
it unchanged if that is the case.falcon.testing.Result now assumes that the response body
is encoded as UTF-8 when the character set is not specified, rather
than raising an error when attempting to decode the response body.import falcon.uri now works, in addition to
from falcon import uri.inspect.signature() is used
instead of :meth:inspect.getargspec() to provide compatibility with
annotated functions.