+
    iV                    p   R t ^ RIHt ^ RIt^ RIHt ^ RIt^ RIHt ^ RI	t	^ 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	Ht ^ 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	Ht ^ RI	Ht ^ RI	Ht ^ RI	Ht ^ RIt^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H#t# ^RI$H%t% ^RI&H't' ]! R]
R 7      t(]	PR                  '       d   ^R!I*H+t+ ^R"I*H,t, ^R#I*H-t-  ! R$ R%]#P\                  ]],          4      t/ ! R& R']](,          4      t0]]](,          ]0](,          3,          t1 ! R( R)]/],          4      t2 ! R* R+]/],          ]]!,          4      t3 ! R, R-]3],          4      t4 ! R. R/]'4      t5 ! R0 R1]3],          4      t6 ! R2 R3]6],          4      t7 ! R4 R5]6],          4      t8R# )6a  Attribute implementation for _Dispatch classes.

The various listener targets for a particular event class are represented
as attributes, which refer to collections of listeners to be fired off.
These collections can exist at the class level as well as at the instance
level.  An event is fired off using code like this::

    some_object.dispatch.first_connect(arg1, arg2)

Above, ``some_object.dispatch`` would be an instance of ``_Dispatch`` and
``first_connect`` is typically an instance of ``_ListenerCollection``
if event listeners are present, or ``_EmptyListener`` if none are present.

