+
    ¢THis  ã                   óŒ   € R t ^ RIt^ RIHt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
N)Úupdate_wrapperÚwraps)ÚwarnÚclasspropertyÚhybrid_methodÚmemoized_propertyc                   ó0   a € ] tR t^t o RtR tR 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©Ú__func__©ÚselfÚfuncs   &&Ú5/usr/lib/python3/dist-packages/passlib/utils/decor.pyÚ__init__Úclassproperty.__init__   s   € àŽó    c                ó$   € V P                  V4      # r
   r   ©r   ÚobjÚclss   &&&r   Ú__get__Úclassproperty.__get__   s   € Ø�}‰}˜SÓ!Ð!r   r   N©	Ú__name__Ú
__module__Ú__qualname__Ú__firstlineno__Ú__doc__r   r   Ú__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__$   s   € àŒ	Ü�tÖ"r   c                óP   € Vf   Tp\         P                  ! V P                  V4      # r
   )ÚtypesÚ
MethodTyper   r   s   &&&r   r   Úhybrid_method.__get__)   s#   € ØŠ;ØˆCÜ×Ò §	¡	¨3Ó/Ð/r   )r   Nr   r"   s   @r   r   r      s   ø‡ € ñò
#÷
0ð 0r   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>.wrapper7   s9   ø€ ð	Ø˜•;ÐøÜô 	Ùð	úá"›fÐ$ˆ��d‘Øˆs   ƒ Œ™c                  ó,   <€ S P                  R R4       R# )TN)Úpop)r/   s   €r   Úclear_cacheÚ)memoize_single_value.<locals>.clear_cache@   s   ø€ Ø�	‰	�$˜Ör   )r   r4   )r   r0   r4   r/   s   f  @r   Úmemoize_single_valuer6   /   s2   ù€ ð €Eä
ˆ4ƒ[õó ðõð &Ôà€Nr   c                   ó@   a € ] tR t^Ht o RtR tR 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__M   s   € ØŒØŸ™ˆŒØ—|‘|ˆŽr   c                ó`   € Vf   V # V P                  V4      p\        WP                  V4       V# r
   )r   Úsetattrr   )r   r   r   r.   s   &&& r   r   Úmemoized_property.__get__R   s-   € ØŠ;ØˆKØ—‘˜cÓ"ˆÜ�—]‘] EÔ*Øˆ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__r3   r   )r   r   s   &&r   r4   Úmemoized_property.clear_cacheY   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)`
)r>   Úgetr   )r   r   Údefaults   &&&r   Ú
peek_cacheÚmemoized_property.peek_cachea   s   € ð �|‰|×Ñ §¡¨wÓ7Ð7r   )r   r   r   r
   )r   r   r   r   r   r   r   r4   rC   r    r!   r"   s   @r   r   r   H   s#   ø‡ € ñò$ò
ò.÷8ò 8r   c                óÎ   a aaaaaa€ S fN   S'       d   Ro MRo S'       d
   S R,          o S'       d
   S R,          o S'       d   S RS R2,          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 ú insteadÚ.c                 ó\  <a aaa€ S;'       d    \        S \        4      oS'       d   S 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'       dM   VR,          pS
'       d   VRS
 2,          pS'       d   S
'       d
   VR,          pVRS R	2,          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# ))Ú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 # )é    )ÚklassrI   ©Ú
stacklevel)ÚcopyÚ	__class__Úupdater   r   r   ÚDeprecationWarning)ÚargsÚkwdsÚtmprO   r   Úis_classmethodÚmsgÚoptss   *,  €€€€r   r0   Ú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 # )é   rP   )r   rU   )rV   rW   r   Útexts   *,€€r   r0   r\   °   s    ø€ Ü�TÔ-¸!Õ<Ù˜TÐ* TÑ*Ð*r   z.. deprecated::Ú z
    zand will be removed in version z, zuse rF   rG   Ú Ú
z
.. deprecated:: )
Ú
isinstanceÚclassmethodr   Údictr   r   r   r   ÚstripÚendswith)r   r0   ÚtxtrY   r[   r_   Ú
_is_methodrK   Úfunc_modulerZ   rL   ÚreplacementÚupdocs   f  @@@€€€€€€€r   ÚbuildÚ"deprecated_function.<locals>.build›   sF  ü€ Ø#×EÐE¬
°4¼Ó(EˆßØ—=‘=ˆDÜØ×.Ð.˜tŸ™Ø—‘Ø!Øô	
ˆ÷ ÷+ñ +ð ˜•:ˆDö+ô 	�w Ô%çˆEßŸwØ——�Ø!¨¯©Ô8à×"Ð" ˆCßŸ+Ø�x•�ßØÐ<¸W¸IÐFÕF�CßßØ˜t�˜Ø˜T + ¨hÐ7Õ7�CØ�s•
�Ø—?‘?×(Ñ(¨Ó-×6Ñ6°t×<Ò<Ø—’ 4Õ'•Ø�OŠOÐ!3°C°5¸Ð;Õ;�OßÜ! 'Ó*ˆGØˆr   © )rZ   rK   rL   rl   rk   ri   rj   rm   s   fffffff r   Údeprecated_functionrp   }   sd   þ€ ð" ‚{ßØI‰CàAˆCßØÐ2Õ2ˆCßØÐAÕAˆCßØ�V˜K˜=¨Ð1Õ1ˆCØˆs�
ˆ÷/ó /ðb €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)ri   )rp   )rZ   rK   rL   rl   rk   s   &&&&&r   Údeprecated_methodrr   Ï   s   € ô Ø˜¨Àôð r   )r   r   r6   r   rp   rr   )NNNTNFN)NNNTN)r   r(   Ú	functoolsr   r   Úwarningsr   Ú__all__r   r   r6   r   rp   rr   ro   r   r   Ú<module>rv      sL   ðñó ß +Ý ò€÷"ñ "÷0ñ 0ò"÷28ñ 8ôjOödr   