+
    ˜h©j   ã                  ó   € R 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]R]3,          R7      t ! R R]4      t ! R R]4      t ! R R4      tR# )z7State tracking utilities used by :class:`_orm.Session`.)ÚannotationsN)ÚEnum)ÚAny)ÚCallable)Úcast)ÚIterator)ÚNoReturn)ÚOptional)ÚTuple)ÚTypeVar)ÚUnion)Úexc)Úutil)ÚLiteralÚ_F.)Úboundc                  ó   € ] tR t^tRtR# )Ú_StateChangeState© N)Ú__name__Ú
__module__Ú__qualname__Ú__firstlineno__Ú__static_attributes__r   ó    ÚW/var/www/html/bestweb/venv/lib/python3.14/site-packages/sqlalchemy/orm/state_changes.pyr   r      s   † Ûr   r   c                  ó"   € ] tR t^#t^t^t^tRtR# )Ú_StateChangeStatesr   N)r   r   r   r   ÚANYÚ	NO_CHANGEÚCHANGE_IN_PROGRESSr   r   r   r   r   r   #   s   † Ø
€CØ€IØÔr   r   c                  óº   € ] tR t^)t$ Rt]P                  tR]R&   ]P                  t
R]R&   RtR]R&   R R	 lt]R
 R l4       t]P                   R R l4       tRtR# )Ú_StateChangea  Supplies state assertion decorators.

The current use case is for the :class:`_orm.SessionTransaction` class. The
:class:`_StateChange` class itself is agnostic of the
:class:`_orm.SessionTransaction` class so could in theory be generalized
for other systems as well.

r   Ú_next_stateÚ_stateNzOptional[Callable[..., Any]]Ú_current_fnc               ó$   € V ^8„  d   QhRRRRRR/# )é   Úoperation_nameÚstrÚstater   Úreturnr   r   )Úformats   "r   Ú__annotate__Ú_StateChange.__annotate__7   s$   € ÷ 
ñ 
Ø!ð
Ø*;ð
à	ñ
r   c                	ó@   € \         P                  ! R V RV: 2RR7      h)úCan't run operation 'z()' when Session is in state Úisce©Úcode)Úsa_excÚIllegalStateChangeError)Úselfr(   r*   s   &&&r   Ú_raise_for_prerequisite_stateÚ*_StateChange._raise_for_prerequisite_state7   s1   € ô ×,Ò,Ø# NÐ#3ð 4Ø ™)ð%àô
ð 	
r   c               ó$   € V ^8„  d   QhRRRRRR/# )r'   Úprerequisite_stateszEUnion[Literal[_StateChangeStates.ANY], Tuple[_StateChangeState, ...]]Úmoves_tor   r+   zCallable[[_F], _F]r   )r,   s   "r   r-   r.   A   s/   € ÷ jñ jð
ðjð
 $ðjð 
ñjr   c                óÊ   aaaa€ V'       g   Q R4       hV\         P                  Jo\        RV4      oS\         P                  Jo\        P
                  R VVVV3R ll4       pV# )a„  Method decorator declaring valid states.

:param prerequisite_states: sequence of acceptable prerequisite
 states.   Can be the single constant _State.ANY to indicate no
 prerequisite state

:param moves_to: the expected state at the end of the method, assuming
 no exceptions raised.   Can be the constant _State.NO_CHANGE to
 indicate state should not change at the end of the method.

zno prerequisite states sentzTuple[_StateChangeState, ...]c          
     ó,   € V ^8„  d   QhRRRRRRRRRR/# )r'   Úfnr   r6   r   ÚargÚkwr+   r   )r,   s   "r   r-   Ú1_StateChange.declare_states.<locals>.__annotate__^   s6   € ÷ K	/ñ K	/�Bð K	/˜cð K	/¨ð K	/°Cð K	/¸Cñ K	/r   c                ó@  <€ VP                   pS
'       d$   VS9  d   VP                  V P                  V4       VP                  pVP                  pS	'       d   SMTpV\
        P                  Jdž   S	'       d–   WWJd‘   V'       d\   V\
        P                  \
        P                  39   d7   \        P                  ! R V P                   RVP                   RS: 2RR7      h\        P                  ! RV P                   RS: RV: 2RR7      hWn        \
        P                  Vn         V ! V.VO5/ VB pVP                   VJ d   VWQn        Wan        # VP                   VJ d+   \        P                  ! R V P                   RS: R	2RR7      hV'       dA   \        P                  ! R