The attribute mechanics here spend effort trying to ensure listener functions
are available with a minimum of function call overhead, that unnecessary
objects aren't created (i.e. many empty per-instance listener collections),
as well as that everything is garbage collectable when owning references are
lost.  Other features such as "propagation" of listener functions across
many ``_Dispatch`` instances, "joining" of multiple ``_Dispatch`` instances,
as well as support for subclass propagation (e.g. events assigned to
``Pool`` vs. ``QueuePool``) are all implemented here.

)annotationsN)chain)TracebackType)Any)cast)
Collection)Deque)	FrozenSet)Generic)Iterator)MutableMapping)MutableSequence)NoReturn)Optional)Sequence)Set)Tuple)Type)TypeVar)Union)legacy)registry)_ET)	_EventKey)_ListenerFnType)exc)util)AsyncAdaptedLock)Protocol_T)bound)	_Dispatch)_DispatchCommon)_HasEventsDispatchc                  2    ] tR t^Kt$ RtR]R&   R R ltRtR# )RefCollectionrefweakref.ref[RefCollection[_ET]]c                   V ^8  d   QhRR/# )   returnr'    )formats   "~C:\Users\petid\OneDrive\Desktop\Maestro\MAESTRO CLAUDE\MAESTRO\maestro-backend\venv\Lib\site-packages\sqlalchemy\event\attr.py__annotate__RefCollection.__annotate__P   s     < <$C <    c                	L    \         P                  ! V \        P                  4      # N)weakrefr&   r   _collection_gcedselfs   &r-   _memoized_attr_ref RefCollection._memoized_attr_refP   s    {{4!:!:;;r0   r+   N)r&   )__name__
__module____qualname____firstlineno__	__slots____annotations__r7   __static_attributes__r+   r0   r-   r%   r%   K   s    I	((< <r0   r%   c                  v    ] tR t^Tt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R# )_empty_collectionc                    V ^8  d   QhRRRR/# r)   elementr   r*   Noner+   )r,   s   "r-   r.   _empty_collection.__annotate__U         b T r0   c                	    R # r2   r+   r6   rD   s   &&r-   append_empty_collection.appendU       r0   c                    V ^8  d   QhRRRR/# rC   r+   )r,   s   "r-   r.   rF   X   s      "  r0   c                	    R # r2   r+   rI   s   &&r-   
appendleft_empty_collection.appendleftX   rL   r0   c                    V ^8  d   QhRRRR/# )r)   otherzSequence[_T]r*   rE   r+   )r,   s   "r-   r.   rF   [   s      L T r0   c                	    R # r2   r+   )r6   rR   s   &&r-   extend_empty_collection.extend[   rL   r0   c                    V ^8  d   QhRRRR/# rC   r+   )r,   s   "r-   r.   rF   ^   rG   r0   c                	    R # r2   r+   rI   s   &&r-   remove_empty_collection.remove^   rL   r0   c                    V ^8  d   QhRRRR/# )r)   rD   r   r*   boolr+   )r,   s   "r-   r.   rF   a   s      C D r0   c                	    R # )Fr+   rI   s   &&r-   __contains___empty_collection.__contains__a   s    r0   c                   V ^8  d   QhRR/# )r)   r*   zIterator[_T]r+   )r,   s   "r-   r.   rF   d   s      , r0   c                	    \        . 4      # r2   )iterr5   s   &r-   __iter___empty_collection.__iter__d   s    Bxr0   c                   V ^8  d   QhRR/# r)   r*   rE   r+   )r,   s   "r-   r.   rF   g   s      t r0   c                	    R # r2   r+   r5   s   &r-   clear_empty_collection.clearg   rL   r0   c                   V ^8  d   QhRR/# r)   r*   intr+   )r,   s   "r-   r.   rF   j   s       r0   c                	    ^ #     r+   r5   s   &r-   __len___empty_collection.__len__j   s    r0   r+   N)r9   r:   r;   r<   rJ   rO   rT   rX   r]   rb   rg   ro   r?   r+   r0   r-   rA   rA   T   s/     r0   rA   c                      ] tR t^qt$ RtR#tR]R&   R]R&   R	]R&   R
]R&   R]R&   R]R&   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R"# )$_ClsLevelDispatchz2Class-level events on :class:`._Dispatch` classes.clsnamename	arg_nameshas_kwlegacy_signatures	_clslevelstrzSequence[str]r[   z,MutableSequence[legacy._LegacySignatureType]zCMutableMapping[Type[_ET], _ListenerFnSequenceType[_ListenerFnType]]c                    V ^8  d   QhRRRR/# )r)   parent_dispatch_clszType[_HasEventsDispatch[_ET]]fnr   r+   )r,   s   "r-   r.   _ClsLevelDispatch.__annotate__   s     5 5:5 5r0   c                	   VP                   V n        VP                   V n        \        P                  ! V4      pVP
                  R ,          V n        \        VP                  4      V n	        \        \        \        \        VR. 4      R R7      4      4      V n        \        P                   ! WV4      Vn        \$        P&                  ! 4       V n        R# )   NN_legacy_signaturesc                    V ^ ,          # rm   r+   )ss   &r-   <lambda>,_ClsLevelDispatch.__init__.<locals>.<lambda>   s    1r0   )keyN)r9   rt   rs   r   inspect_getfullargspecargsru   r[   varkwrv   listreversedsortedgetattrrw   r   _augment_fn_docs__doc__r3   WeakKeyDictionaryrx   )r6   r{   r|   argspecs   &&& r-   __init___ClsLevelDispatch.__init__   s    
 KK	*33--b1 b)7==)!%B 4b9~"
 ,,TK
 224r0   c               $    V ^8  d   QhRRRRRR/# r)   r|   r   namedr[   r*   r+   )r,   s   "r-   r.   r}      s$      !*.	r0   c                	    V'       d   V P                  V4      pV P                  '       d3    \        P                  ! VR R7      p\        P
                  ! WV4      pV# V#   \         d     T# i ; i)T)no_self)_wrap_fn_for_kwrw   r   get_callable_argspecr   _wrap_fn_for_legacy	TypeError)r6   r|   r   r   s   &&& r-   _adjust_fn_spec!_ClsLevelDispatch._adjust_fn_spec   ss     %%b)B!!!C33BE //'B	r		   		s   A   A/.A/c                    V ^8  d   QhRRRR/# )r)   r|   r   r*   r+   )r,   s   "r-   r.   r}      s      / o r0   c                	   a a R  VV 3R llpV# )c               $    V ^8  d   QhRRRRRR/# )r)   r   r   kwr*   r+   )r,   s   "r-   r.   7_ClsLevelDispatch._wrap_fn_for_kw.<locals>.__annotate__   s!     	! 	!3 	!c 	!c 	!r0   c                 t   < \        \        SP                  V 4      4      pVP                  V4       S! R/ VB # )Nr+   )dictzipru   update)r   r   argdictr|   r6   s   *, r-   wrap_kw2_ClsLevelDispatch._wrap_fn_for_kw.<locals>.wrap_kw   s0    3t~~t45GNN2== r0   r+   )r6   r|   r   s   ff r-   r   !_ClsLevelDispatch._wrap_fn_for_kw   s    	! 	!
 r0   c               $    V ^8  d   QhRRRRRR/# )r)   	event_key_EventKey[_ET]	is_appendr[   r*   rE   r+   )r,   s   "r-   r.   r}      s$     8 8'8488	8r0   c                	n   VP                   p\        V\        4      '       g   Q R 4       h\        VRR4      '       g   \        P
                  ! RV R24      h\        P                  ! V4       F  pWCJd$   W@P                  9  d   V P                  V4       K+  W@P                  9  d   V P                  V4       V'       d/   V P                  V,          P                  VP                  4       K  V P                  V,          P                  VP                  4       K  	  \        P                  ! W4       R# )z*Class-level Event targets must be classes._sa_propagate_class_eventsTz&Can't assign an event directly to the z classN)dispatch_target
