Skip to content

Commit bd319c2

Browse files
authored
db: disable DQS on Python >= 3.12 (#5235)
cf. #4709, let's see how badly this breaks CI
2 parents 265d513 + 7685e94 commit bd319c2

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

beets/dbcore/db.py

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1124,6 +1124,16 @@ def _create_connection(self) -> Connection:
11241124
# call conn.close() in _close()
11251125
check_same_thread=False,
11261126
)
1127+
1128+
if sys.version_info >= (3, 12) and sqlite3.sqlite_version_info >= (
1129+
3,
1130+
29,
1131+
0,
1132+
):
1133+
# If possible, disable double-quoted strings
1134+
conn.setconfig(sqlite3.SQLITE_DBCONFIG_DQS_DDL, 0)
1135+
conn.setconfig(sqlite3.SQLITE_DBCONFIG_DQS_DML, 0)
1136+
11271137
self.add_functions(conn)
11281138

11291139
if self.supports_extensions:

0 commit comments

Comments
 (0)