@@ -233,8 +233,9 @@ def connect(
233233) -> Connection : ...
234234def enable_callback_tracebacks (__enable : bool ) -> None : ...
235235
236- # takes a pos-or-keyword argument because there is a C wrapper
237- def enable_shared_cache (enable : int ) -> None : ...
236+ if sys .version_info < (3 , 12 ):
237+ # takes a pos-or-keyword argument because there is a C wrapper
238+ def enable_shared_cache (enable : int ) -> None : ...
238239
239240if sys .version_info >= (3 , 10 ):
240241 def register_adapter (__type : type [_T ], __adapter : _Adapter [_T ]) -> None : ...
@@ -298,6 +299,11 @@ class Connection:
298299 isolation_level : str | None # one of '', 'DEFERRED', 'IMMEDIATE' or 'EXCLUSIVE'
299300 @property
300301 def total_changes (self ) -> int : ...
302+ if sys .version_info >= (3 , 12 ):
303+ @property
304+ def autocommit (self ) -> int : ...
305+ @autocommit .setter
306+ def autocommit (self , val : int ) -> None : ...
301307 row_factory : Any
302308 text_factory : Any
303309 def __init__ (
@@ -375,6 +381,9 @@ class Connection:
375381 def getlimit (self , __category : int ) -> int : ...
376382 def serialize (self , * , name : str = "main" ) -> bytes : ...
377383 def deserialize (self , __data : ReadableBuffer , * , name : str = "main" ) -> None : ...
384+ if sys .version_info >= (3 , 12 ):
385+ def getconfig (self , __op : int ) -> bool : ...
386+ def setconfig (self , __op : int , __enable : bool = True ) -> bool : ...
378387
379388 def __call__ (self , __sql : str ) -> _Statement : ...
380389 def __enter__ (self ) -> Self : ...
0 commit comments