]> git.ipfire.org Git - thirdparty/psycopg.git/commitdiff
Document that the ProactorEventLoop is incompatible with Psycopg
authorDaniele Varrazzo <daniele.varrazzo@gmail.com>
Tue, 28 Sep 2021 20:35:52 +0000 (22:35 +0200)
committerDaniele Varrazzo <daniele.varrazzo@gmail.com>
Tue, 28 Sep 2021 20:35:52 +0000 (22:35 +0200)
docs/advanced/async.rst

index c49d6002c08c484b59f101397549e4690a7617da..a6d4045f10c71a436a92af9c35eb36da50d7168c 100644 (file)
@@ -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