+
    8i7                    z   R t ^ RIHt ^ RIt^ RIHt ^ RIHtHtHtH	t	H
t
Ht ^ RIHt ^ RIHtHt ^ RIHt ^ RIHtHtHtHtHt ^ R	IHtHtHtHt ^ R
IHtH t  ^ RI!H"t" ]'       dA   ^ RI#H$t$ ^ RI%H&t& ^ RI'H(t( ^ RI)H*t* ^ RI+H,t, ^ RI-H.t. ^ RI/H0t0H1t1 ^ RI2H3t3 ^ RI4H5t5H6t6 ^ RI7H8t8 Rt9RR^R^//t: ! R R4      t;R# )z2Communicate with one MongoDB server in a topology.)annotationsN)datetime)TYPE_CHECKINGAnyCallableContextManagerOptionalUnion)_decode_all_selective)NotPrimaryErrorOperationFailure)_check_command_response)_COMMAND_LOGGER_SDAM_LOGGER_CommandStatusMessage
_debug_log_SDAMStatusMessage)_convert_exception_GetMore_OpMsg_Query)PinnedResponseResponse)_handle_reauth)Queue)ReferenceType)ObjectId)_EventListeners)_ServerMode)ServerDescription)MongoClient_MongoClientErrorHandler)Monitor)
ConnectionPool)_DocumentOutTcursor
firstBatch	nextBatchc                      ] tR t^=tRR R lltR R ltRR R lltR R	 ltR
 R ltRR R llt	]
R R l4       tRR R llt]R R l4       t]P                  R R l4       t]R R l4       tR R ltR R ltRtR# ) ServerNc               4    V ^8  d   QhRRRRRRRRR	R
RRRR/# )   server_descriptionr   poolr$   monitorr"   topology_idOptional[ObjectId]	listenersOptional[_EventListeners]eventsz#Optional[ReferenceType[Queue[Any]]]returnNone )formats   "X/var/www/html/photoedit/myenv/lib/python3.14/site-packages/pymongo/synchronous/server.py__annotate__Server.__annotate__>   sP     $ $-$ $ 	$
 ($ -$ 4$ 
$    c                    Wn         W n        W0n        W@n        VRJ;'       d    VP                  V n        WPn        RV n        V P
                  '       d   V! 4       V n        R# R# )zRepresent one MongoDB server.N)_description_pool_monitor_topology_idenabled_for_server_publish	_listener_events)selfr-   r.   r/   r0   r2   r4   s   &&&&&&&r9   __init__Server.__init__>   sW     /
'!-NN)2N2N"===!8DL r<   c                   V ^8  d   QhRR/# r,   r5   r6   r7   )r8   s   "r9   r:   r;   R   s     ! !d !r<   c                    V P                   P                  P                  '       g   V P                  P	                  4        R# R# )zKStart monitoring, or restart after a fork.

Multiple calls have no effect.
N)r?   optsload_balancedr@   openrF   s   &r9   rN   Server.openR   s-    
 zz,,,MM  -r<   c                    V ^8  d   QhRRRR/# )r,   
service_idr1   r5   r6   r7   )r8   s   "r9   r:   r;   Z   s     $ $ 2 $d $r<   c                <    V P                   P                  V4       R# )zClear the connection pool.N)r.   reset)rF   rR   s   &&r9   rT   Server.resetZ   s    		
#r<   c                   V ^8  d   QhRR/# rJ   r7   )r8   s   "r9   r:   r;   ^   s      t r<   c                   V P                   '       dr   V P                  f   Q hV P                  f   Q hV P                  P                  V P                  P                  V P
                  P                  V P                  334       \        P                  ! \        P                  4      '       dc   \        \        \        P                  V P                  V P
                  P                  ^ ,          V P
                  P                  ^,          R7       V P                  P!                  4        V P"                  P!                  4        R# )zHClear the connection pool and stop the monitor.

Reconnect with open().
N)message
topologyId
serverHost
serverPort)rC   rD   rE   putpublish_server_closedr>   addressrA   r   isEnabledForloggingDEBUGr   r   STOP_SERVERr@   closer?   rO   s   &r9   rc   Server.close^   s    
 ===>>---<<+++LLNN88&&..0A0AB $$W]]33*66,,,,44Q7,,44Q7 	

r<   c                   V ^8  d   QhRR/# rJ   r7   )r8   s   "r9   r:   r;   x   s     & &t &r<   c                :    V P                   P                  4        R# )zCheck the server's state soon.N)r@   request_checkrO   s   &r9   rg   Server.request_checkx   s    ##%r<   c               (    V ^8  d   QhRRRRRRRR/# )	r,   	operationUnion[_Query, _GetMore]connr#   apply_timeoutboolr5   ztuple[dict[str, Any], str]r7   )r8   s   "r9   r:   r;   |   s,      08BSW	#r<   c                	H   VP                  W#4      w  rEVP                  P                  '       da   VP                  P                  P                  '       g;   VP                  P                  P	                  VP
                  WAP                  4      pVP                  V4       WE3# N)
