Skip to content
Myr

copy_current_request_context can decorate async functions

Before adoption: this commit came in with the history the project adopted, so no landing records it.

authored by pgjones · committed by David Lord · parent 6b0c8cd · Browse files · 2 files+4 added−1 removed
This commit

State

Before adoption: this commit came in with the history the project adopted, so no landing records it.

Diff stats

2 files+4 added−1 removed

  • other:+4 added−1 removed

2 files+4 added−1 removed

modified:src/flask/ctx.py+1 added-1 removed
167 unmodified lines
168 reqctx = top.copy()169170 def wrapper(*args, **kwargs):171 with reqctx:172 return f(*args, **kwargs)172 return reqctx.app.ensure_sync(f)(*args, **kwargs)173174 return update_wrapper(wrapper, f)175176
304 unmodified lines
modified:CHANGES.rst+3 added
27 unmodified lines
28 - ``cache_timeout`` is renamed to ``max_age``.29 - ``add_etags`` is renamed to ``etag``.30 - ``filename`` is renamed to ``path``.3132- ``copy_current_request_context`` can decorate async functions.33 :pr:`4303`343536Version 2.0.337-------------3839Unreleased
1192 unmodified lines