From 0cbd7aa5a72890d46efa8fc35d6ea3c9b9ae9f87 Mon Sep 17 00:00:00 2001 From: Daniele Varrazzo Date: Tue, 28 Sep 2021 22:35:52 +0200 Subject: [PATCH] Document that the ProactorEventLoop is incompatible with Psycopg --- docs/advanced/async.rst | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/docs/advanced/async.rst b/docs/advanced/async.rst index c49d6002c..a6d4045f1 100644 --- a/docs/advanced/async.rst +++ b/docs/advanced/async.rst @@ -40,6 +40,21 @@ here and there. .. __: https://www.postgresql.org/docs/current/libpq-connect.html #LIBPQ-PARAMKEYWORDS +.. warning:: + + On Windows, Psycopg is not compatible with the default + `~asyncio.ProactorEventLoop`. Please use a different loop, for instance + the `~asyncio.SelectorEventLoop`. + + For instance, you can use, early in your program: + + .. parsed-literal:: + + `asyncio.set_event_loop_policy`\ ( + `asyncio.WindowsSelectorEventLoopPolicy`\ () + ) + + .. index:: with -- 2.47.2