db: disable DQS on Python >= 3.12 (#5235)

cf. https://github.com/beetbox/beets/issues/4709, let's see how badly
this breaks CI
This commit is contained in:
Šarūnas Nejus 2026-01-13 13:53:45 +00:00 committed by GitHub
commit bd319c2c43
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -1124,6 +1124,16 @@ class Database:
# call conn.close() in _close()
check_same_thread=False,
)
if sys.version_info >= (3, 12) and sqlite3.sqlite_version_info >= (
3,
29,
0,
):
# If possible, disable double-quoted strings
conn.setconfig(sqlite3.SQLITE_DBCONFIG_DQS_DDL, 0)
conn.setconfig(sqlite3.SQLITE_DBCONFIG_DQS_DML, 0)
self.add_functions(conn)
if self.supports_extensions: