+
    8iN                    
   R t ^ RIHt ^ RIt^ RIt^ RIt^ RIt^ RIt^ RIH	t	H
t
Ht ^ RIHtHt ^ RIHt ^ RIHt ^ RIHtHt ^ RIHt ^ R	IHt ^ R
IHtHtHt ^ RIHt ^ RI H!t! ^ RI"H#t# ^ RI$H%t% ]	'       d   ^ RI&H't'H(t(H)t) ^ RI*H+t+ ^ RI,H-t- Rt.R R lt/R R lt0 ! R R4      t1 ! R R]14      t2 ! R R]14      t3 ! R R]14      t4]5! 4       t6R R  lt7R! R" lt8R# R$ lt9R% R& lt:].'       d   ]Pv                  ! ]:4       R# R# )'z9Class to monitor a MongoDB server on a background thread.)annotationsN)TYPE_CHECKINGAnyOptional)commonperiodic_executor)MovingMinimum)_SrvResolver)NetworkTimeout_OperationCancelled)Hello)_async_create_lock)_SDAM_LOGGER
_debug_log_SDAMStatusMessage)_shutdown_executors)_is_faas)MovingAverage)ServerDescription)AsyncConnectionPool_CancellationContext)TopologySettings)TopologyFc                    V ^8  d   QhRRRR/# )   error	ExceptionreturnNone )formats   "Z/var/www/html/photoedit/myenv/lib/python3.14/site-packages/pymongo/asynchronous/monitor.py__annotate__r#   2   s      Y 4     c                0    RV n         RV n        RV n        R# )z'PYTHON-2433 Clear error traceback info.N)__traceback____context__	__cause__r   s   &r"   	_sanitizer*   2   s    EEEOr$   c                    V ^8  d   QhRRRR/# )r   startfloatr   r    )r!   s   "r"   r#   r#   9   s     . .u . .r$   c                N    \        R\        P                  ! 4       V ,
          4      # )zReturn the duration since the given start time.

Accounts for buggy platforms where time.monotonic() is not monotonic.
See PYTHON-4600.
g        )maxtime	monotonic)r,   s   &r"   _monotonic_durationr2   9   s     sDNN$u,--r$   c                  ^    ] tR t^BtR R ltR R ltR R ltR R ltR	 R
 ltR R lt	Rt
R# )MonitorBasec               (    V ^8  d   QhRRRRRRRR/# )	r   topologyr   namestrintervalintmin_intervalr-   r    )r!   s   "r"   r#   MonitorBase.__annotate__C   s)              SX  r$   c                   a R V3R llp\         P                  ! W4WRR7      pW`n        RR V3R lllp\        P                  ! WP
                  4      o\        P                  ! W4      V n        \        V 4       R# )zBase class to do periodic work on a background thread.

The background thread is signaled to stop when the Topology or
this instance is freed.
c                   V ^8  d   QhRR/# )r   r   boolr    )r!   s   "r"   r#   *MonitorBase.__init__.<locals>.__annotate__L   s     	 	d 	r$   c                 ^   <"   S! 4       p V f   R# V P                  4       G R j  xL
  R#  L5i)NFT)_run)monitorself_refs    r"   target$MonitorBase.__init__.<locals>.targetL   s,     jG,,.   !s   !-+-)r9   r;   rE   r7   Nc                    V ^8  d   QhRRRR/# )r   dummyzOptional[Topology]r   r   r    )r!   s   "r"   r#   r@   Y   s     	( 	(#5 	( 	(r$   c                J   < S! 4       pV'       d   VP                  4        R # R # Ngc_safe_close)rH   rC   rD   s   & r"   _on_topology_gc-MonitorBase.__init__.<locals>._on_topology_gcY   s      jG%%' r$   rJ   )	r   AsyncPeriodicExecutor	_executorweakrefrefcloseproxy	_topology	_register)	selfr6   r7   r9   r;   rE   executorrM   rD   s	   &&&&&   @r"   __init__MonitorBase.__init__C   s`    	 	 %::
 "	( 	( ;;t^^4 xA$r$   c                   V ^8  d   QhRR/# r   r   r   r    )r!   s   "r"   r#   r<   e   s      d r$   c                :    V P                   P                  4        R# )zKStart monitoring, or restart after a fork.

