+
    —h©jã  ã                   óÞ   € R t ^ RIHtHtHt ^ RIt]P                  ! ]4      t^ RI	H
t
Ht ^ RIt^ RIHt ^ RIHt . ROt ! R	 R]4      t ! R
 R]4      tR t ! R R]4      tRR ltRR ltR# )z7
passlib.utils.decor -- helper decorators & properties
)Úabsolute_importÚdivisionÚprint_functionN)ÚwrapsÚupdate_wrapper)Úwarn)ÚPY3ÚclasspropertyÚhybrid_methodÚmemoized_propertyc                   ó@   a € ] tR t^ t o RtR tR t]R 4       tRt	V t
R# )r	   zjFunction decorator which acts like a combination of classmethod+property (limited to read-only properties)c                ó   € Wn         R # ©N©Úim_func©ÚselfÚfuncs   &&ÚN/var/www/html/bestweb/venv/lib/python3.14/site-packages/passlib/utils/decor.pyÚ__init__Úclassproperty.__init__#   s   € ØŽó    c                ó$   € V P                  V4      # r   r   ©r   ÚobjÚclss   &&&r   Ú__get__Úclassproperty.__get__&   s   € Ø�|‰|˜CÓ Ð r   c                ó   € V P                   # )zpy3 compatible aliasr   ©r   s   &r   Ú__func__Úclassproperty.__func__)   s   € ð �|‰|Ðr   r   N)Ú__name__Ú
__module__Ú__qualname__Ú__firstlineno__Ú__doc__r   r   Úpropertyr    Ú__static_attributes__Ú__classdictcell__©Ú__classdict__s   @r   r	   r	       s&   ø‡ € Ùtòò!ð ñó ör   c                   ó0   a € ] tR t^.t o RtR tR tRtV tR# )r
   zu
decorator which invokes function with class if called as class method,
and with object if called at instance level.
c                ó(   € Wn         \        W4       R # r   )r   r   r   s   &&r   r   Úhybrid_method.__init__4   s   € ØŒ	Ü�tÖ"r   c                óª   € Vf   Tp\         '       d"   \        P                  ! V P                  V4      # \        P                  ! V P                  W4      # r   )r   ÚtypesÚ
MethodTyper   r   s   &&&r   r   Úhybrid_method.__get__8   s?   € ØŠ;ØˆCß‹3Ü×#Ò# D§I¡I¨sÓ3Ð3ä×#Ò# D§I¡I¨sÓ8Ð8r   )r   N)	r"   r#   r$   r%   r&   r   r   r(   r)   r*   s   @r   r
   r
   .   s   ø‡ € ñò
#÷9ð 9r   c                óP   a a€ / o\        S 4      VV 3R l4       pV3R lpW!n        V# )z€
decorator for function which takes no args,
and memoizes result.  exposes a ``.clear_cache`` method
to clear the cached value.
c                  óV   <€  SR ,          #   \          d     Mi ; iS! 4       ;p SR &   T # )T)ÚKeyError)ÚvalueÚcacher   s    €€r   ÚwrapperÚ%memoize_single_value.<locals>.wrapperL   s9   ø€ ð	Ø˜•;ÐøÜô 	Ùð	úá"›fÐ$ˆ��d‘Øˆs   ƒ Œ™c                  ó,   <€ S P                  R R4       R# )TN)Úpop)r7   s   €r   Úclear_cacheÚ)memoize_single_value.<locals>.clear_cacheU   s   ø€ Ø�	‰	�$˜Ör   )r   r<   )r   r8   r<   r7   s   f  @r   Úmemoize_single_valuer>   D   s0   ù€ ð €Eä
ˆ4ƒ[õó ðõà%Ôà€Nr   c                   ó`   a € ] tR t^[t o RtR tR t]'       g	   ]R 4       t	R t
R	R ltRtV tR# )
r   zE
decorator which invokes method once, then replaces attr with result
c                óV   € Wn         VP                  V n        VP                  V n        R # r   )r    r"   r&   r   s   &&r   r   Úmemoized_property.__init___   s   € ØŒØŸ™ˆŒØ—|‘|ˆŽr   c                ó`   € Vf   V # V P                  V4      p\        WP                  V4       V# r   )r    Úsetattrr"   )r   r   r   r6   s   &&& r   r   Úmemoized_property.__get__d   s-   € ØŠ;ØˆKØ—‘˜cÓ"ˆÜ�—]‘] EÔ*Øˆr   c                ó   € V P                   # )z	py2 alias)r    r   s   &r   r   Úmemoized_property.im_funcm   s   € ð —=‘=Ð r   c                óR   € VP                   P                  V P                  R4       R# )zh
class-level helper to clear stored value (if any).

usage: :samp:`type(self).{attr}.clear_cache(self)`
N)Ú__dict__r;   r"   )r   r   s   &&r   r<   Úmemoized_property.clear_cacher   s   € ð 	�‰×Ñ˜Ÿ™¨Ö-r   Nc                óN   € VP                   P                  V P                  V4      # )zh
class-level helper to peek at stored value

usage: :samp:`value = type(self).{attr}.clear_cache(self)`
)rH   Úgetr"   )r   r   Údefaults   &&&r   Ú
peek_cacheÚmemoized_property.peek_cachez   s   € ð �|‰|×Ñ §¡¨wÓ7Ð7r   )r&   r    r"   r   )r"   r#   r$   r%   r&   r   r   r   r'   r   r<   rM   r(   r)   r*   s   @r   r   r   [   s:   ø‡ € ñò$ò
÷ à	ñ	!ó 
ð	!ò.÷8ò 8r   c                óÔ   a aaaaaa€ S fQ   S'       d   Ro MRo S'       d
   S R,          o S'       d
   S R,          o S'       d   S RS,          ,          o S R,          o VVVV VVV3R lpV# )aJ  decorator to deprecate a function.