as_commandclient
_encrypter_bypass_auto_encryptionencryptdbcodec_optionsupdate_command)rF   rj   rl   rm   cmdrv   s   &&&&  r9   operation_to_commandServer.operation_to_command|   s     &&t;&&&y/?/?/J/J/b/b/b""--55c#:#:C 	  %wr<   c               4    V ^8  d   QhRRRRRRRRR	R
RRRR/# )r,   rl   r#   rj   rk   read_preferencer   r2   r3   
unpack_resz!Callable[..., list[_DocumentOut]]rr   zMongoClient[Any]r5   r   r7   )r8   s   "r9   r:   r;      sY     R RR +R %	R
 -R 6R !R 
Rr<   c                <   Vf   Q hVP                   p\        P                  ! 4       pVP                  V4      p	VP                  ;'       d    VP                  P
                  p
V P                  W!V	4      w  rV
'       d   ^ pM&VP                  W1V	4      pV P                  V4      w  rp\        P                  ! \        P                  4      '       d   \        \        \        P                  VP                   P"                  V\%        \'        V4      4      VVVVP(                  VP*                  VP,                  ^ ,          VP,                  ^,          VP.                  R7       V'       dG   RV9  d   WR&   Vf   Q hVP1                  VVVVP,                  VP*                  VP.                  R7        V
'       d   VP3                  R4      pM#VP5                  XX4       VP3                  V4      pV	'       d
   \6        pRpMRpRpV! VVP8                  VP:                  VVR7      pV	'       dR   V^ ,          pVP<                  P?                  VVP@                  4       \C        VVPD                  VPF                  R7       \        P                  ! 4       T,
          pT	'       d   T^ ,          pMqTPX                  R8X  d   T'       d
   T^ ,          M/ pMLRRTP8                  RTP[                  4       /R^/pTPX                  R8X  d   TTR,          R&   MTTR,          R&   \        P                  ! \        P                  4      '       d   \        \        \        P\                  TP                   P"                  TT\%        \'        T4      4      TTTTP(                  TP*                  TP,                  ^ ,          TP,                  ^,          TP.                  R7       T'       dH   Tf   Q hTP_                  TTTPX                  TTP,                  TP*                  TP.                  TR
7       TP<                  pT'       d[   TP`                  '       dI   T	'       dA   TP`                  Pc                  TPe                  4       4      p\g        TTP:                  T4      pTPi                  TP@                  4      '       g   TPj                  '       d   TPm                  4        \K        T\n        4      '       d   TP
                  p
M)\q        TPj                  ;'       d    TP8                  4      p
TP                  '       d   TP                  Ps                  T
4       \u        TT Pv                  P,                  TTTT	TT
R7      pT# \y        TT Pv                  P,                  TTT	TR7      pT#   \H         Edp   p\        P                  ! 4       T,
          p\K        T\L        \N        34      '       d   TPP                  pM\S        T4      p\        P                  ! \        P                  4      '       d   \        \        \        PT                  TP                   P"                  TT\%        \'        T4      4      TTTTP(                  TP*                  TP,                  ^ ,          TP,                  ^,          TP.                  \K        T\N        4      R	7       T'       dH   Tf   Q hTPW                  TTTPX                  TTP,                  TP*                  TP.                  TR
7       h Rp?ii ; i)a  Run a _Query or _GetMore operation and return a Response object.

This method is used only to run _Query/_GetMore operations from
cursors.
Can raise ConnectionFailure, OperationFailure, etc.

