]> git.ipfire.org Git - thirdparty/sqlalchemy/sqlalchemy.git/commit
Support aiosqlite 0.22.0+
authorFederico Caselli <cfederico87@gmail.com>
Wed, 24 Dec 2025 13:02:17 +0000 (14:02 +0100)
committerMike Bayer <mike_mp@zzzcomputing.com>
Thu, 1 Jan 2026 17:54:47 +0000 (12:54 -0500)
commit380c234ce901416ca3c04453744f33d53cc4bd55
treeee1e2987054939a666bb9d512cbd08d452f9e17b
parenta96c607cc53f16b364d5025c5a5de1470661d3c9
Support aiosqlite 0.22.0+

Fixed issue in the aiosqlite driver where SQLAlchemy's setting of
aiosqlite's worker thread to "daemon" stopped working because the aiosqlite
architecture moved the location of the worker thread in version 0.22.0.
This "daemon" flag is necessary so that a program is able to exit if the
SQLite connection itself was not explicitly closed, which is particularly
likely with SQLAlchemy as it maintains SQLite connections in a connection
pool.  While it's perfectly fine to call :meth:`.AsyncEngine.dispose`
before program exit, this is not historically or technically necessary for
any driver of any known backend, since a primary feature of relational
databases is durability.  The change also implements support for
"terminate" with aiosqlite when using version version 0.22.1 or greater,
which implements a sync ``.stop()`` method.

Fixes: #13039
Change-Id: I46efcbaab9dd028f673e113d5f6f2ceddfd133ca
doc/build/changelog/unreleased_20/13039.rst [new file with mode: 0644]
lib/sqlalchemy/dialects/sqlite/aiosqlite.py
test/ext/asyncio/test_engine.py