Repository navigation
Breaking changes:
util:- Remove
if_changed. pretty_link: only linkhttpandhttpsURLs. For other URLs, return just the link text.
- Remove
Non-breaking changes:
flask_util:- Add
bool_paramfor getting boolean query params/form arguments. - Add
csp_reporthandler for loggingContent-Security-Policyviolation reports. MODERN_HEADERS: tightenContent-Security-Policysignificantly.
- Add
models:- Fix missing import in
Cache.get/Cache.put.
- Fix missing import in
testutil:- Add
assert_html_equals, which compares HTML strings and ignores insignificant whitespace and attribute order. requests_response: back the returned response with aurllib3.HTTPResponseinstead of a bareBytesIO, so thatresp.raw.stream()works for code that streams responses.
- Add
util:requests_*: addcachekwarg, an opt-in Flask-request-local cache of GET/HEAD responses and exceptions, keyed on method, URL, andAcceptheader.encode: fixencodingkwarg, it was ignored for nested values and always used UTF-8.is_connection_failure: makeprawcoreimport optional.linkify,tokenize_links: fix duplicated trailing punctuation after a link, eghttp://foo.com/a)..becamehttp://foo.com/a)......clean_url: fix query params with escaped delimiters, eg?a=b%26clost the%26c. The query string was unescaped before it was parsed.maybe_iso8601_to_rfc3339: return non-string inputs unchanged instead of raisingAttributeError.pretty_link: HTML-escape the URL inhrefand theattrsvalues.to_utc_timestamp: fix timezone aware datetimes, they were read as wall clock time and their UTC offset was ignored.trim_nulls: addkeep_empty_values_inkwarg.