From c357bdd7cf2778a3112a974f1f3ab09085312b92 Mon Sep 17 00:00:00 2001 From: anand Date: Mon, 29 Sep 2025 22:35:17 +0530 Subject: [PATCH] Clarify asyncio and gevent incompatibility in docs (#5817) --- docs/async-await.rst | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/docs/async-await.rst b/docs/async-await.rst index 16b61945..fa0caf4a 100644 --- a/docs/async-await.rst +++ b/docs/async-await.rst @@ -29,6 +29,17 @@ well as all the HTTP method handlers in views that inherit from the runtime, greenlet>=1.0 is required. When using PyPy, PyPy>=7.3.7 is required. + **Compatibility with Gevent** + + Flask's asynchronous support relies on the ``asgiref`` library, which is + not compatible with ``gevent``. When using ``gevent`` or ``eventlet`` to + serve a Flask application or patch the runtime, asynchronous operations + may not function as expected. + + If you require asynchronous support, consider using an ASGI server like + ``uvicorn`` or ``hypercorn``, which are designed to work seamlessly with + Flask's async capabilities. + Performance -----------