+
    8im/                    2  a  0 t $ R t^ RIHt ^ RIt^ RIt^ RIHt ^ RIH	t	H
t
HtHtHtHtHtHtHt ^ RIHt ^ RIHtHtHtHtHtHtHtHtHt ^ RIHt ]	'       d   ^ RI H!t! ^ R	I"H#t# ^ R
I$H%t% ^ RI&H't' ](! R^[.4      t)R]*R&   ](! . R1O4      ]),          t+R]*R&   ]+](! . R2O4      ,          t,R]*R&   Rt-R]*R&   ^t.R]*R&   0 R3mt/R]*R&   R R lt0R R lt1R R lt2R4R R llt3R R  lt4R! R" lt5R5R# R$ llt6R% R& lt7R' R( lt8R) R* lt9R+ R, lt:R- R. lt;R/ R0 lt<R# )6zCBits and pieces used by the driver that don't really fit elsewhere.)annotationsN)abc)	TYPE_CHECKINGAny	ContainerIterableMappingNoReturnOptionalSequenceUnion)	ASCENDING)	CursorNotFoundDuplicateKeyErrorExecutionTimeoutNotPrimaryErrorOperationFailureWriteConcernError
WriteErrorWTimeoutError_wtimeout_error)HelloCompat)_Hint)
_IndexList)PoolOptions)_DocumentOutiP-  zfrozenset[int]_SHUTDOWN_CODES_NOT_PRIMARY_CODES_RETRYABLE_ERROR_CODESi  int_REAUTHENTICATION_REQUIRED_CODE_AUTHENTICATION_FAILURE_CODEzset[str]_SENSITIVE_COMMANDSc                    V ^8  d   QhRRRR/# )   optionsr   returnzdict[str, float] )formats   "T/var/www/html/photoedit/myenv/lib/python3.14/site-packages/pymongo/helpers_shared.py__annotate__r*   p   s      + 2B     c                    ^ RI Hp / pVP                  4       pV P                  pV P                  pV'       d   VR,          VR&   V'       d   V'       g   VR,          VR&   V'       d   VR,          VR&   V# )    )_csoti  	timeoutMSsocketTimeoutMSconnectTimeoutMS)pymongor.   get_timeoutsocket_timeoutconnect_timeout)r%   r.   detailstimeoutr4   r5   s   &     r)   _get_timeout_detailsr8   p   sl    G!G++N--O&~g%3d%:!"&5&<"#Nr+   c                    V ^8  d   QhRRRR/# )r$   r6   zOptional[dict[str, float]]r&   strr'   )r(   s   "r)   r*   r*      s     	 	$> 	3 	r+   c                    R pV '       d?   VR,          pR F!  pW 9   g   K  VRV RW,           R2,          pK#  	  VRR pVR,          pV# )	 z (configured timeouts: z: zms,N))r0   r/   r1   r'   )r6   resultr7   s   &  r)   format_timeout_detailsrA      s^    F**KG!AgYb)9(:#>> L #Mr+   c                    V ^8  d   QhRRRR/# )r$   keysr   r&   r:   r'   )r(   s   "r)   r*   r*      s     > >* > >r+   c           	     j    RP                  V  Uu. uF  pRP                  ! V!  NK  	  up4      # u upi )z9Generate an index name from the set of fields it is over._z{}_{})joinr(   )rC   items   & r)   _gen_index_namerH      s,    88t<ttW^^T*t<==<s   0c               $    V ^8  d   QhRRRRRR/# )r$   key_or_listr   	directionzOptional[Union[int, str]]r&   z8Sequence[tuple[str, Union[int, str, Mapping[str, Any]]]]r'   )r(   s   "r)   r*   r*      s$      #<=r+   c                P   Ve2   \        V \        4      '       g   \        R\        V 4       24      hW3.# \        V \        4      '       d
   V \        3.# \        V \
        P                  4      '       d   \        V 4      # \        V \
        P                  4      '       d   \        V P                  4       4      # \        V \        \        34      '       g   \        R\        V 4       24      h. pV  F2  p\        V\        4      '       d	   V\        3pVP                  V4       K4  	  V# )zyHelper to generate a list of (key, direction) pairs.

