Update doc about minimal Python version for async support

This commit is contained in:
laggardkernel 2021-05-12 05:44:00 +08:00 committed by Phil Jones
parent 8e589daaf2
commit 0ce270d1f3
2 changed files with 4 additions and 1 deletions

View file

@ -7,7 +7,8 @@ Using ``async`` and ``await``
Routes, error handlers, before request, after request, and teardown Routes, error handlers, before request, after request, and teardown
functions can all be coroutine functions if Flask is installed with the functions can all be coroutine functions if Flask is installed with the
``async`` extra (``pip install flask[async]``). This allows views to be ``async`` extra (``pip install flask[async]``). It requires Python 3.7+
where ``contextvars.ContextVar`` is available. This allows views to be
defined with ``async def`` and use ``await``. defined with ``async def`` and use ``await``.
.. code-block:: python .. code-block:: python

View file

@ -8,6 +8,8 @@ Python Version
We recommend using the latest version of Python. Flask supports Python We recommend using the latest version of Python. Flask supports Python
3.6 and newer. 3.6 and newer.
``async`` support in Flask requires Python 3.7+ for ``contextvars.ContextVar``.
Dependencies Dependencies
------------ ------------