isinstancetyper   r   InvalidRequestErrorr   walk_subclassesrx   update_subclassrJ   
_listen_fnrO   r   _stored_in_collection)r6   r   r   targetclss   &&&  r-   _do_insert_or_append&_ClsLevelDispatch._do_insert_or_append   s     **D
 
 	87	8 
 v;TBB))8G  ''/C S%>$$S)nn,((-NN3'..y/C/CDNN3'2293G3GH 0 	&&y7r0   c               $    V ^8  d   QhRRRRRR/# r)   r   r   	propagater[   r*   rE   r+   )r,   s   "r-   r.   r}      s!     > > >4 >D >r0   c                	,    V P                  VR R7       R# )Fr   Nr   r6   r   r   s   &&&r-   insert_ClsLevelDispatch.insert   s    !!)u!=r0   c               $    V ^8  d   QhRRRRRR/# r   r+   )r,   s   "r-   r.   r}      s!     = = =4 =D =r0   c                	,    V P                  VR R7       R# )Tr   Nr   r   s   &&&r-   rJ   _ClsLevelDispatch.append   s    !!)t!<r0   c                    V ^8  d   QhRRRR/# )r)   r   	Type[_ET]r*   rE   r+   )r,   s   "r-   r.   r}      s      i D r0   c                	   WP                   9  dN   \        VR R4      '       d$   \        P                  ! 4       V P                   V&   M\	        4       V P                   V&   V P                   V,          pVP
                  R,           FO  pW0P                   9   g   K  TP                  V P                   V,           Uu. uF  qDV9  g   K  VNK  	  up4       KQ  	  R# u upi )r   Tr   N)rx   r   collectionsdequerA   __mro__rT   )r6   r   clslevelr   r|   s   &&   r-   r   !_ClsLevelDispatch.update_subclass   s    'v;TBB)4):):)<v&):)<v&>>&)>>"%%Cnn$"&.."5L"5B89KRR"5L & Ms   9C
C
c                    V ^8  d   QhRRRR/# r)   r   r   r*   rE   r+   )r,   s   "r-   r.   r}      s     ; ; ;4 ;r0   c                	    VP                   p\        P                  ! V4       FA  pW0P                  9   g   K  V P                  V,          P	                  VP
                  4       KC  	  \        P                  ! W4       R # r2   )r   r   r   rx   rX   r   r   _removed_from_collection)r6   r   r   r   s   &&  r-   rX   _ClsLevelDispatch.remove   sY    **''/Cnn$s#**9+?+?@ 0 	))):r0   c                   V ^8  d   QhRR/# re   r+   )r,   s   "r-   r.   r}      s     ( (t (r0   c                    \        4       pV P                  P                  4        F$  pVP                  V4       VP	                  4        K&  	  \
        P                  ! W4       R# )zClear all class level listenersN)setrx   valuesr   rg   r   _clear)r6   to_clear
dispatchers   &  r-   rg   _ClsLevelDispatch.clear   sH     *-..//1JOOJ' 2 	'r0   c                    V ^8  d   QhRRRR/# )r)   obj_Dispatch[_ET]r*   _ClsLevelDispatch[_ET]r+   )r,   s   "r-   r.   r}      s      n 1G r0   c                    V # zReturn an event collection which can be modified.

For _ClsLevelDispatch at the class level of
a dispatcher, this returns self.

r+   r6   r   s   &&r-   
for_modify_ClsLevelDispatch.for_modify   s	     r0   )rx   ru   rs   rv   rw   rt   N)rs   rt   ru   rv   rw   rx   __weakref__)r9   r:   r;   r<   r   r=   r>   r   r   r   r   r   rJ   r   rX   rg   r   r?   r+   r0   r-   rr   rr   q   sj    <I L
ILCC 5*84>=;( r0   rr   c                      ] tR t^t$ RtR]R&   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 R ltR R ltR R ltRtR# )_InstanceLevelDispatchr   parentc               $    V ^8  d   QhRRRRRR/# r   r+   )r,   s   "r-   r.   #_InstanceLevelDispatch.__annotate__  s$     6 6!6*.6	6r0   c                	8    V P                   P                  W4      # r2   )r   r   r6   r|   r   s   &&&r-   r   &_InstanceLevelDispatch._adjust_fn_spec  s     {{**255r0   c                    V ^8  d   QhRRRR/# r)   itemr   r*   r[   r+   )r,   s   "r-   r.   r     s     $ $ $ $r0   c                	    \        4       hr2   NotImplementedErrorr6   r   s   &&r-   r]   #_InstanceLevelDispatch.__contains__      !##r0   c                   V ^8  d   QhRR/# rj   r+   )r,   s   "r-   r.   r   	  s     $ $ $r0   c                	    \        4       hr2   r   r5   s   &r-   ro   _InstanceLevelDispatch.__len__	  r   r0   c                   V ^8  d   QhRR/# r)   r*   zIterator[_ListenerFnType]r+   )r,   s   "r-   r.   r     s     $ $3 $r0   c                	    \        4       hr2   r   r5   s   &r-   rb   _InstanceLevelDispatch.__iter__  r   r0   c                   V ^8  d   QhRR/# r)   r*   r[   r+   )r,   s   "r-   r.   r     s     $ $$ $r0   c                	    \        4       hr2   r   r5   s   &r-   __bool___InstanceLevelDispatch.__bool__  r   r0   c               $    V ^8  d   QhRRRRRR/# r)   r   r   r   r*   rE   r+   )r,   s   "r-   r.   r     s!     $ $s $# $$ $r0   c                	    \        4       hr2   r   r6   r   r   s   &*,r-   	exec_once _InstanceLevelDispatch.exec_once  r   r0   c               $    V ^8  d   QhRRRRRR/# r  r+   )r,   s   "r-   r.   r     s!     $ $ $3 $4 $r0   c                	    \        4       hr2   r   r	  s   &*,r-   exec_once_unless_exception1_InstanceLevelDispatch.exec_once_unless_exception  r   r0   c               $    V ^8  d   QhRRRRRR/# r  r+   )r,   s   "r-   r.   r     s!     $ $s $# $$ $r0   c                	    \        4       hr2   r   r	  s   &*,r-   _exec_w_sync_on_first_run0_InstanceLevelDispatch._exec_w_sync_on_first_run  r   r0   c               $    V ^8  d   QhRRRRRR/# r  r+   )r,   s   "r-   r.   r     s!     $ $c $ $ $r0   c                	    \        4       hr2   r   r	  s   &*,r-   __call___InstanceLevelDispatch.__call__  r   r0   c               $    V ^8  d   QhRRRRRR/# r   r+   )r,   s   "r-   r.   r     !     $ $ $4 $D $r0   c                	    \        4       hr2   r   r   s   &&&r-   r   _InstanceLevelDispatch.insert  r   r0   c               $    V ^8  d   QhRRRRRR/# r   r+   )r,   s   "r-   r.   r   !  r  r0   c                	    \        4       hr2   r   r   s   &&&r-   rJ   _InstanceLevelDispatch.append!  r   r0   c                    V ^8  d   QhRRRR/# r   r+   )r,   s   "r-   r.   r   $  s     $ $ $4 $r0   c                	    \        4       hr2   r   r6   r   s   &&r-   rX   _InstanceLevelDispatch.remove$  r   r0   c                    V ^8  d   QhRRRR/# )r)   r   _DispatchCommon[_ET]r*   _InstanceLevelDispatch[_ET]r+   )r,   s   "r-   r.   r   '  s     	 	'		$	r0   c                    V # r   r+   r   s   &&r-   r   !_InstanceLevelDispatch.for_modify'  	     r0   r+   N)r9   r:   r;   r<   r=   r>   r   r]   ro   rb   r  r
  r  r  r  r   rJ   rX   r   r?   r+   r0   r-   r   r      sS    I""6
