From: Daniele Varrazzo Date: Tue, 28 Sep 2021 20:35:52 +0000 (+0200) Subject: Document that the ProactorEventLoop is incompatible with Psycopg X-Git-Tag: 3.0~48 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=0cbd7aa5a72890d46efa8fc35d6ea3c9b9ae9f87;p=thirdparty%2Fpsycopg.git Document that the ProactorEventLoop is incompatible with Psycopg --- 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