Multiple calls have no effect.
N)rP   openrW   s   &r"   r^   MonitorBase.opene   s    
 	r$   c                   V ^8  d   QhRR/# r\   r    )r!   s   "r"   r#   r<   l   s      t r$   c                :    V P                   P                  4        R# )zGC safe close.N)rP   rS   r_   s   &r"   rL   MonitorBase.gc_safe_closel   s    r$   c                   V ^8  d   QhRR/# r\   r    )r!   s   "r"   r#   r<   p   s      T r$   c                .   "   V P                  4        R# 5i)zGClose and stop monitoring.

open() restarts the monitor after closing.
NrK   r_   s   &r"   rS   MonitorBase.closep   s     
 	s   c                   V ^8  d   QhRR/# r\   r    )r!   s   "r"   r#   r<   w   s     $ $D $r$   c                V   "   V P                   P                  4       G Rj  xL
  R#  L5i)zWait for the monitor to stop.N)rP   joinr_   s   &r"   ri   MonitorBase.joinw   s     nn!!###   )')c                   V ^8  d   QhRR/# r\   r    )r!   s   "r"   r#   r<   {   s      t r$   c                :    V P                   P                  4        R# )z)If the monitor is sleeping, wake it soon.N)rP   waker_   s   &r"   request_checkMonitorBase.request_check{   s    r$   )rP   rU   N)__name__
__module____qualname____firstlineno__rY   r^   rL   rS   ri   ro   __static_attributes__r    r$   r"   r4   r4   B   s&     D$ r$   r4   c                     a  ] tR t^tR V 3R lltR R ltR R ltR R ltR	 R
 ltR R lt	R R lt