$$$$$$$$$$$	 	r0   r   c                     ] tR tRt$ RtR+t]! 4       tR]R&   R,t	R]R	&   R
]R&   R]R&   R]R&   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! R" ltR# R$ ltR% R& ltR' R( ltR)tR*# )-_EmptyListeneri3  zServes as a proxy interface to the events
served by a _ClsLevelDispatch, when there are no
instance-level events present.

Is replaced by _ListenerCollection when instance-level
events are added.

r   parent_listenersrt   zFrozenSet[_ListenerFnType]r   z	Tuple[()]	listenersr   z(_ListenerFnSequenceType[_ListenerFnType]ry   c                    V ^8  d   QhRRRR/# r)   r   r   
target_clsr   r+   )r,   s   "r-   r.   _EmptyListener.__annotate__E  s        5  9  r0   c                	    W!P                   9  d   VP                  V4       Wn        VP                   V,          V n        VP                  V n        R # r2   )rx   r   r   r+  rt   )r6   r   r/  s   &&&r-   r   _EmptyListener.__init__E  s?    ---"":. & 0 0 <KK	r0   c                    V ^8  d   QhRRRR/# r)   r   r$  r*   _ListenerCollection[_ET]r+   )r,   s   "r-   r.   r0  L  s      '	!r0   c                   \        RV4      pVP                  f   Q h\        WP                  4      p\        P
                  ;_uu_ 4        W J g   \        V\        4      '       d"   \        V P                  VP                  4      pM$\        V\        4      '       g   Q hVuuRRR4       # W J d   \        WP                  V4       RRR4       V#   + '       g   i     X# ; i)zReturn an event collection which can be modified.

For _EmptyListener at the instance level of
a dispatcher, this generates a new
_ListenerCollection, applies it to the instance,
and returns it.

