+
    i6  c                   sh    R t ^ RIt^ RIt^ RIt ^ RIt ! R R]4      t]t	R#   ] d    ^ RIt Li ; i)a  
Parameters deprecation
======================

.. _Tantale's Blog: https://tantale.github.io/
.. _Deprecated Parameters: https://tantale.github.io/articles/deprecated_params/

This module introduces a :class:`deprecated_params` decorator to specify that one (or more)
parameter(s) are deprecated: when the user executes a function with a deprecated parameter,
he will see a warning message in the console.

The decorator is customizable, the user can specify the deprecated parameter names
and associate to each of them a message providing the reason of the deprecation.
As with the :func:`~deprecated.classic.deprecated` decorator, the user can specify
a version number (using the *version* parameter) and also define the warning message category
(a subclass of :class:`Warning`) and when to display the messages (using the *action* parameter).

The complete study concerning the implementation of this decorator is available on the `Tantale's blog`_,
on the `Deprecated Parameters`_ page.
Nc                   sN   a  ] tR t^!t o RtR]3R ltR
R ltR tR t	R t
RtV tR	# )DeprecatedParamsz[
Decorator used to decorate a function which at least one
of the parameters is deprecated.
 c                sD    / V n         W0n        V P                  WR 7       R# ))reasonN)messagescategorypopulate_messages)selfparamr   r   s   &&&&6/usr/lib/python3.14/site-packages/deprecated/params.py__init__ZDeprecatedParams.__init__'   s     u4    c                s   \        V\        4      '       d   V P                  P                  V4       R# \        V\        4      '       d/   R pT;'       g    VP                  VR7      pW P                  V&   R# \        V4      h)z!'{param}' parameter is deprecated)r   N)Z
isinstanceZdictr   ZupdateZstrZformatZ	TypeError)r   r   r   Zfmts   &&& r   r   Z"DeprecatedParams.populate_messages,   sb    eT""MM  's##5C66szzz6F#)MM% E""r
   c                s    VP                   ! V/ VB p\        P                  ! VP                  3/ VP                  B pV Uu. uF  qfV P
                  9   g   K  VNK  	  up# u upi N)ZbindcollectionsZOrderedDictZ	argumentskwargsr   )r   	signatureargsr   ZbindingZboundr   s   &&*,   r   check_paramsZDeprecatedParams.check_params6   sW    ..$1&1''(9(9LW^^L#(C5%T]],B5CCCs   A"A"c                s\    V F%  p\         P                  ! W P                  ^R7       K'  	  R# )i   )r   Z
stacklevelN)warningsZwarnr   )r   r   Zmessages   && r   warn_messagesZDeprecatedParams.warn_messages;   s    GMM'MMaH  r
   c                sz   a aa \         P                  ! S4      o\        P                  ! S4      VV V3R  l4       pV# )c                  s   < SP                   ! S.V O5/ VB pSP                  V Uu. uF  pSP                  V,          NK  	  up4       S! V / VB # u upi r   )r   r   r   )r   r   Zinvalid_paramsr   fr   r   s   *,  r   wrapperZ*DeprecatedParams.__call__.<locals>.wrapperD   s\    !..yJ4J6JN.Q.e 4 4.QRd%f%%  Rs   A)inspectr   	functoolsZwraps)r   r   r   r   s   ff @r   __call__ZDeprecatedParams.__call__@   s5    %%a(				& 
	&
 r
   )r   r   N)r   )Z__name__Z
__module__Z__qualname__Z__firstlineno____doc__ZDeprecationWarningr	   r   r   r   r   Z__static_attributes__Z__classdictcell__)Z__classdict__s   @r   r    r    !   s2     
 &(2D 5
#D
I

 
r
   r    )
r   r   r   r   Zinspect2r   ZImportErrorZobjectr    Zdeprecated_params) r
   r   <module>r      sG   (   
)v )\ % e  s   # 11