Takes such a list, or a single key, or a single key and direction.
z'Expected a string and a direction, not zKif no direction is specified, key_or_list must be an instance of list, not )
isinstancer:   	TypeErrortyper   r   	ItemsViewlistr   itemstupleappend)rJ   rK   valuesrG   s   &&  r)   _index_listrV      s    +s++Ed;FWEXYZZ())k3'' ),--S]]33$$S[[11))+,,K$77]^bcn^o]pq  )+D$$$i(MM$   r+   c                    V ^8  d   QhRRRR/# )r$   
index_listr   r&   zdict[str, Any]r'   )r(   s   "r)   r*   r*      s      
 ~ r+   c                   \        V \        \        \        P                  34      '       g   \        R\        V 4      ,           4      h\        V 4      '       g   \        R4      h/ p\        V \        P                  4      '       d#   V  F  pW,          p\        W#4       W1V&   K  	  V# V  F4  p\        V\        4      '       d	   V\        3pVw  r#\        W#4       W1V&   K6  	  V# )zZHelper to generate an index specifying document.

Takes a list of (key, direction) pairs.
z@must use a dictionary or a list of (key, direction) pairs, not: zkey_or_list must not be empty)rM   rQ   rS   r   r   rN   reprlen
ValueError_validate_index_key_pairr:   r   )rX   indexkeyvaluerG   s   &    r)   _index_documentra      s    
 j4"<==NQUV`Qaa
 	
 z??899E*ckk**COE$S0#J  L D$$$i(JC$S0#J  Lr+   c               $    V ^8  d   QhRRRRRR/# )r$   r_   r   r`   r&   Noner'   )r(   s   "r)   r*   r*      s!     
 
# 
c 
d 
r+   c                    \        V \        4      '       g   \        R \        V 4       24      h\        V\        \        \
        P                  34      '       g   \        R\        V4       24      hR# )z<first item in each key pair must be an instance of str, not zasecond item in each key pair must be 1, -1, '2d', or another valid MongoDB index specifier., not N)rM   r:   rN   rO   r   r   r   )r_   r`   s   &&r)   r]   r]      sg    c3VW[\_W`Vabccec3455%[M#
 	
 6r+   c               0    V ^8  d   QhRRRRRRRRR	R
RR/# )r$   responser   max_wire_versionzOptional[int]allowable_errorsz$Optional[Container[Union[int, str]]]parse_write_concern_errorbool	pool_optszOptional[PoolOptions]r&   rc   r'   )r(   s   "r)   r*   r*      sT     EE EEEE#EE ;EE  $	EE
 %EE 
EEr+   c                   RV 9  d-   \        V P                  R4      V P                  R4      V V4      hV'       dH   RV 9   dA   V R,          pV P                  R4      pV'       d   VP                  RV/4       \        V4       V R,          '       d   R# T pRV 9   dS   V R,          P	                  4        F7  pVP                  R4      '       g   K  VP                  R4      '       d   K5  Tp M	  VR,          p	VP                  R4      p
V'       d   V
e
   W9   d   R# MW9   d   R# V
e   V
\
        9   d   \        W4      hM'\        P                  V	9   g   R	V	9   d   \        W4      hV