R R ltR R ltR R ltR R ltRtV ;t# )Monitorc               (    V ^8  d   QhRRRRRRRR/# )	r   server_descriptionr   r6   r   poolr   topology_settingsr   r    )r!   s   "r"   r#   Monitor.__annotate__   s2     &* &*-&* &* 	&*
 ,&*r$   c                .  < \         SV `  VRVP                  \        P                  4       Wn        W0n        W@n        V P                  P                  P                  V n
        V P                  RJ;'       d    V P                  P                  V n        RV n        RV n        \        VVVP!                  VP"                  4      4      V n        VP&                  R8X  d
   RV n        R# VP&                  R8X  d
   RV n        R# \+        4       '       * V n        R# )zClass to monitor a MongoDB server on a background thread.

Pass an initial ServerDescription, a Topology, a Pool, and
TopologySettings.

The Topology is weakly referenced. The Pool must be exclusive to this
Monitor.
pymongo_server_monitor_taskNstreamTpollF)superrY   heartbeat_frequencyr   MIN_HEARTBEAT_INTERVAL_server_description_pool	_settings_pool_options_event_listeners
_listenersenabled_for_server_heartbeat_publish_cancel_context_conn_id_RttMonitor_create_pool_for_monitoraddress_rtt_monitorserver_monitoring_mode_streamr   )rW   ry   r6   rz   r{   	__class__s   &&&&&r"   rY   Monitor.__init__   s     	)11))		
 $6 
*..66GGt3dd8d8d?C'+'--.@.H.HI

 33x?DL55? DL'z>DLr$   c                   V ^8  d   QhRR/# r\   r    )r!   s   "r"   r#   r|      s      d r$   c                R    V P                   pV'       d   VP                  4        R# R# )ztCancel any concurrent hello check.

Note: this is called from a weakref.proxy callback and MUST NOT take
any locks.
N)r   cancel)rW   contexts   & r"   cancel_checkMonitor.cancel_check   s#     && NN	 r$   c                   V ^8  d   QhRR/# r\   r    )r!   s   "r"   r#   r|      s     , ,$ ,r$   c                   "   V P                   P                  4        V P                  P                  '       d%   V P                   P	                  4       G Rj  xL
  R# R#  L5i)z1Start an _RttMonitor that periodically runs ping.N)r   r^   rP   _stoppedrS   r_   s   &r"   _start_rtt_monitorMonitor._start_rtt_monitor   sI     
 	 >>"""##))+++ #+s   AA!A	A!c                   V ^8  d   QhRR/# r\   r    )r!   s   "r"   r#   r|      s      t r$   c                	    V P                   P                  4        V P                  P                  4        V P	                  4        R # rJ   )rP   rS   r   rL   r   r_   s   &r"   rL   Monitor.gc_safe_close   s0    '')r$   c                   V ^8  d   QhRR/# r\   r    )r!   s   "r"   r#   r|      s     
 
D 
r$   c                	   "   \         P                  ! V P                  P                  4       V P                  P                  4       R R7      G Rj  xL
  R#  L5i)T)return_exceptionsN)asynciogatherrP   ri   r   r_   s   &r"   ri   Monitor.join   s>     nnNN!4#4#4#9#9#;t
 	
 	
s   AAAAc                   V ^8  d   QhRR/# r\   r    )r!   s   "r"   r#   r|      s     ' 'T 'r$   c                	   "   V P                  4        V P                  P                  4       G R j  xL
  V P                  4       G R j  xL
  R #  L L5irJ   )rL   r   rS   _reset_connectionr_   s   &r"   rS   Monitor.close   sG     %%''' $$&&& 	( 	's!   .AAAA	AAc                   V ^8  d   QhRR/# r\   r    )r!   s   "r"   r#   r|      s     ! ! !r$   c                	V   "   V P                   P                  4       G R j  xL
  R #  L5irJ   )r   resetr_   s   &r"   r   Monitor._reset_connection   s     jj   rk   c                   V ^8  d   QhRR/# r\   r    )r!   s   "r"   r#   r|      s     (0 (0D (0r$   c                	  "    V P                   p V P                  4       G R j  xL
 V n         T P                  P                  T P                   T P                   P                  \        T P                   P                  \         4      R7      G R j  xL
  T P"                  '       dk   T P                   P                  '       dO   T P                   P$                  '       d3   T P'                  4       G R j  xL
  T P                  P                  4        T P                   P                  '       d-   TP                  '       d   T P                  P                  4        T P                  P                  '       d%   T P                  P                  4       G R j  xL
  R # R #  ELv  \         d   p\        T4       \	        T P                   P
                  TR7      T n         TP                  '       d   T P                  P                  4         R p?T P                  P                  '       d&   T P                  P                  4       G R j  xL 
  R # R # R p?ii ; i EL ELf  \(         d    T P                  4       G R j  xL 
   EL)i ; i L  T P                  P                  '       d%   T P                  P                  4       G R j  xL 
  i i ; i5i)Nr)   )
reset_poolinterrupt_connections)r   _check_serverr   r*   r   r   is_server_type_knownrP   
skip_sleepr   r   rS   rU   	on_changer   
isinstancer
   r   topology_versionr   ReferenceError)rW   prev_sdexcs   &  r"   rB   Monitor._run   s    '	0..G151C1C1E+E( ..**((3399&01I1I1O1OQ_&` +    |||((===,,===--///))+''---'2N2N2N))+
 ~~&&&''--/// 'G ,F& 
#+<,,44C,( /// NN--/0 ~~&&&''--/// 'E
 0  	**,	
 0 ~~&&&''--/// 's   KI F F	F A!I II &I I I 1I29I ,I >I 9KJKF I(AII 	9KI	KII I J8I;9J>J JJ K:K	KK		Kc                   V ^8  d   QhRR/# r   r   r   r    )r!   s   "r"   r#   r|      s     %; %;%6 %;r$   c                  "   RV n         \        P                  ! 4       p V P                  4       G Rj  xL
 #  L  \         d    h \
         Ed   p\        T4       T P                  pTP                  p\        T4      p\        T P                  ;'       d!    TP                  ;'       d    TP                  4      pT P                  '       d-   T P                  f   Q hT P                  P!                  YEY&4       \"        P$                  ! \&        P(                  4      '       dZ   \+        \"        \,        P.                  T P0                  P2                  T^ ,          T^,          TTR,          TT P                   R7	       T P5                  4       G Rj  xL 
  \7        T\8        4      '       d   h T P:                  P=                  4       G Rj  xL 
  \?        YBR7      u Rp?# Rp?ii ; i5i)zNCall hello or read the next streaming response.

Returns a ServerDescription.
N  )message
topologyId
serverHost
serverPortawaited
durationMSfailuredriverConnectionIdr)   ) r   r0   r1   _check_oncer   r   r*   r   r   r2   r?   r   r   r   r   r   publish_server_heartbeat_failedr   isEnabledForloggingDEBUGr   r   HEARTBEAT_FAILrU   _topology_idr   r   r   r   r   r   )rW   r,   r   sdr   durationr   s   &      r"   r   Monitor._check_server   sl    
  	;))++++ 	 	;e))BjjG*51H4<<[[B,C,C[[H[H[\G}}}222??SXb((77 .==#~~::&qz&qz#'$!'+}}
 ((***%!455##))+++$W::5	;sp   G): 8: G): G&G&AG!+"G!AG!$A,G!F9G!
GG!G&G)!G&&G)c                   V ^8  d   QhRR/# r   r    )r!   s   "r"   r#   r|   %  s     ; ;#4 ;r$   c                  "   V P                   P                  pV P                   p\        V P                  P                  ;'       d5    V P
                  ;'       d!    VP                  ;'       d    VP                  4      pV P                  '       d,   V P                  f   Q hV P                  P                  W4       V P                  '       d5   V P                  P                  '       d   V P                  4       G Rj  xL
  V P                  P                  4       ;_uu_4       GRj  xL
 p\        P                   ! \"        P$                  4      '       d\   \'        \        \(        P*                  V P,                  P.                  VP0                  VP2                  V^ ,          V^,          VR7       VP4                  V n        VP0                  V n        V P9                  V4      G Rj  xL
 w  rVVP:                  '       g$   V P<                  P?                  V4      G Rj  xL
  V P<                  PA                  4       G Rj  xL
 w  rx\C        WWxR7      pV P                  '       d7   V P                  f   Q hV P                  PE                  WWUP:                  4       \        P                   ! \"        P$                  4      '       do   \'        \        \(        PF                  V P,                  P.                  VP0                  VP2                  V^ ,          V^,          VVR,          VPH                  R7
       TuuRRR4      GRj  xL
  #  ELL EL$ ELg EL3 EL L  + GRj  xL 
 '       g   i     R# ; i5i)zVA single attempt to call hello.

Returns a ServerDescription, or raises an exception.
N)r   r   r   serverConnectionIdr   r   r   )min_round_trip_timer   )	r   r   r   r   r   r   r   r   reply)%r   r   r?   r   connsr   r   r   r   r    publish_server_heartbeat_startedr   	cancelledr   checkoutr   r   r   r   r   r   HEARTBEAT_STARTrU   r   idserver_connection_idcancel_contextr   _check_with_socket	awaitabler   
add_samplegetr   "publish_server_heartbeat_succeededHEARTBEAT_SUCCESSdocument)	rW   r   r   r   connresponseround_trip_timeavg_rttmin_rtts	   &        r"   r   Monitor._check_once%  s    
 **22%% JJaaaa"2I2IaabNaNa
 ===??...OO<<WND$8$8$B$B$B((***::&&(((D((77 .>>#~~::'+ww'+'@'@&qz&qz#	 $(#6#6D  GGDM.2.E.Ed.K(K%H%%%''22?CCC%)%6%6%:%:%<<G"7g[B}}}222BBh8J8J ((77 .@@#~~::'+ww'+'@'@&qz&qz#.5"++ Q )(( +(  )LC<) )(((s   AM8M8/"M8<M8M8+M8>M
?*M8)M*M8-B<M)M*6M M!!MMBMA/M7M8MM8M8MMMM8M5	!M$"
M5	-M5	/	M8c                    V ^8  d   QhRRRR/# )r   r   r   r   ztuple[Hello, float]r    )r!   s   "r"   r#   r|   b  s     " "_ "AT "r$   c                  "   \         P                  ! 4       pVP                  '       d%   \        VP	                  4       G Rj  xL
 RR7      pMV P
                  '       dr   VP                  '       d`   V P                  P                  '       dD   VP                  V P                  P                  V P                  P                  4      G Rj  xL
 pMVP                  RR4      G Rj  xL
 p\        V4      pW43#  L L/ L5i)zSReturn (Hello, round_trip_time).

Can raise ConnectionFailure or OperationFailure.
NT)r   )r0   r1   more_to_comer   _next_replyr   performed_handshaker   r   _hellor   r   r2   )rW   r   r,   r   r   s   &&   r"   r   Monitor._check_with_socketb  s     
  4#3#3#55FHLLLT555$:R:R:c:c:c "[[((9922 H "[[t44H&u-!! 6
 5sH   A C?C9C? C?2C?=C?C;C?&C='C?;C?=C?)	r   r   r   r   r   r   r   r   r   )rq   rr   rs   rt   rY   r   r   rL   ri   rS   r   rB   r   r   r   ru   __classcell__r   s   @r"   rw   rw      sH    &* &*P,


'!(0T%;N;z" "r$   rw   c                  F   a  ] tR tRtR V 3R lltR R ltR R ltRtV ;t# )	
SrvMonitoriz  c                    V ^8  d   QhRRRR/# )r   r6   r   r{   r   r    )r!   s   "r"   r#   SrvMonitor.__annotate__{  s     . . .>N .r$   c                `  < \         SV `  VR\        P                  VP                  4       W n        V P
                  P                  V n        \        V P
                  P                  \        4      '       g   Q hV P
                  P                  V n        \        P                  ! 4       V n        R# )zClass to poll SRV records on a background thread.

Pass a Topology and a TopologySettings.

The Topology is weakly referenced.
pymongo_srv_polling_threadN)r   rY   r   MIN_SRV_RESCAN_INTERVALr   r   _seeds	_seedlistr   fqdnr8   _fqdnr0   r1   _startup_time)rW   r6   r{   r   s   &&&r"   rY   SrvMonitor.__init__{  s     	(**11		
 +..$..--s3333..--
!^^-r$   c                   V ^8  d   QhRR/# r\   r    )r!   s   "r"   r#   r     s     # #D #r$   c                	  "   \         P                  ! 4       V P                  \        P                  ,           8  d   R # V P                  4       G R j  xL
 pV'       d7   Wn         V P                  P                  V P                  4      G R j  xL
  R # R #  LD L
  \         d    T P                  4       G R j  xL 
   R # i ; i5irJ   )r0   r1   r  r   r   _get_seedlistr  rU   on_srv_updater   rS   )rW   seedlists   & r"   rB   SrvMonitor._run  s     >>d0063Q3QQQ++--%N#nn224>>BBB  . C! #jjl""#sZ   ACBCC%(B BB CB C8B;9C>CCCc                   V ^8  d   QhRR/# )r   r   zOptional[list[tuple[str, Any]]]r    )r!   s   "r"   r#   r     s      %D r$   c                  "    \        V P                  V P                  P                  P                  V P                  P
                  4      pVP                  4       G Rj  xL
 w  r#\        V4      ^ 8X  d   \        h V P                  P                  \        V\        P                  4      4       V#  LR  \         d7   pT P                  4        \        \         R\#        T4      R7        Rp?R# Rp?ii ; i5i)zHPoll SRV records for a seedlist.

Returns a list of ServerDescriptions.
NzSRV monitor check failed)r   r   )r	   r  r   pool_optionsconnect_timeoutsrv_service_nameget_hosts_and_min_ttllenr   rP   update_intervalr/   r   r   ro   r   r   repr)rW   resolverr
  ttlr   s   &    r"   r  SrvMonitor._get_seedlist  s     
	#

++;;//H
 #+"@"@"BBMH8}! " NN**3sF4R4R+STO C  	
  |-GQUVYQZ[	sA   C9AB5  B3!B5 >5C93B5 5C6 +C1+C91C66C9)r  r  r   r  )	rq   rr   rs   rt   rY   rB   r  ru   r   r   s   @r"   r   r   z  s    . .&# r$   r   c                  v   a  ] tR tRtR V 3R lltR R ltR R ltR R	 ltR
 R ltR R lt	R R lt
RtV ;t# )r   i  c               $    V ^8  d   QhRRRRRR/# )r   r6   r   r{   r   rz   r   r    )r!   s   "r"   r#   _RttMonitor.__annotate__  s#     * * *>N *VZ *r$   c                   < \         SV `  VRVP                  \        P                  4       W0n        \        4       V n        \        4       V n	        \        4       V n        R# )zLMaintain round trip times for a server.

The Topology is weakly referenced.
pymongo_server_rtt_taskN)r   rY   r   r   r   r   r   _moving_averager   _moving_minr   _lock)rW   r6   r{   rz   r   s   &&&&r"   rY   _RttMonitor.__init__  sO    
 	%11))		
 
,(?')
r$   c                   V ^8  d   QhRR/# r\   r    )r!   s   "r"   r#   r    s     ! !T !r$   c                	v   "   V P                  4        V P                  P                  4       G R j  xL
  R #  L5irJ   )rL   r   r   r_   s   &r"   rS   _RttMonitor.close  s)      jj   s   .979c                    V ^8  d   QhRRRR/# )r   sampler-   r   r   r    )r!   s   "r"   r#   r    s     0 0u 0 0r$   c                  "   V P                   ;_uu_4       GRj  xL
  V P                  P                  V4       V P                  P                  V4       RRR4      GRj  xL
  R#  LL L  + GRj  xL 
 '       g   i     R# ; i5i)zAdd a RTT sample.N)r  r  r   r  )rW   r%  s   &&r"   r   _RttMonitor.add_sample  sG     ::::  ++F3''/ :::::sJ   B	A(B	7A,B	!A*"B	*B	,B	2A53
B	>B	 	B	c                   V ^8  d   QhRR/# )r   r   ztuple[Optional[float], float]r    )r!   s   "r"   r#   r    s     F F8 Fr$   c                  "   V P                   ;_uu_4       GRj  xL
  V P                  P                  4       V P                  P                  4       3uuRRR4      GRj  xL
  #  LJ L  + GRj  xL 
 '       g   i     R# ; i5i)zBGet the calculated average, or None if no samples yet and the min.N)r  r  r   r  r_   s   &r"   r   _RttMonitor.get  sG     ::::''++-t/?/?/C/C/EE ::::::sJ   BA&B4A*B A(!B(B*B	0A31
B	<B	>	Bc                   V ^8  d   QhRR/# r\   r    )r!   s   "r"   r#   r    s     % %T %r$   c                  "   V P                   ;_uu_4       GRj  xL
  V P                  P                  4        V P                  P                  4        RRR4      GRj  xL
  R#  LJ L  + GRj  xL 
 '       g   i     R# ; i5i)zReset the average RTT.N)r  r  r   r  r_   s   &r"   r   _RttMonitor.reset  sC     ::::  &&(""$ :::::sJ   BA&B5A*BA( B(B*B	0A31
B	<B	>	Bc                   V ^8  d   QhRR/# r\   r    )r!   s   "r"   r#   r    s     % %D %r$   c                	0  "    V P                  4       G R j  xL
 pV P                  V4      G R j  xL
  R #  L L  \         d    T P                  4       G R j  xL 
   R # \         d(    T P
                  P                  4       G R j  xL 
   R # i ; i5irJ   )_pingr   r   rS   r   r   r   )rW   rtts   & r"   rB   _RttMonitor._run  so     
	% 

$C//#&&& %& 	**, 	%**""$$$	%sg   B; 7; 9; B; ; BABB"B+B	B
BBBBc                   V ^8  d   QhRR/# )r   r   r-   r    )r!   s   "r"   r#   r    s     . .U .r$   c                  "   V P                   P                  4       ;_uu_4       GRj  xL
 pV P                  P                  '       d   \	        R4      h\
        P                  ! 4       pVP                  4       G Rj  xL
  \        V4      uuRRR4      GRj  xL
  #  Lu L# L	  + GRj  xL 
 '       g   i     R# ; i5i)z)Run a "hello" command and return the RTT.Nz_RttMonitor closed)	r   r   rP   r   r   r0   r1   hellor2   )rW   r   r,   s   &  r"   r0  _RttMonitor._ping  sz     ::&&(((D~~&&& 455NN$E**,&u- )(( 	 )(((s]   'CBCAB%=B!>B%CB#C!B%#C%B?	+B.,
B?	7B?	9	C)r  r  r  r   )rq   rr   rs   rt   rY   rS   r   r   r   rB   r0  ru   r   r   s   @r"   r   r     s1    * *"!0F
%%. .r$   r   c                    V ^8  d   QhRRRR/# )r   rC   r4   r   r   r    )r!   s   "r"   r#   r#     s      { t r$   c                f    \         P                  ! V \        4      p\        P	                  V4       R # rJ   )rQ   rR   _unregister	_MONITORSadd)rC   rR   s   & r"   rV   rV     s    
++g{
+CMM#r$   c                    V ^8  d   QhRRRR/# )r   monitor_refz"weakref.ReferenceType[MonitorBase]r   r   r    )r!   s   "r"   r#   r#     s     " "? "D "r$   c                0    \         P                  V 4       R # rJ   )r:  remove)r=  s   &r"   r9  r9    s    [!r$   c                   V ^8  d   QhRR/# r\   r    )r!   s   "r"   r#   r#     s      D r$   c                     \         f   R # \        \         4      p V  F$  pV! 4       pV'       g   K  VP                  4        K&  	  R pR # rJ   )r:  listrL   )monitorsrR   rC   s      r"   _shutdown_monitorsrD    sA     IH %7!!# 
 Gr$   c                   V ^8  d   QhRR/# r\   r    )r!   s   "r"   r#   r#     s      T r$   c                 ^    \         p V '       d   V ! 4        \        p V '       d
   V ! 4        R # R # rJ   )rD  r   )shutdowns    r"   _shutdown_resourcesrH    s!    !H
"H
 r$   )<__doc__
__future__r   r   atexitr   r0   rQ   typingr   r   r   pymongor   r   pymongo._csotr   !pymongo.asynchronous.srv_resolverr	   pymongo.errorsr
   r   pymongo.hellor   pymongo.lockr   pymongo.loggerr   r   r   pymongo.periodic_executorr   pymongo.pool_optionsr   pymongo.read_preferencesr   pymongo.server_descriptionr   pymongo.asynchronous.poolr   r   r   pymongo.asynchronous.settingsr   pymongo.asynchronous.topologyr   _IS_SYNCr*   r2   r4   rw   r   r   setr:  rV   r9  rD  rH  registerr    r$   r"   <module>r^     s    @ "      / / - ' : >  + G G 9 ) 2 8 
 ?6.; ;|w"k w"t: :z=.+ =.F E	
"  
OO'( r$   