r   N)r   _instance_clsr   rt   r   mini_gilr   _JoinedListener_ListenerCollectionr   setattr)r6   r   existingresults   &&  r-   r   _EmptyListener.for_modifyL  s     #S)  ,,,3		*]]]:h#H#H,T[[#:K:KL
 "(,?@@@@ ] YY/   ] s   
AC+CC!	c               $    V ^8  d   QhRRRRRR/# r)   r   r   r   r*   r   r+   )r,   s   "r-   r.   r0  j  s!     ? ?3 ?c ?h ?r0   c                	    \        R 4      h)zneed to call for_modify()r   r	  s   &*,r-   _needs_modify_EmptyListener._needs_modifyj  s    !"=>>r0   c               $    V ^8  d   QhRRRRRR/# r@  r+   )r,   s   "r-   r.   r0  m  s!     ( (s (# (( (r0   c                	*    V P                   ! V/ VB  R # r2   rB  r	  s   &*,r-   r
  _EmptyListener.exec_oncem      D'B'r0   c               $    V ^8  d   QhRRRRRR/# r@  r+   )r,   s   "r-   r.   r0  p  s!     ( ( (3 (8 (r0   c                	*    V P                   ! V/ VB  R # r2   rF  r	  s   &*,r-   r  )_EmptyListener.exec_once_unless_exceptionp  rH  r0   c               $    V ^8  d   QhRRRRRR/# r@  r+   )r,   s   "r-   r.   r0  s  !     ( (C (s (x (r0   c                	*    V P                   ! V/ VB  R # r2   rF  r	  s   &*,r-   r   _EmptyListener.inserts  rH  r0   c               $    V ^8  d   QhRRRRRR/# r@  r+   )r,   s   "r-   r.   r0  v  rM  r0   c                	*    V P                   ! V/ VB  R # r2   rF  r	  s   &*,r-   rJ   _EmptyListener.appendv  rH  r0   c               $    V ^8  d   QhRRRRRR/# r@  r+   )r,   s   "r-   r.   r0  y  rM  r0   c                	*    V P                   ! V/ VB  R # r2   rF  r	  s   &*,r-   rX   _EmptyListener.removey  rH  r0   c               $    V ^8  d   QhRRRRRR/# r@  r+   )r,   s   "r-   r.   r0  |  s!     ( (3 (c (h (r0   c                	*    V P                   ! V/ VB  R # r2   rF  r	  s   &*,r-   rg   _EmptyListener.clear|  rH  r0   c               $    V ^8  d   QhRRRRRR/# r  r+   )r,   s   "r-   r.   r0    s!      c   r0   c                <    V P                    F  pV! V/ VB  K  	  R# zExecute this event.Nr+  r6   r   r   r|   s   &*, r-   r  _EmptyListener.__call__  s     ''BOO (r0   c                    V ^8  d   QhRRRR/# r   r+   )r,   s   "r-   r.   r0    s     - - - -r0   c                	    WP                   9   # r2   r\  r   s   &&r-   r]   _EmptyListener.__contains__  s    ,,,,r0   c                   V ^8  d   QhRR/# rj   r+   )r,   s   "r-   r.   r0    s     * * *r0   c                	,    \        V P                  4      # r2   )lenr+  r5   s   &r-   ro   _EmptyListener.__len__  s    4(())r0   c                   V ^8  d   QhRR/# r   r+   )r,   s   "r-   r.   r0    s     + +3 +r0   c                	,    \        V P                  4      # r2   )ra   r+  r5   s   &r-   rb   _EmptyListener.__iter__      D))**r0   c                   V ^8  d   QhRR/# r  r+   )r,   s   "r-   r.   r0    s     + +$ +r0   c                	,    \        V P                  4      # r2   )r[   r+  r5   s   &r-   r  _EmptyListener.__bool__  ri  r0   )rt   r   r+  N)r   r+  rt   r+   )r9   r:   r;   r<   r   r=   	frozensetr   r>   r,  r   r   rB  r
  r  r   rJ   rX   rg   r  r]   ro   rb   r  r?   r+   r0   r-   r*  r*  3  s     5I,5KI)7Iy"">>
