From 0ce270d1f3615f222226fb316e505a60c1e3baab Mon Sep 17 00:00:00 2001 From: laggardkernel Date: Wed, 12 May 2021 05:44:00 +0800 Subject: [PATCH] Update doc about minimal Python version for async support --- docs/async-await.rst | 3 ++- docs/installation.rst | 2 ++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/docs/async-await.rst b/docs/async-await.rst index 34751d47..ad7cbf38 100644 --- a/docs/async-await.rst +++ b/docs/async-await.rst @@ -7,7 +7,8 @@ Using ``async`` and ``await`` Routes, error handlers, before request, after request, and teardown 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``. .. code-block:: python diff --git a/docs/installation.rst b/docs/installation.rst index aef7df0c..a5d105f7 100644 --- a/docs/installation.rst +++ b/docs/installation.rst @@ -8,6 +8,8 @@ Python Version We recommend using the latest version of Python. Flask supports Python 3.6 and newer. +``async`` support in Flask requires Python 3.7+ for ``contextvars.ContextVar``. + Dependencies ------------