bpo-45613: Set sqlite3.threadsafety dynamically (GH-29227)

Use the compile-time selected default SQLite threaded mode to set the
DB-API 2.0 attribute 'threadsafety'

Mappings:
  - SQLITE_THREADSAFE=0 => threadsafety=0
  - SQLITE_THREADSAFE=1 => threadsafety=3
  - SQLITE_THREADSAFE=2 => threadsafety=1
This commit is contained in:
Erlend Egeberg Aasland 2021-11-03 22:01:37 +01:00 committed by GitHub
parent 762173c670
commit c273986711
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
6 changed files with 72 additions and 18 deletions

View file

@ -28,8 +28,6 @@ from _sqlite3 import *
paramstyle = "qmark"
threadsafety = 1
apilevel = "2.0"
Date = datetime.date