I <?((((((-*++ +r0   r*  c                  .    ] tR tRtR R ltR R ltRtR# )_MutexProtocoli  c                   V ^8  d   QhRR/# r  r+   )r,   s   "r-   r.   _MutexProtocol.__annotate__  s    $$4$r0   c                	    R # r2   r+   r5   s   &r-   	__enter___MutexProtocol.__enter__  s    r0   c               (    V ^8  d   QhRRRRRRRR/# )	r)   exc_typezOptional[Type[BaseException]]exc_valzOptional[BaseException]exc_tbzOptional[TracebackType]r*   zOptional[bool]r+   )r,   s   "r-   r.   rq    s2      / ) (	
 
r0   c                	    R # r2   r+   )r6   rv  rw  rx  s   &&&&r-   __exit___MutexProtocol.__exit__  s    
 r0   r+   N)r9   r:   r;   r<   rs  rz  r?   r+   r0   r-   ro  ro    s    $ r0   ro  c                     a  ] tR tRt$ R#tR]R&   R]R&   R]R&   R	]R&   R	]R&   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  R! ltR"tV ;t# )$_CompoundListeneri  _exec_once_mutex
_exec_once_exec_w_sync_oncezOptional[_MutexProtocol]Collection[_ListenerFnType]r+  r,  r[   c                    V ^8  d   QhRRRR/# )r)   argr   r   r+   )r,   s   "r-   r.   _CompoundListener.__annotate__  s     ! !S ! !r0   c                	6   < \         SV `  ! V/ VB  R V n        R# FN)superr   _is_asyncio)r6   r  r   	__class__s   &*,r-   r   _CompoundListener.__init__  s    #$$ r0   c                   V ^8  d   QhRR/# re   r+   )r,   s   "r-   r.   r    s        d  r0   c                	    R V n         R# )TN)r  r5   s   &r-   _set_asyncio_CompoundListener._set_asyncio  s
    r0   c                   V ^8  d   QhRR/# )r)   r*   ro  r+   )r,   s   "r-   r.   r    s      n r0   c                	,   \         P                  ;_uu_ 4        V P                  e   V P                  uuR R R 4       # V P                  '       d   \	        4       pM\
        P                  ! 4       pWn        VuuR R R 4       #   + '       g   i     R # ; ir2   )r   r8  r~  r  r   	threadingLock)r6   mutexs   & r-   _get_exec_once_mutex&_CompoundListener._get_exec_once_mutex  s^    ]]]$$0,, ] (*!($)! ]]]s   BB'BB	c               (    V ^8  d   QhRRRRRRRR/# )r)   retry_on_exceptionr[   r   r   r   r*   rE   r+   )r,   s   "r-   r.   r    s,     / /"&//2/:=/	/r0   c                	$   V P                  4       ;_uu_ 4        V P                  '       g$    V ! V/ VB  R p T'       d	   T'       g   RT n        RRR4       R#    Rph ; i  X'       d	   T'       g	   RT n        i i ; i  + '       g   i     R# ; i)FTN)r  r  )r6   r  r   r   	exceptions   &&*, r-   _exec_once_impl!_CompoundListener._exec_once_impl  sx     &&((???/$%"% %I
 %,>*. )(
 $I$,>*. -? )((s?   A>
AA> A>A>AA!!A;2	A;;A>>B	c               $    V ^8  d   QhRRRRRR/# r  r+   )r,   s   "r-   r.   r    s!     5 5s 5# 5$ 5r0   c                Z    V P                   '       g   V P                  ! R.VO5/ VB  R# R# )zUExecute this event, but only if it has not been
executed already for this collection.FNr  r  r	  s   &*,r-   r
  _CompoundListener.exec_once  s*       444 r0   c               $    V ^8  d   QhRRRRRR/# r  r+   )r,   s   "r-   r.   r    s!     4 4 43 44 4r0   c                Z    V P                   '       g   V P                  ! R.VO5/ VB  R# R# )a<  Execute this event, but only if it has not been
executed already for this collection, or was called
by a previous exec_once_unless_exception call and
raised an exception.

If exec_once was already called, then this method will never run
the callable regardless of whether it raised or not.

.. versionadded:: 1.3.8

TNr  r	  s   &*,r-   r  ,_CompoundListener.exec_once_unless_exception  s*       333 r0   c               $    V ^8  d   QhRRRRRR/# r  r+   )r,   s   "r-   r.   r    s!      s # $ r0   c                    V P                   '       g5   V P                  4       ;_uu_ 4         V ! V/ VB  RV n          RRR4       R# V ! V/ VB  R#    h ; i  + '       g   i     R# ; i)a  Execute this event, and use a mutex if it has not been
executed already for this collection, or was called
by a previous _exec_w_sync_on_first_run call and
raised an exception.

If _exec_w_sync_on_first_run was already called and didn't raise an
exception, then a mutex is not used.  It's not guaranteed
the mutex won't be used more than once in the case of very rare
race conditions.

.. versionadded:: 1.4.11

TN)r  r  r	  s   &*,r-   r  +_CompoundListener._exec_w_sync_on_first_run  sh     %%%**,,2$%"% .2D* -, $"	 -,,s!   AAAAAA(	c               $    V ^8  d   QhRRRRRR/# r  r+   )r,   s   "r-   r.   r    s!      c   r0   c                r    V P                    F  pV! V/ VB  K  	  V P                   F  pV! V/ VB  K  	  R# r[  r+  r,  r]  s   &*, r-   r  _CompoundListener.__call__  s8     ''BOO (..BOO !r0   c                    V ^8  d   QhRRRR/# r   r+   )r,   s   "r-   r.   r    s     G G G Gr0   c                	J    WP                   9   ;'       g    WP                  9   # r2   r  r   s   &&r-   r]   _CompoundListener.__contains__  s     ,,,FF0FFr0   c                   V ^8  d   QhRR/# rj   r+   )r,   s   "r-   r.   r    s     @ @ @r0   c                	`    \        V P                  4      \        V P                  4      ,           # r2   )rd  r+  r,  r5   s   &r-   ro   _CompoundListener.__len__  s!    4(()C,???r0   c                   V ^8  d   QhRR/# r   r+   )r,   s   "r-   r.   r    s     < <3 <r0   c                	B    \        V P                  V P                  4      # r2   )r   r+  r,  r5   s   &r-   rb   _CompoundListener.__iter__  s    T**DNN;;r0   c                   V ^8  d   QhRR/# r  r+   )r,   s   "r-   r.   r    s     = =$ =r0   c                	T    \        V P                  ;'       g    V P                  4      # r2   )r[   r,  r+  r5   s   &r-   r  _CompoundListener.__bool__  s    DNN;;d&;&;<<r0   )r  r~  r  r  )r~  r  r  r  )r9   r:   r;   r<   r=   r>   r   r  r  r  r
  r  r  r  r]   ro   rb   r  r?   __classcell__r  s   @r-   r}  r}    sr    I /.11**! ! /542G@<= =r0   r}  c                     a  ] tR tRt$ RtRtR]R&   R	]R&   R
]R&   R]R&   R]R&   R V 3R lltR R ltRR R llt	R R lt
R R ltR R ltR R ltRtV ;t# )r:  i  zInstance-level attributes on instances of :class:`._Dispatch`.

