
    &g                    
   S r SSKJr  SSKrSSKrSSKrSSKrSSKJrJ	r	J
r
Jr  SSKJr  SSKJr  Sr\
" S\	S	\4   S
9rSS jr        SS jr\R(                  S:  a  \R*                  r\R,                  rgSS jrSS jrg)z2Miscellaneous pieces that need to be synchronized.    )annotationsN)AnyCallableTypeVarcast)OperationFailure)_REAUTHENTICATION_REQUIRED_CODETF.)boundc                4   ^  SU 4S jjn[        [        U5      $ )Nc                 t  > UR                  SS5      nSSKJn  SSKJn   T" U 0 UD6$ ! [
         a  nU(       a  e UR                  [        :X  ab  S nU  H5  n[        Xt5      (       a  Un  O"[        Xs5      (       d  M)  UR                  n  O   U(       a  UR                  SS9  Oe T" U 0 UD6s S nA$ e S nAff = f)N	no_reauthFr   )_BulkWriteContext)
ConnectionT)reauthenticate)poppymongo.messager   pymongo.synchronous.poolr   r   coder	   
isinstanceconnauthenticate)	argskwargsr   r   r   excr   argfuncs	           `C:\Suresh\moveshuttle\MDcreated\moveengine\venv\Lib\site-packages\pymongo/synchronous/helpers.pyinner_handle_reauth.<locals>.inner)   s    JJ{E2	57	((( 	xx:: C!#22"!#99"xx   %%T%:T,V,,)	s'   ) 
B7AB2</B2+B71B22B7)r   r   r   r   returnr   )r   r
   )r   r   s   ` r   _handle_reauthr"   (   s    : 5>    c                    [         (       d(  [        R                  " 5       nUR                  " X40 UD6$ [        R                  " X40 UD6$ )N)_IS_SYNCasyncioget_running_loopgetaddrinfosocket)hostportr   loops       r   _getaddrinfor-   I   sC     8'')5f55!!$777r#   )   
   c                "    U R                  5       $ zhCompatibility function until we drop 3.9 support: https://docs.python.org/3/library/functions.html#next.)__next__clss    r   nextr5   `       ||~r#   c                "    U R                  5       $ r1   )__iter__r3   s    r   iterr9   d   r6   r#   )r   r
   r!   r
   )r*   r   r+   r   r   r   r!   zklist[tuple[socket.AddressFamily, socket.SocketKind, int, str, tuple[str, int] | tuple[str, int, int, int]]])r4   r   r!   r   )__doc__
__future__r   r&   builtinsr)   systypingr   r   r   r   pymongo.errorsr   pymongo.helpers_sharedr	   r%   r
   r"   r-   version_infor5   r9    r#   r   <module>rC      s    9 "    
  C CxS)*B8
88$'88$ w==D==Dr#   