VP                   RV P                   RVP                   : 2RR7      h\        P                  ! R V P                   RVP                   : 2RR7      h   h ; i  YQn        Yan        i ; i)zMethod 'z"()' can't be called here; method 'zN()' is already in progress and this would cause an unexpected state change to r1   r2   r0   z()' here; will move to state z where we are expecting z()' failed to change state to z as expectedzWhile method 'z()' was running, method 'z)()' caused an unexpected state change to )r$   r7   r   r#   r%   r   r   r   r    r4   r5   )r>   r6   r?   r@   Úcurrent_stateÚ
next_stateÚexisting_fnÚexpect_stateÚ	ret_valueÚexpect_state_changeÚhas_prerequisite_statesr;   Úprerequisite_state_collections   &&*,     €€€€r   Ú_goÚ(_StateChange.declare_states.<locals>._go]   s6  ø€ à ŸK™KˆM÷ (Ø!Ð)FÔFà×2Ñ2°2·;±;ÀÔNà×)Ñ)ˆJØ×*Ñ*ˆKß':™8ÀˆLð Ô"4×"8Ñ"8Ó8ç'àÓ2ç :Ü&×0Ñ0Ü&×9Ñ9ð2ô $ô !×8Ò8Ø" 2§;¡; -ð 0#Ø#.×#7Ñ#7Ð"8ð 9+à+3©,ð8ð $ôð ô !×8Ò8Ø/°·±¨}ð =.Ø.6©\ð :%Ø%/¡Nð4ð $ô	ð ð  "ÔÜ1×DÑDˆDÔð!/Ù˜tÐ0 cÒ0¨RÑ0�	ð —;‘; ,Ó.Ø$ð4 $.Ô Ø#.Õ ð3 —;‘; -Ó/Ü ×8Ò8Ø" 2§;¡; -ð 0à&™\¨ð7ð $ô	ð ÷ !Ü ×8Ò8Ø(¨×)=Ñ)=Ð(>ð ?#à#%§;¡; -ð 0+à+/¯;©;©/ð	;ð
 $ôð ô !×8Ò8Ø" 2§;¡; -ð 0+Ø+/¯;©;©/ð;à#ôð øð/Øûð: $.Ô Ø#.Õ ús,   Ä*H	 Ä6H ÅAH ÆA3H È	HÈH ÈH)r   r   r   r   r   Ú	decorator)Úclsr:   r;   rK   rH   rI   rJ   s   &&f @@@r   Údeclare_statesÚ_StateChange.declare_states@   su   û€ ÷& #ÐAÐ$AÓAÐ"àÔ'9×'=Ñ'=Ð=ð 	 ô )-Ø+Ð-@ó)
Ð%ð 'Ô.@×.JÑ.JÐJÐä	�‰÷K	/ò K	/ó 
ðK	/ðZ ˆ
r   c               ó    € V ^8„  d   QhRRRR/# )r'   Úexpectedr   r+   zIterator[Any]r   )r,   s   "r   r-   r.   ®   s   € ÷ Eñ EÐ&7ð E¸Mñ Er   c              #  óF  "  € V P                   \        P                  J g   Q R4       hWn          Rx € V P                  VJd'   \        P
                  ! RV P                  : 2RR7      h \        P                  T n         R#    h ; i  \        P                  T n         i ; i5i)zhcalled within a method that changes states.

method must also use the ``@declare_states()`` decorator.

zAUnexpected call to _expect_state outside of state-changing methodNzUnexpected state change to r1   r2   )r#   r   r    r$   r4   r5   )r6   rR   s   &&r   Ú_expect_stateÚ_StateChange._expect_state­   sŸ   é € ð ×ÑÔ#5×#HÑ#HÓHð 	
ð$ó	
ÐHð
 $Ôð
	EÛð �{‰{ (Ó*Ü×4Ò4Ø1°$·+±+±ÐAÈôð ð +ô
  2×DÑDˆDÖøð	Øûô  2×DÑDˆDÕüs-   ‚,B!¯B ³6B Á*B!ÂBÂB ÂBÂB!)r%   r#   )r   r   r   r   Ú__doc__r   r   r#   Ú__annotations__r   r$   r%   r7   ÚclassmethodrO   Ú
contextlibÚcontextmanagerrT   r   r   r   r   r"   r"   )   sn   ‡ ñð &8×%;Ñ%;€KÐ"Ó;Ø 2× <Ñ <€FÐÓ<Ø04€KÐ-Ó4õ
ð ôjó ðjðX ×ÑôEó ôEr   r"   )rV   Ú
__future__r   rY   Úenumr   Útypingr   r   r   r   r   r	   r
   r   r   Ú r   r4   r   Úutil.typingr   r   r   r   r"   r   r   r   Ú<module>r`      ss   ðñ >å "ã Ý Ý Ý Ý Ý Ý Ý Ý Ý Ý å Ý Ý !áˆT˜ # s (Õ+Ô,€ô	˜ô 	ôÐ*ô ÷[Eó [Er   