:arg msg: optional msg, default chosen if omitted
:kwd deprecated: version when function was first deprecated
:kwd removed: version when function will be removed
:kwd replacement: alternate name / instructions for replacing this function.
:kwd updoc: add notice to docstring (default ``True``)
z5the method %(mod)s.%(klass)s.%(name)s() is deprecatedz-the function %(mod)s.%(name)s() is deprecatedz as of Passlib %(deprecated)sz,, and will be removed in Passlib %(removed)sz, use %s insteadÚ.c                 óŽ  <a aaa€ S;'       d    \        S \        4      oS'       d!   S P                  R \        4      P                  o \        S;'       g    S P                  S P                  SS
R7      oS'       d   V VV	V3R lpMS	S,          oV V3R lp\        VS 4       S'       Ed   S'       g	   S
'       d÷   VP                  '       då   RVP                  9  dÔ   S;'       g    RpS
'       g	   S'       dQ   VR,          pS
'       d   VRS
: 2,          pS'       d"   S
'       d
   VR,          pVR	S,          ,          pVR
,          pVP                  P                  R4      P                  R4      '       g   V;P                  R,          un	        V;P                  RV: R2,          un	        S'       d   \        V4      pV# )N)ÚmodÚnameÚ
deprecatedÚremovedc                  óü   <€ SP                  4       pS'       d
   V ^ ,          MV ^ ,          P                  pVP                  VP                  VP                  R7       \        SV,          \        ^R7       S! V / VB # )é    )ÚklassrR   ©Ú
stacklevel)ÚcopyÚ	__class__Úupdater"   r#   r   ÚDeprecationWarning)ÚargsÚkwdsÚtmprX   r   Úis_classmethodÚmsgÚoptss   *,  €€€€r   r8   Ú3deprecated_function.<locals>.build.<locals>.wrapperº   s`   ø€ Ø—i‘i“k�ß#1˜˜Qž°t¸Aµw×7HÑ7H�Ø—
‘
 §¡°U×5EÑ5E�
ÔFÜ�S˜3•YÔ 2¸qÕAÙ˜TÐ* TÑ*Ð*r   c                  ó8   <€ \        S\        ^R7       S! V / VB # )é   rY   )r   r^   )r_   r`   r   Útexts   *,€€r   r8   re   Â   s    ø€ Ü�TÔ-¸!Õ<Ù˜TÐ* TÑ*Ð*r   z.. deprecated::Ú z
    zand will be removed in version z, zuse %s insteadrP   Ú Ú
z
.. deprecated:: )Ú
isinstanceÚclassmethodr   Útyper    Údictr#   r"   r   r&   ÚstripÚendswith)r   r8   Útxtrb   rd   rh   Ú
_is_methodrT   Úfunc_modulerc   rU   ÚreplacementÚupdocs   f  @@@€€€€€€€r   ÚbuildÚ"deprecated_function.<locals>.build®   sC  ü€ Ø#×EÐE¬
°4¼Ó(Eˆßà—<‘< ¤dÓ+×4Ñ4ˆDÜØ×.Ð.˜tŸ™Ø—‘Ø!Øô	ˆ÷ ÷+ñ +ð ˜•:ˆDö+ô 	�w Ô%ßˆ5—j§GØ—?—?�?Ð'8ÀÇÁÔ'OØ×"Ð" ˆCßŸ+Ø�x•�ßÙÂ'ÐKÕK�CßßØ˜t�˜ØÐ+¨kÕ9Õ9�CØ�s•
�Ø—?‘?×(Ñ(¨Ó-×6Ñ6°t×<Ò<Ø—’ 4Õ'•Ø�O‹O»3Ð@Õ@�OßÜ! 'Ó*ˆGØˆr   © )rc   rT   rU   rv   ru   rs   rt   rw   s   fffffff r   Údeprecated_functionrz   —   sa   þ€ ð ‚{ßØI‰CàAˆCßØÐ2Õ2ˆCßØÐAÕAˆCßØÐ%¨Õ3Õ3ˆCØˆs�
ˆ÷)ó )ðT €Lr   c           	     ó    € \        WW#VRR7      # )aB  decorator to deprecate a method.

:arg msg: optional msg, default chosen if omitted
:kwd deprecated: version when method was first deprecated
:kwd removed: version when method will be removed
:kwd replacement: alternate name / instructions for replacing this method.
:kwd updoc: add notice to docstring (default ``True``)
T)rs   )rz   )rc   rT   rU   rv   ru   s   &&&&&r   Údeprecated_methodr|   Ú   s   € ô ˜s°ÀØ*.ô0ð 0r   )r	   r
   r>   r   rz   r|   )NNNTNFN)NNNTN)r&   Ú
__future__r   r   r   ÚloggingÚ	getLoggerr"   ÚlogÚ	functoolsr   r   r0   Úwarningsr   Úpasslib.utils.compatr   Ú__all__Úobjectr	   r
   r>   r   rz   r|   ry   r   r   Ú<module>r†      sq   ðñ÷ AÑ @Û Ø×Ò˜Ó!€ß +Û Ý õ %ò	€ô�Fô ô9�Fô 9ò,ô.%8˜ô %8ôxAöF0r   