:param conn: A Connection instance.
:param operation: A _Query or _GetMore object.
:param read_preference: The read preference to use.
:param listeners: Instance of _EventListeners or None.
:param unpack_res: A callable that decodes the wire protocol response.
:param client: A MongoClient instance.
N)rX   clientIdcommandcommandNamedatabaseName	requestIdoperationIddriverConnectionIdserverConnectionIdrZ   r[   	serviceIdz$db)rR   FT)legacy_responseuser_fields)	pool_opts)rX   r   
durationMSfailurer   r   r   r   r   r   rZ   r[   r   isServerSideError)rR   database_nameexplainr&   idnsokfindr'   r(   )rX   r   r   replyr   r   r   r   r   r   rZ   r[   r   )datar^   rl   duration
request_idfrom_commanddocsmore_to_come)r   r^   r   r   r   r   )=enabled_for_commandsr   nowuse_commandconn_mgrr   rz   get_message_split_messager   r_   r`   ra   r   r   STARTED_topology_settingsrA   nextiterr   server_connection_idr^   rR   publish_command_startreceive_messagesend_message_CURSOR_DOC_FIELDS	cursor_idrw   rr   _process_responsesessionr   max_wire_versionrL   	Exception
isinstancer   r   detailsr   FAILEDpublish_command_failurename	namespace	SUCCEEDEDpublish_command_successrs   decryptraw_command_responser
   _should_pin_cursorexhaust
pin_cursorr   rn   update_exhaustr   r>   r   )rF   rl   rj   r}   r2   r~   rr   publishstartuse_cmdr   ry   dbnr   rX   r   max_doc_sizer   r   r   r   firstexcr   r   res	decryptedresponses   &&&&&&&                     r9   run_operationServer.run_operation   s   . $$$00''- ))MMi.@.@.M.M,,YgFJ++O7KG-1-@-@-I*Jl''66-5522?? cO $&#'77#'#<#<<<?<<?//  C E
(((++))?? , =	,,T2!!$5,,Z8 0"'""&##'' /'D Q  225):K:KL't/D/DPTPYPYZL <<>E) q'C^^y(!$q'rCdEOOT9;N;N;PQSWYZ[C~~'.2Hl+-1Hk*''66-7722??# cO $&#'77#'#<#<<<?<<?//  (((--))??! . 	 !!f'''"--55e6P6P6RS	,Y	8O8OQ\] $$Y%6%6779;L;L;LOO%((  %11  $I$5$5$I$I%//J!!!""11,?%))11!%$)	H(   ))11!%$H q  $	||~-H#1ABCC(+,S1++GMM::#188#66CC'# $T#Y!$( *'+ww'+'@'@#||A#||A"oo&06F&G"  ,,,11NNLL--#"% 2 	 I$	s:   1V  9<V  65V  ,AV   \,A9\&B'\A\\c                    V ^8  d   QhRRRR/# )r,   handlerz"Optional[_MongoClientErrorHandler]r5   zContextManager[Connection]r7   )r8   s   "r9   r:   r;   ^  s     + +9+	#+r<   c                	8    V P                   P                  V4      # rp   )r.   checkout)rF   r   s   &&r9   r   Server.checkout^  s     yy!!'**r<   c                   V ^8  d   QhRR/# )r,   r5   r   r7   )r8   s   "r9   r:   r;   d  s     ! !. !r<   c                	    V P                   # rp   )r>   rO   s   &r9   descriptionServer.descriptionc  s       r<   c                    V ^8  d   QhRRRR/# )r,   r-   r   r5   r6   r7   )r8   s   "r9   r:   r;   h  s     / /.? /D /r<   c                	`    VP                   V P                  P                   8X  g   Q hWn        R # rp   )r^   r>   )rF   r-   s   &&r9   r   r   g  s(    !))T->->-F-FFFF.r<   c                   V ^8  d   QhRR/# )r,   r5   r$   r7   )r8   s   "r9   r:   r;   m  s      d r<   c                	    V P                   # rp   )r?   rO   s   &r9   r.   Server.pooll  s    zzr<   c                    V ^8  d   QhRRRR/# )r,   rX   z,Union[tuple[int, Any], tuple[int, Any, int]]r5   ztuple[int, Any, int]r7   )r8   s   "r9   r:   r;   p  s     ' 'C'	'r<   c                6    \        V4      ^8X  d   V# Vw  r#W#^ 3# )zoReturn request_id, data, max_doc_size.

:param message: (request_id, data, max_doc_size) or (request_id, data)
)len)rF   rX   r   r   s   &&  r9   r   Server._split_messagep  s*     w<1N  'JQ&&r<   c                   V ^8  d   QhRR/# )r,   r5   strr7   )r8   s   "r9   r:   r;   ~  s     D D# Dr<   c                	R    R V P                   P                   RV P                  : R2# )< >)	__class____name__r>   rO   s   &r9   __repr__Server.__repr__~  s)    4>>**+1T->->,ACCr<   )r>   rE   rD   r@   r?   rC   rA   )NNNrp   )F)r   
__module____qualname____firstlineno__rG   rN   rT   rc   rg   rz   r   r   r   propertyr   setterr.   r   r   __static_attributes__r7   r<   r9   r*   r*   =   s    $(!$4& R Rh+
 ! ! / /  'D Dr<   r*   )<__doc__
__future__r   r`   r   typingr   r   r   r   r   r	   bsonr
   pymongo.errorsr   r   pymongo.helpers_sharedr   pymongo.loggerr   r   r   r   r   pymongo.messager   r   r   r   pymongo.responser   r   pymongo.synchronous.helpersr   queuer   weakrefr   bson.objectidr   pymongo.monitoringr   pymongo.read_preferencesr   pymongo.server_descriptionr    pymongo.synchronous.mongo_clientr    r!   pymongo.synchronous.monitorr"   pymongo.synchronous.poolr#   r$   pymongo.typingsr%   _IS_SYNCr   r*   r7   r<   r9   <module>r     s    9 "    ' < :  I H 5 6%&24<V39,q+q AB BD BDr<   