@@ -16,8 +16,9 @@ from sqlite3 import (
16
16
ProgrammingError as ProgrammingError ,
17
17
Row as Row ,
18
18
Warning as Warning ,
19
+ _IsolationLevel ,
19
20
)
20
- from typing import Any , Final , Literal , TypeVar , overload
21
+ from typing import Any , Final , TypeVar , overload
21
22
from typing_extensions import TypeAlias
22
23
23
24
if sys .version_info >= (3 , 11 ):
@@ -225,7 +226,7 @@ if sys.version_info >= (3, 12):
225
226
database : StrOrBytesPath ,
226
227
timeout : float = 5.0 ,
227
228
detect_types : int = 0 ,
228
- isolation_level : Literal [ "DEFERRED" , "EXCLUSIVE" , "IMMEDIATE" ] | None = "DEFERRED" ,
229
+ isolation_level : _IsolationLevel = "DEFERRED" ,
229
230
check_same_thread : bool = True ,
230
231
cached_statements : int = 128 ,
231
232
uri : bool = False ,
@@ -237,7 +238,7 @@ if sys.version_info >= (3, 12):
237
238
database : StrOrBytesPath ,
238
239
timeout : float ,
239
240
detect_types : int ,
240
- isolation_level : Literal [ "DEFERRED" , "EXCLUSIVE" , "IMMEDIATE" ] | None ,
241
+ isolation_level : _IsolationLevel ,
241
242
check_same_thread : bool ,
242
243
factory : type [_ConnectionT ],
243
244
cached_statements : int = 128 ,
@@ -250,7 +251,7 @@ if sys.version_info >= (3, 12):
250
251
database : StrOrBytesPath ,
251
252
timeout : float = 5.0 ,
252
253
detect_types : int = 0 ,
253
- isolation_level : Literal [ "DEFERRED" , "EXCLUSIVE" , "IMMEDIATE" ] | None = "DEFERRED" ,
254
+ isolation_level : _IsolationLevel = "DEFERRED" ,
254
255
check_same_thread : bool = True ,
255
256
* ,
256
257
factory : type [_ConnectionT ],
@@ -265,7 +266,7 @@ else:
265
266
database : StrOrBytesPath ,
266
267
timeout : float = 5.0 ,
267
268
detect_types : int = 0 ,
268
- isolation_level : Literal [ "DEFERRED" , "EXCLUSIVE" , "IMMEDIATE" ] | None = "DEFERRED" ,
269
+ isolation_level : _IsolationLevel = "DEFERRED" ,
269
270
check_same_thread : bool = True ,
270
271
cached_statements : int = 128 ,
271
272
uri : bool = False ,
@@ -275,7 +276,7 @@ else:
275
276
database : StrOrBytesPath ,
276
277
timeout : float ,
277
278
detect_types : int ,
278
- isolation_level : Literal [ "DEFERRED" , "EXCLUSIVE" , "IMMEDIATE" ] | None ,
279
+ isolation_level : _IsolationLevel ,
279
280
check_same_thread : bool ,
280
281
factory : type [_ConnectionT ],
281
282
cached_statements : int = 128 ,
@@ -286,7 +287,7 @@ else:
286
287
database : StrOrBytesPath ,
287
288
timeout : float = 5.0 ,
288
289
detect_types : int = 0 ,
289
- isolation_level : Literal [ "DEFERRED" , "EXCLUSIVE" , "IMMEDIATE" ] | None = "DEFERRED" ,
290
+ isolation_level : _IsolationLevel = "DEFERRED" ,
290
291
check_same_thread : bool = True ,
291
292
* ,
292
293
factory : type [_ConnectionT ],
0 commit comments