Commit Graph

8 Commits

Author SHA1 Message Date
David Lord 1b552d0b01
remove ContextVar compat 2021-11-11 16:12:08 -08:00
Miguel Grinberg 270eb2df2a Support View and MethodView instances with async handlers 2021-06-01 18:08:19 +00:00
laggardkernel 0ce270d1f3 Update doc about minimal Python version for async support 2021-05-30 11:03:49 +00:00
pgjones 7f87f3dd93
Simplify the async handling code
Firstly `run_sync` was a misleading name as it didn't run anything,
instead I think `async_to_sync` is much clearer as it converts a
coroutine function to a function. (Name stolen from asgiref).

Secondly trying to run the ensure_sync during registration made the
code more complex and brittle, e.g. the _flask_async_wrapper
usage. This was done to pay any setup costs during registration rather
than runtime, however this only saved a iscoroutne check. It allows
the weirdness of the Blueprint and Scaffold ensure_sync methods to be
removed.

Switching to runtime ensure_sync usage provides a method for
extensions to also support async, as now documented.
2021-05-03 06:15:39 -07:00
Joshua Bronson 8bfce88e39
Minor docs fixes. (#3988) 2021-05-02 16:05:08 -04:00
Grey Li ec044a24e1 Add tips for using async on Windows on Python 3.8 2021-04-29 10:59:26 +08:00
pgjones f74cce164e Update documentation on asyncio background tasks
This has been an early question from users, so best to explain.
2021-04-17 15:13:33 +01:00
David Lord dc3e9c0cc3
update async docs 2021-04-06 15:33:06 -07:00