@@ -138,7 +138,7 @@ def __init__(
138138
139139 if session :
140140 self ._session = session
141- self ._session .attached_to_cursor = True
141+ self ._session ._is_attached_to_cursor = True
142142 else :
143143 self ._session = None
144144
@@ -149,7 +149,7 @@ def __init__(
149149 if not isinstance (limit , int ):
150150 raise TypeError (f"limit must be an instance of int, not { type (limit )} " )
151151 validate_boolean ("no_cursor_timeout" , no_cursor_timeout )
152- if no_cursor_timeout and self ._session and self ._session .implicit :
152+ if no_cursor_timeout and self ._session and self ._session ._is_implicit :
153153 warnings .warn (
154154 "use an explicit session with no_cursor_timeout=True "
155155 "otherwise the cursor may still timeout after "
@@ -282,7 +282,7 @@ def clone(self) -> AsyncCursor[_DocumentType]:
282282 def _clone (self , deepcopy : bool = True , base : Optional [AsyncCursor ] = None ) -> AsyncCursor : # type: ignore[type-arg]
283283 """Internal clone helper."""
284284 if not base :
285- if self ._session and not self ._session .implicit :
285+ if self ._session and not self ._session ._is_implicit :
286286 base = self ._clone_base (self ._session )
287287 else :
288288 base = self ._clone_base (None )
@@ -944,7 +944,7 @@ def session(self) -> Optional[AsyncClientSession]:
944944
945945 .. versionadded:: 3.6
946946 """
947- if self ._session and not self ._session .implicit :
947+ if self ._session and not self ._session ._is_implicit :
948948 return self ._session
949949 return None
950950
@@ -1035,8 +1035,8 @@ def _die_no_lock(self) -> None:
10351035 self ._collection .database .client ._cleanup_cursor_no_lock (
10361036 cursor_id , address , self ._sock_mgr , self ._session
10371037 )
1038- if self ._session and self ._session .implicit :
1039- self ._session .attached_to_cursor = False
1038+ if self ._session and self ._session ._is_implicit :
1039+ self ._session ._is_attached_to_cursor = False
10401040 self ._session = None
10411041 self ._sock_mgr = None
10421042
@@ -1055,8 +1055,8 @@ async def _die_lock(self) -> None:
10551055 self ._sock_mgr ,
10561056 self ._session ,
10571057 )
1058- if self ._session and self ._session .implicit :
1059- self ._session .attached_to_cursor = False
1058+ if self ._session and self ._session ._is_implicit :
1059+ self ._session ._is_attached_to_cursor = False
10601060 self ._session = None
10611061 self ._sock_mgr = None
10621062
0 commit comments