Represents a collection of listeners.

As of 0.7.9, _ListenerCollection is only first
created via the _EmptyListener.for_modify() method.

r+  r   rt   r,  r   r  r   ry   zDeque[_ListenerFnType]zSet[_ListenerFnType]c                    V ^8  d   QhRRRR/# r.  r+   )r,   s   "r-   r.    _ListenerCollection.__annotate__+  s      5 9 r0   c                	@  < \         SV `  4        W!P                  9  d   VP                  V4       R V n        R V n        RV n        VP                  V,          V n        Wn        VP                  V n	        \        P                  ! 4       V n        \        4       V n        R# r  )r  r   rx   r   r  r  r~  r+  r   rt   r   r   r,  r   r   )r6   r   r/  r  s   &&&r-   r   _ListenerCollection.__init__+  s{    ---"":.!& $ & 0 0 <KK	$**,r0   c                    V ^8  d   QhRRRR/# r4  r+   )r,   s   "r-   r.   r  8  s     	 	'		!	r0   c                    V # )zReturn an event collection which can be modified.

For _ListenerCollection at the instance level of
a dispatcher, this returns self.

r+   r   s   &&r-   r   _ListenerCollection.for_modify8  r(  r0   c               $    V ^8  d   QhRRRRRR/# )r)   rR   r5  only_propagater[   r*   rE   r+   )r,   s   "r-   r.   r  C  s)     H H-H?CH	Hr0   c                   V P                   p\        V4      pV P                  P                  VP                  4       VP                    Uu. uF%  pWT9  d	   V'       d   WPP                  9   g   K#  VNK'  	  ppVP	                  V4       VP
                  '       d   V P                  4        VP                  P                  V4      p\        P                  ! WV4       R# u upi )zAPopulate from the listeners in another :class:`_Dispatch`
object.N)
r,  r   r   r   rT   r  r  unionr   _stored_in_collection_multi)r6   rR   r  existing_listenersexisting_listener_setlother_listenersto_associates   &&&     r-   _update_ListenerCollection._updateC  s    
 "^^ #$6 7eoo. __
$-"NN"	 A$ 	 
 	!!/2,,_=,,T,G
