aerich
aerich copied to clipboard
fix: update asyncio event loop policy on Windows
Fix for Windows incompatibility
On Windows, Psycopg is not compatible with the default ProactorEventLoop. Please use a different loop, for instance the SelectorEventLoop.
For instance, you can use, early in your program:
asyncio.set_event_loop_policy(
asyncio.WindowsSelectorEventLoopPolicy()
)
Source: https://www.psycopg.org/psycopg3/docs/advanced/async.html