R
9   d   \        WW4      hV
^28X  d2   V'       d   \        V4      pV	\        V4      ,          p	\        WW4      hV
^+8X  d   \        WW4      h\        WW4      h)z+Check the response to a command for errors.okz$errcodewriteConcernErrorerrorLabelsNrawerrmsgznode is recovering)*  i*  i&1  )r   getupdate_raise_write_concern_errorrU   r   r   r   LEGACY_ERRORr   r8   rA   r   r   )rf   rg   rh   ri   rk   _error_labelsr6   shardrr   rn   timeout_detailss   &&&&&       r)   _check_command_responser|      s    8LL LL 	
 	
 !%8H%D-.,,}-MM='23"6*~~G e_++-Eyy""599T??	 . XF;;vD ' (' %%!&33 &		!	!V	+/Cv/Mf// $$hII	29=O,_==FvXHH	V8FF
6
DDr+   c                    V ^8  d   QhRRRR/# )r$   write_errorsz	list[Any]r&   r	   r'   )r(   s   "r)   r*   r*     s     D D) D Dr+   c                    V R,          pVP                  R4      R8X  d   \        VP                  R4      RV4      h\        VP                  R4      VP                  R4      V4      h)   rn   rs   rr   r?   )rt   r   r   )r~   errors   & r)   _raise_last_write_errorr     sX     EyyE!		( 3UEBB
UYYx(%))F*;U
CCr+   c                    V ^8  d   QhRRRR/# )r$   r   r   r&   r	   r'   )r(   s   "r)   r*   r*   (  s     K Kc Kh Kr+   c                    \        V 4      '       d,   \        V P                  R 4      V P                  R4      V 4      h\        V P                  R 4      V P                  R4      V 4      h)rr   rn   )r   r   rt   r   )r   s   &r)   rv   rv   (  sO    uEIIh/61BEJJ
EIIh/61BE
JJr+   c                    V ^8  d   QhRRRR/# )r$   r@   Mapping[str, Any]r&   zOptional[Mapping[str, Any]]r'   )r(   s   "r)   r*   r*   /  s      * /J r+   c                    V P                  R4      pV'       d.   V P                  R4      pV'       d   VP                  4       pW!R&   V# )z%Return the writeConcernError or None.ro   rp   )rt   copy)r@   wceerror_labelss   &  r)   _get_wce_docr   /  s?    
**(
)C
 zz-0((*C!-Jr+   c                    V ^8  d   QhRRRR/# )r$   r@   r   r&   rc   r'   )r(   s   "r)   r*   r*   =  s     	( 	(*; 	( 	(r+   c                    V P                  R4      pV'       d   \        V4       \        V 4      pV'       d   \        V4       R# R# )z?Backward compatibility helper for write command error handling.writeErrorsN)rt   r   r   rv   )r@   r~   r   s   &  r)   _check_write_command_responser   =  s7     ::m,L-
v
C
"3' r+   c               $    V ^8  d   QhRRRRRR/# )r$   fieldsz'Union[Mapping[str, Any], Iterable[str]]option_namer:   r&   r   r'   )r(   s   "r)   r*   r*   I  s)     M M3MBEMMr+   c                ~   \        V \        P                  4      '       d   V # \        V \        P                  \        P                  34      '       d_   \
        ;QJ d    R V  4       F  '       d   K   RM	  RM! R V  4       4      '       g   \        V R24      h\        P                  V ^4      # \        V R24      h)zTakes a sequence of field names and returns a matching dictionary.

["a", "b"] becomes {"a": 1, "b": 1}

and

["a.b.c", "d", "a.c"] becomes {"a.b.c": 1, "d": 1, "a.c": 1}
c              3  B   "   T F  p\        V\        4      x  K  	  R # 5iN)rM   r:   ).0fields   & r)   	<genexpr>'_fields_list_to_dict.<locals>.<genexpr>X  s     >ve:eS))vs   FTz5 must be a list of key names, each an instance of strz' must be a mapping or list of key names)	rM   r   r   r   SetallrN   dictfromkeys)r   r   s   &&r)   _fields_list_to_dictr   I  s     &#++&&&3<<122s>v>sss>v>>>{m+`abb}}VQ''
{m#JK
LLr+   c                   V ^8  d   QhRR/# )r$   r&   rc   r'   )r(   s   "r)   r*   r*   _  s      4 r+   c                    \         P                  '       dW   \         P                  ! 4       p  \        P                  ! V ^ ,          V ^,          V ^,          R\         P                  4       ? R# R#   \
         d     Li ; i  ? i ; i)z1Print exceptions raised by subscribers to stderr.N)sysstderrexc_info	tracebackprint_exceptionOSError)einfos    r)   _handle_exceptionr   _  sg     zzz	%%eAha%(D#**U    		 s#   =A/ /A=:B  <A==B   B)iJ'  i{'  i{4  iR-  i|4     )      Y   i)#  i     >	   copydbgetnonce	saslstart
createuser
updateuserauthenticatesaslcontinuecopydbgetnoncecopydbsaslstartr   )NFN)=__conditional_annotations____doc__
__future__r   r   r   collectionsr   typingr   r   r   r   r   r	   r
   r   r   r2   r   pymongo.errorsr   r   r   r   r   r   r   r   r   pymongo.hellor   pymongo.cursor_sharedr   pymongo.operationsr   pymongo.pool_optionsr   pymongo.typingsr   	frozensetr   __annotations__r   r   r    r!   r"   r8   rA   rH   rV   ra   r]   r|   r   rv   r   r   r   r   )r   s   @r)   <module>r      s"   J " 
  
 
 
 
 
 
 &+-0,
 #,
#  	
	 
 N  *<i	? 	*  	 (+  * %' c &

! X 
 	>
<:
EEPDK	(M,r+   