s   CC0Cc               $    V ^8  d   QhRRRRRR/# r   r+   )r,   s   "r-   r.   r  [  !     9 9 94 9D 9r0   c                	    VP                  W P                  4      '       d2   V'       d(   V P                  P                  VP                  4       R # R # R # r2   )prepend_to_listr,  r   addr   r   s   &&&r-   r   _ListenerCollection.insert[  s<    $$T>>::""9#7#78  ;r0   c               $    V ^8  d   QhRRRRRR/# r   r+   )r,   s   "r-   r.   r  `  r  r0   c                	    VP                  W P                  4      '       d2   V'       d(   V P                  P                  VP                  4       R # R # R # r2   )append_to_listr,  r   r  r   r   s   &&&r-   rJ   _ListenerCollection.append`  s<    ##D..99""9#7#78  :r0   c                    V ^8  d   QhRRRR/# r   r+   )r,   s   "r-   r.   r  e  s     ; ; ;4 ;r0   c                	    V P                   P                  VP                  4       V P                  P	                  VP                  4       \
        P                  ! W4       R # r2   )r,  rX   r   r   discardr   r   r!  s   &&r-   rX   _ListenerCollection.removee  s@    i223y334))):r0   c                   V ^8  d   QhRR/# re   r+   )r,   s   "r-   r.   r  j  s      t r0   c                	    \         P                  ! W P                  4       V P                  P	                  4        V P                  P	                  4        R # r2   )r   r   r,  r   rg   r5   s   &r-   rg   _ListenerCollection.clearj  s2    nn-r0   )r  r~  r  r,  rt   r   r+  r   )r+  r   rt   r,  r   r   )T)r9   r:   r;   r<   r   r=   r>   r   r   r  r   rJ   rX   rg   r?   r  r  s   @r-   r:  r:    s\    I 21""
I%%## 	H09
9
;
 r0   r:  c                      ] tR tRt$ RtR]R&   R]R&   R]R&   R	]R&   R
 R lt]P                  '       g   ]	R R l4       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R# )r9  ip  parent_dispatchrt   localr+  r$  ry   r%  r  c               $    V ^8  d   QhRRRRRR/# )r)   r  r$  rt   ry   r  z_EmptyListener[_ET]r+   )r,   s   "r-   r.   _JoinedListener.__annotate__x  s(     + +-+ + #	+r0   c                	v    R V n         R V n        RV n        Wn        W n        W0n        V P
                  V n        R# r  )r  r  r~  r  rt   r  r+  )r6   r  rt   r  s   &&&&r-   r   _JoinedListener.__init__x  s7      !& $.	
 $

r0   c                   V ^8  d   QhRR/# )r)   r*   r  r+   )r,   s   "r-   r.   r    s     	< 	<: 	<r0   c                	B    \        V P                  V P                  4      # r2   )r   r  rt   r5   s   &r-   r,  _JoinedListener.listeners  s    4//;;r0   c               $    V ^8  d   QhRRRRRR/# r   r+   )r,   s   "r-   r.   r    s$     5 5!5*.5	5r0   c                	8    V P                   P                  W4      # r2   )r  r   r   s   &&&r-   r   _JoinedListener._adjust_fn_spec  s     zz))"44r0   c                    V ^8  d   QhRRRR/# )r)   r   r$  r*   z_JoinedListener[_ET]r+   )r,   s   "r-   r.   r    s      2 7K r0   c                	T    V P                   P                  V4      ;V n         V n        V # r2   )r  r   r+  r   s   &&r-   r   _JoinedListener.for_modify  s%    -1ZZ-B-B3-GG
T*r0   c               $    V ^8  d   QhRRRRRR/# r   r+   )r,   s   "r-   r.   r    !     0 0 04 0D 0r0   c                	<    V P                   P                  W4       R # r2   )r  r   r   s   &&&r-   r   _JoinedListener.insert      

)/r0   c               $    V ^8  d   QhRRRRRR/# r   r+   )r,   s   "r-   r.   r    r  r0   c                	<    V P                   P                  W4       R # r2   )r  rJ   r   s   &&&r-   rJ   _JoinedListener.append  r  r0   c                    V ^8  d   QhRRRR/# r   r+   )r,   s   "r-   r.   r    s     % % %4 %r0   c                	<    V P                   P                  V4       R # r2   )r  rX   r!  s   &&r-   rX   _JoinedListener.remove  s    

)$r0   c                   V ^8  d   QhRR/# re   r+   )r,   s   "r-   r.   r    s     $ $t $r0   c                	    \        4       hr2   r   r5   s   &r-   rg   _JoinedListener.clear  r   r0   )r  r~  r  r  rt   r  r+  N)r  rt   r  r+  )r9   r:   r;   r<   r=   r>   r   typingTYPE_CHECKINGpropertyr,  r   r   r   rJ   rX   rg   r?   r+   r0   r-   r9  r9  p  sh    FI))
I&&11+  
	< 
	<5
00%$ $r0   r9  )9r   
__future__r   r   	itertoolsr   r  typesr   r  r   r   r   r   r	   r
   r   r   r   r   r   r   r   r   r   r   r   r3    r   r   r   r   r   r   r   util.concurrencyr   util.typingr   r   r  baser!   r"   r#   MemoizedSlotsr%   rA   _ListenerFnSequenceTyperr   r   r*  ro  r}  r:  r9  r+   r0   r-   <module>r     s^  . #             ! "              %   / "T	%(<D&& <
2 4  b	+<R+@ @A Hc* HV4]3/O1L 4n\++C0 \+~X r=.s3 r=j[+C0 [|4$', 4$r0   