@@ -16,8 +16,9 @@ from sqlite3 import (
1616 ProgrammingError as ProgrammingError ,
1717 Row as Row ,
1818 Warning as Warning ,
19+ _IsolationLevel ,
1920)
20- from typing import Any , Final , Literal , TypeVar , overload
21+ from typing import Any , Final , TypeVar , overload
2122from typing_extensions import TypeAlias
2223
2324if sys .version_info >= (3 , 11 ):
@@ -225,7 +226,7 @@ if sys.version_info >= (3, 12):
225226 database : StrOrBytesPath ,
226227 timeout : float = 5.0 ,
227228 detect_types : int = 0 ,
228- isolation_level : Literal [ "DEFERRED" , "EXCLUSIVE" , "IMMEDIATE" ] | None = "DEFERRED" ,
229+ isolation_level : _IsolationLevel = "DEFERRED" ,
229230 check_same_thread : bool = True ,
230231 cached_statements : int = 128 ,
231232 uri : bool = False ,
@@ -237,7 +238,7 @@ if sys.version_info >= (3, 12):
237238 database : StrOrBytesPath ,
238239 timeout : float ,
239240 detect_types : int ,
240- isolation_level : Literal [ "DEFERRED" , "EXCLUSIVE" , "IMMEDIATE" ] | None ,
241+ isolation_level : _IsolationLevel ,
241242 check_same_thread : bool ,
242243 factory : type [_ConnectionT ],
243244 cached_statements : int = 128 ,
@@ -250,7 +251,7 @@ if sys.version_info >= (3, 12):
250251 database : StrOrBytesPath ,
251252 timeout : float = 5.0 ,
252253 detect_types : int = 0 ,
253- isolation_level : Literal [ "DEFERRED" , "EXCLUSIVE" , "IMMEDIATE" ] | None = "DEFERRED" ,
254+ isolation_level : _IsolationLevel = "DEFERRED" ,
254255 check_same_thread : bool = True ,
255256 * ,
256257 factory : type [_ConnectionT ],
@@ -265,7 +266,7 @@ else:
265266 database : StrOrBytesPath ,
266267 timeout : float = 5.0 ,
267268 detect_types : int = 0 ,
268- isolation_level : Literal [ "DEFERRED" , "EXCLUSIVE" , "IMMEDIATE" ] | None = "DEFERRED" ,
269+ isolation_level : _IsolationLevel = "DEFERRED" ,
269270 check_same_thread : bool = True ,
270271 cached_statements : int = 128 ,
271272 uri : bool = False ,
@@ -275,7 +276,7 @@ else:
275276 database : StrOrBytesPath ,
276277 timeout : float ,
277278 detect_types : int ,
278- isolation_level : Literal [ "DEFERRED" , "EXCLUSIVE" , "IMMEDIATE" ] | None ,
279+ isolation_level : _IsolationLevel ,
279280 check_same_thread : bool ,
280281 factory : type [_ConnectionT ],
281282 cached_statements : int = 128 ,
@@ -286,7 +287,7 @@ else:
286287 database : StrOrBytesPath ,
287288 timeout : float = 5.0 ,
288289 detect_types : int = 0 ,
289- isolation_level : Literal [ "DEFERRED" , "EXCLUSIVE" , "IMMEDIATE" ] | None = "DEFERRED" ,
290+ isolation_level : _IsolationLevel = "DEFERRED" ,
290291 check_same_thread : bool = True ,
291292 * ,
292293 factory : type [_ConnectionT ],
0 commit comments