From 6dabed304718e6a90f0b75d2e91c9b6d83d708a3 Mon Sep 17 00:00:00 2001 From: Manolo Rosario Evans Diaz Date: Sat, 27 Jan 2024 14:18:03 +0000 Subject: [PATCH] configure asyncio correctly for win32 usage. --- pgsqlite/pgsqlite.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/pgsqlite/pgsqlite.py b/pgsqlite/pgsqlite.py index 18b2e1c..df2c652 100644 --- a/pgsqlite/pgsqlite.py +++ b/pgsqlite/pgsqlite.py @@ -181,6 +181,8 @@ def __init__(self, sqlite_filename: str, pg_conninfo: str, show_sample_data: boo self.max_import_concurrency = max_import_concurrency db = Database(self.sqlite_filename) self._tables = {t.name: ParsedTable(t) for t in db.tables} + if sys.platform == "win32": + asyncio.set_event_loop_policy(asyncio.WindowsSelectorEventLoopPolicy()) @property def tables(self):