From 31f48b9153043eec014c5d3193a09212e749e75d Mon Sep 17 00:00:00 2001 From: William Blanke Date: Wed, 8 Jan 2025 20:52:11 -0800 Subject: [PATCH] sqlite cached_statements workaround --- chia/util/db_wrapper.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/chia/util/db_wrapper.py b/chia/util/db_wrapper.py index b1d2b05e07b0..4fa7323fb649 100644 --- a/chia/util/db_wrapper.py +++ b/chia/util/db_wrapper.py @@ -74,7 +74,8 @@ async def _create_connection( log_file: Optional[TextIO] = None, name: Optional[str] = None, ) -> aiosqlite.Connection: - connection = await aiosqlite.connect(database=database, uri=uri) + # To avoid https://github.com/python/cpython/issues/118172 + connection = await aiosqlite.connect(database=database, uri=uri, cached_statements=0) if log_file is not None: await connection.set_trace_callback(functools.partial(sql_trace_callback, file=log_file, name=name))