
    ho                       S r SSKJr  / SQrSSKrSSKrSSKJr  SSKJ	r	  SSK
Jr  SSKJrJrJrJrJrJr  SS	KJqJr  SS
KJrJr  SSKJr  \" S5      r\" S5      rSrS rS\l        S\l         S\l!        S r"S+S jr#S,S jr$S,S jr%S r& S+     S-S jjr' S+     S-S jjr(S r)S r* " S S5      r+ " S S5      r, " S S 5      r-S! r.S" r/S# r0S$ r1S% r2S& r3\" S'\S(\4   S)9r4 S+       S.S* jjr5g)/a  
Deprecation framework for Twisted.

To mark a method, function, or class as being deprecated do this::

    from incremental import Version
    from twisted.python.deprecate import deprecated

    @deprecated(Version("Twisted", 22, 10, 0))
    def badAPI(self, first, second):
        '''
        Docstring for badAPI.
        '''
        ...

    @deprecated(Version("Twisted", 22, 10, 0))
    class BadClass:
        '''
        Docstring for BadClass.
        '''

The newly-decorated badAPI will issue a warning when called, and BadClass will
issue a warning when instantiated. Both will also have  a deprecation notice
appended to their docstring.

To deprecate properties you can use::

    from incremental import Version
    from twisted.python.deprecate import deprecatedProperty

    class OtherwiseUndeprecatedClass:

        @deprecatedProperty(Version("Twisted", 22, 10, 0))
        def badProperty(self):
            '''
            Docstring for badProperty.
            '''

        @badProperty.setter
        def badProperty(self, value):
            '''
            Setter sill also raise the deprecation warning.
            '''


While it's best to avoid this as it adds performance overhead to *any* usage of
the module, to mark module-level attributes as being deprecated you can use::

    badAttribute = "someValue"

    ...

    deprecatedModuleAttribute(
        Version("Twisted", 22, 10, 0),
        "Use goodAttribute instead.",
        "your.full.module.name",
        "badAttribute")

The deprecated attributes will issue a warning whenever they are accessed. If
the attributes being deprecated are in the same module as the
L{deprecatedModuleAttribute} call is being made from, the C{__name__} global
can be used as the C{moduleName} parameter.


To mark an optional, keyword parameter of a function or method as deprecated
without deprecating the function itself, you can use::

    @deprecatedKeywordParameter(Version("Twisted", 22, 10, 0), "baz")
    def someFunction(foo, bar=0, baz=None):
        ...

See also L{incremental.Version}.

@type DEPRECATION_WARNING_FORMAT: C{str}
@var DEPRECATION_WARNING_FORMAT: The default deprecation warning string format
    to use when one is not provided by the user.
    )annotations)
deprecateddeprecatedPropertygetDeprecationWarningStringgetWarningMethodsetWarningMethoddeprecatedModuleAttributedeprecatedKeywordParameterN)findlinestartswraps)
ModuleType)AnyCallableDictOptionalTypeVarcast)warnwarn_explicit)VersiongetVersionString)	ParamSpec_P_Rz&%(fqpn)s was deprecated in %(version)sc                V    U R                   n[        R                  " U 5      (       d  [        R
                  " U 5      (       a  U R                  nU SU 3$ [        R                  " U 5      (       a  U R                   SU R                    3$ U$ ! [         a    U R                  n Nf = f)z
Return the fully qualified name of a module, class, method or function.
Classes and functions need to be module level ones to be correctly
qualified.

@rtype: C{str}.
.)__qualname__AttributeError__name__inspectisclass
isfunction
__module__ismethod)objname
moduleNames      _/root/1688_scrapy/alibaba-scraper/venv/lib/python3.13/site-packages/twisted/python/deprecate.py_fullyQualifiedNamer*   t   s     sw11#66^^
Qtf%%			#		..!3#3#3"455K  ||s   B B('B(ztwisted.python.reflectfullyQualifiedNamec                D    [        U 5      (       a  [        U 5      n SU  S3$ )z
Surround a replacement for a deprecated API with some polite text exhorting
the user to consider it as an alternative.

@type replacement: C{str} or callable

@return: a string like "please use twisted.python.modules.getModule
    instead".
zplease use z instead)callabler*   replacements    r)   _getReplacementStringr0      s(     )+6X..    c                V    S[        U 5       3nU(       a  U S[        U5       3nUS-   $ )ax  
Generate an addition to a deprecated object's docstring that explains its
deprecation.

@param version: the version it was deprecated.
@type version: L{incremental.Version}

@param replacement: The replacement, if specified.
@type replacement: C{str} or callable

@return: a string like "Deprecated in Twisted 27.2.0; please use
    twisted.timestream.tachyon.flux instead."
zDeprecated in ; r   )r   r0   )versionr/   docs      r)   _getDeprecationDocstringr6      s;     +G45
6CR-k:;<9r1   c                |    Uc  [         nX [        U5      S.-  nU(       a  SR                  U[        U5      5      nU$ )a  
Return a string indicating that the Python name was deprecated in the given
version.

@param fqpn: Fully qualified Python name of the thing being deprecated
@type fqpn: C{str}

@param version: Version that C{fqpn} was deprecated in.
@type version: L{incremental.Version}

@param format: A user-provided format to interpolate warning values into, or
    L{DEPRECATION_WARNING_FORMAT
    <twisted.python.deprecate.DEPRECATION_WARNING_FORMAT>} if L{None} is
    given.
@type format: C{str}

@param replacement: what should be used in place of C{fqpn}. Either pass in
    a string, which will be inserted into the warning message, or a
    callable, which will be expanded to its full import path.
@type replacement: C{str} or callable

@return: A textual description of the deprecation
@rtype: C{str}
)fqpnr4   z{}; {})DEPRECATION_WARNING_FORMATr   formatr0   )r8   r4   r:   r/   warningStrings        r)   _getDeprecationWarningStringr<      sE    2 ~+7G7PQQM 0=
 r1   c                .    [        [        U 5      XU5      $ )a#  
Return a string indicating that the callable was deprecated in the given
version.

@type callableThing: C{callable}
@param callableThing: Callable object to be deprecated

@type version: L{incremental.Version}
@param version: Version that C{callableThing} was deprecated in.

@type format: C{str}
@param format: A user-provided format to interpolate warning values into,
    or L{DEPRECATION_WARNING_FORMAT
    <twisted.python.deprecate.DEPRECATION_WARNING_FORMAT>} if L{None} is
    given

@param replacement: what should be used in place of the callable. Either
    pass in a string, which will be inserted into the warning message,
    or a callable, which will be expanded to its full import path.
@type replacement: C{str} or callable

@return: A string describing the deprecation.
@rtype: C{str}
)r<   r*   )callableThingr4   r:   r/   s       r)   r   r      s    2 (M*G[ r1   c                   U R                   (       a  U R                   R                  5       nO/ n[        U5      S:X  a  UR                  U5        O[        U5      S:X  a  UR	                  SUS/5        ObUS   nSnUR                  5       (       d  UR                  5       nUR	                  SXA-   U/5        U Vs/ s H  oUR                  S5      PM     nnSR                  U5      U l         gs  snf )a^  
Append the given text to the docstring of C{thingWithDoc}.

If C{thingWithDoc} has no docstring, then the text just replaces the
docstring. If it has a single-line docstring then it appends a blank line
and the message text. If it has a multi-line docstring, then in appends a
blank line a the message text, and also does the indentation correctly.
r        
N)	__doc__
splitlineslenappendextendstrippoplstripjoin)thingWithDoctextToAppenddocstringLinestrailerspacesls         r)   _appendToDocstringrT      s     %--88:
>al+	^		!r<45 $}}#'')Fr6#8&AB1?@A((3-@99^4L As   :C-c                   ^ ^ SUU 4S jjnU$ )ag  
Return a decorator that marks callables as deprecated. To deprecate a
property, see L{deprecatedProperty}.

@type version: L{incremental.Version}
@param version: The version in which the callable will be marked as
    having been deprecated.  The decorated function will be annotated
    with this version, having it set as its C{deprecatedVersion}
    attribute.

@param replacement: what should be used in place of the callable. Either
    pass in a string, which will be inserted into the warning message,
    or a callable, which will be expanded to its full import path.
@type replacement: C{str} or callable
c                   >^ ^ [        T TST5      m[        T 5      SU U4S jj5       n[        U[        TT5      5        TUl        U$ )z1
Decorator that marks C{function} as deprecated.
Nc                 2   > [        T[        SS9  T" U 0 UD6$ N   
stacklevelr   DeprecationWarningargskwargsfunctionr;   s     r)   deprecatedFunctionDdeprecated.<locals>.deprecationDecorator.<locals>.deprecatedFunction+        2qAT,V,,r1   )r_   z_P.argsr`   z	_P.kwargsreturnr   )r   r   rT   r6   deprecatedVersion)ra   rb   r;   r/   r4   s   ` @r)   deprecationDecorator(deprecated.<locals>.deprecationDecorator#  sX     4gt[
 
x	- 
	- 	 8+ N	
 07,!!r1   )ra   Callable[_P, _R]re   ri    )r4   r/   rg   s   `` r)   r   r     s    &" "&  r1   c                :   ^ ^^  " S S[         5      mUUU 4S jnU$ )a  
Return a decorator that marks a property as deprecated. To deprecate a
regular callable or class, see L{deprecated}.

@type version: L{incremental.Version}
@param version: The version in which the callable will be marked as
    having been deprecated.  The decorated function will be annotated
    with this version, having it set as its C{deprecatedVersion}
    attribute.

@param replacement: what should be used in place of the callable.
    Either pass in a string, which will be inserted into the warning
    message, or a callable, which will be expanded to its full import
    path.
@type replacement: C{str} or callable

@return: A new property with deprecated setter and getter.
@rtype: C{property}

@since: 16.1.0
c                  $    \ rS rSrSrS rS rSrg)/deprecatedProperty.<locals>._DeprecatedPropertyiR  zA
Extension of the build-in property to allow deprecated setters.
c                4   ^ ^ [        T5      UU 4S j5       nU$ )Nc                 F   > [        TR                  [        SS9  T" U 0 UD6$ rX   )r   r;   r]   )r_   r`   ra   selfs     r)   rb   ^deprecatedProperty.<locals>._DeprecatedProperty._deprecatedWrapper.<locals>.deprecatedFunctionX  s,    &&& 
  000r1   r   )rp   ra   rb   s   `` r)   _deprecatedWrapperBdeprecatedProperty.<locals>._DeprecatedProperty._deprecatedWrapperW  s!    8_1 1 &%r1   c                J    [         R                  X R                  U5      5      $ N)propertysetterrr   )rp   ra   s     r)   rw   6deprecatedProperty.<locals>._DeprecatedProperty.setterc  s    ??4)@)@)JKKr1   rj   N)r    r$   r   __firstlineno__rE   rr   rw   __static_attributes__rj   r1   r)   _DeprecatedPropertyrm   R  s    	
	&	Lr1   r{   c                   >^ ^ [        T TS T5      m[        T 5      U U4S j5       n[        U[        TT5      5        TUl        T" U5      nTUl        U$ )Nc                 2   > [        T[        SS9  T" U 0 UD6$ rX   r\   r^   s     r)   rb   LdeprecatedProperty.<locals>.deprecationDecorator.<locals>.deprecatedFunctionk  rd   r1   )r   r   rT   r6   rf   r;   )ra   rb   resultr;   r{   r/   r4   s   `  @r)   rg   0deprecatedProperty.<locals>.deprecationDecoratorf  sh    3gt[
 
x	- 
	- 	 8+ N	
 07,$%78,r1   )rv   )r4   r/   rg   r{   s   `` @r)   r   r   9  s    2Lh L(&  r1   c                     [         $ )zJ
Return the warning method currently used to record deprecation warnings.
r   rj   r1   r)   r   r   |  s	     Kr1   c                    U q g)z
Set the warning method to use to record deprecation warnings.

The callable should take message, category and stacklevel. The return
value is ignored.
Nr   )	newMethods    r)   r   r     s	     Dr1   c                  *    \ rS rSrSrS rS rS rSrg)_InternalStatei  z
An L{_InternalState} is a helper object for a L{_ModuleProxy}, so that it
can easily access its own attributes, bypassing its logic for delegating to
another object that it's proxying for.

@ivar proxy: a L{_ModuleProxy}
c                2    [         R                  U SU5        g Nproxy)object__setattr__)rp   r   s     r)   __init___InternalState.__init__  s    4%0r1   c                V    [         R                  [         R                  U S5      U5      $ r   )r   __getattribute__)rp   r'   s     r)   r   _InternalState.__getattribute__  s"    &&v'>'>tW'MtTTr1   c                V    [         R                  [         R                  U S5      X5      $ r   )r   r   r   )rp   r'   values      r)   r   _InternalState.__setattr__  s"    !!&"9"9$"H$VVr1   rj   N)	r    r$   r   ry   rE   r   r   r   rz   rj   r1   r)   r   r     s    1UWr1   r   c                  4    \ rS rSrSrS rS	S jrS rS rSr	g)
_ModuleProxyi  aX  
Python module wrapper to hook module-level attribute access.

Access to deprecated attributes first checks
L{_ModuleProxy._deprecatedAttributes}, if the attribute does not appear
there then access falls through to L{_ModuleProxy._module}, the wrapped
module object.

@ivar _module: Module on which to hook attribute access.
@type _module: C{module}

@ivar _deprecatedAttributes: Mapping of attribute names to objects that
    retrieve the module attribute's original value.
@type _deprecatedAttributes: C{dict} mapping C{str} to
    L{_DeprecatedAttribute}

@ivar _lastWasPath: Heuristic guess as to whether warnings about this
    package should be ignored for the next call.  If the last attribute
    access of this module was a C{getattr} of C{__path__}, we will assume
    that it was the import system doing it and we won't emit a warning for
    the next access, even if it is to a deprecated attribute.  The CPython
    import system always tries to access C{__path__}, then the attribute
    itself, then the attribute itself again, in both successful and failed
    cases.
@type _lastWasPath: C{bool}
c                B    [        U 5      nXl        0 Ul        SUl        g )NF)r   _module_deprecatedAttributes_lastWasPath)rp   modulestates      r)   r   _ModuleProxy.__init__  s!    t$&(#"r1   c                f    [        U 5      nS[        U 5      R                   SUR                  < S3$ )zi
Get a string containing the type of the module proxy and a
representation of the wrapped module object.
<z module=>)r   typer    r   )rp   r   s     r)   __repr___ModuleProxy.__repr__  s3    
 t$4:&&'x/@BBr1   c                T    [        U 5      nSUl        [        UR                  X5        g)z0
Set an attribute on the wrapped module object.
FN)r   r   setattrr   )rp   r'   r   r   s       r)   r   _ModuleProxy.__setattr__  s$     t$"t+r1   c                    [        U 5      nUR                  (       a  SnOUR                  R                  U5      nUb  UR                  5       nO[	        UR
                  U5      nUS:X  a	  SUl        U$ SUl        U$ )a  
Get an attribute from the module object, possibly emitting a warning.

If the specified name has been deprecated, then a warning is issued.
(Unless certain obscure conditions are met; see
L{_ModuleProxy._lastWasPath} for more information about what might quash
such a warning.)
N__path__TF)r   r   r   getgetattrr   )rp   r'   r   deprecatedAttributer   s        r)   r   _ModuleProxy.__getattribute__  s     t$"&"'"="="A"A$"G* (++-E EMM40E:!%E  "'Er1   rj   N)re   str)
r    r$   r   ry   rE   r   r   r   r   rz   rj   r1   r)   r   r     s    6#C,r1   r   c                  $    \ rS rSrSrS rS rSrg)_DeprecatedAttributei  a  
Wrapper for deprecated attributes.

This is intended to be used by L{_ModuleProxy}. Calling
L{_DeprecatedAttribute.get} will issue a warning and retrieve the
underlying attribute's value.

@type module: C{module}
@ivar module: The original module instance containing this attribute

@type fqpn: C{str}
@ivar fqpn: Fully qualified Python name for the deprecated attribute

@type version: L{incremental.Version}
@ivar version: Version that the attribute was deprecated in

@type message: C{str}
@ivar message: Deprecation message
c                b    Xl         X l        UR                  S-   U-   U l        X0l        X@l        g)z'
Initialise a deprecated name wrapper.
r   N)r   r    r8   r4   message)rp   r   r'   r4   r   s        r)   r   _DeprecatedAttribute.__init__  s-     OOc)D0	r1   c                    [        U R                  U R                  5      n[        U R                  U R
                  [        S-   U R                  -   5      n[        U[        SS9  U$ )zE
Get the underlying attribute value and issue a deprecation warning.
z:    rZ   )
r   r   r    r<   r8   r4   r9   r   r   r]   )rp   r   r   s      r)   r   _DeprecatedAttribute.get  sT     dmm4.IIt||%?$%F%U
 	W(Q7r1   )r    r8   r   r   r4   N)r    r$   r   ry   rE   r   r   rz   rj   r1   r)   r   r     s    (r1   r   c                |    [         R                  U S5      n[        XAX#5      n[         R                  U S5      nXVU'   g)al  
Mark a module-level attribute as being deprecated.

@type proxy: L{_ModuleProxy}
@param proxy: The module proxy instance proxying the deprecated attributes

@type name: C{str}
@param name: Attribute name

@type version: L{incremental.Version}
@param version: Version that the attribute was deprecated in

@type message: C{str}
@param message: Deprecation message
r   r   N)r   r   r   )r   r'   r4   r   r   attrr   s          r)   _deprecateAttributer      s@      %%eY7Gw@D #33E;RS"&$r1   c                    [         R                  U   n[        U[        5      (       d,  [	        [
        [        U5      5      nU[         R                  U'   [        XCX5        g)a  
Declare a module-level attribute as being deprecated.

@type version: L{incremental.Version}
@param version: Version that the attribute was deprecated in

@type message: C{str}
@param message: Deprecation message

@type moduleName: C{str}
@param moduleName: Fully-qualified Python name of the module containing
    the deprecated attribute; if called from the same module as the
    attributes are being deprecated in, using the C{__name__} global can
    be helpful

@type name: C{str}
@param name: Attribute name to deprecate
N)sysmodules
isinstancer   r   r   r   )r4   r   r(   r'   r   s        r)   r	   r	   8  sH    & [[$Ffl++j,v"67"(Jg7r1   c                   [         R                  U R                     n[        U[        [
        R                  " U5      [        S [        U R                  5       5       5      UR                  U R                  R                  S0 5      SS9  g)a  
Issue a warning string, identifying C{offender} as the responsible code.

This function is used to deprecate some behavior of a function.  It differs
from L{warnings.warn} in that it is not limited to deprecating the behavior
of a function currently on the call stack.

@param offender: The function that is being deprecated.

@param warningString: The string that should be emitted by this warning.
@type warningString: C{str}

@since: 11.0
c              3  4   #    U  H  u  pUc  M
  Uv   M     g 7fru   rj   ).0_
lineNumbers      r)   	<genexpr>$warnAboutFunction.<locals>.<genexpr>l  s      
!B J!Bs   		__warningregistry__N)categoryfilenamelinenor   registrymodule_globals)r   r   r$   r   r]   r!   
getabsfilemaxr   __code__r    __globals__
setdefault)offenderr;   offenderModules      r)   warnAboutFunctionr   S  sy    ( [[!4!45N###N3 
!/0A0A!B
 

 &&%%001FKr1   c                   0 n[        U R                  5      [        U5      -
  nU R                  b  0 =oSU R                  '   US:  a<  U R                  c  [	        S5      eU[        U R                  5      S X0R                  '   [        U R                  U5       H	  u  pgXsU'   M     UR                  5        HG  u  pgX`R                  ;   a  Xc;   a  [	        S5      eXsU'   M*  U R                  b  UWU'   M>  [	        S5      e   U$ )ax  
Take an I{inspect.ArgSpec}, a tuple of positional arguments, and a dict of
keyword arguments, and return a mapping of arguments that were actually
passed to their passed values.

@param argspec: The argument specification for the function to inspect.
@type argspec: I{inspect.ArgSpec}

@param positional: The positional arguments that were passed.
@type positional: L{tuple}

@param keyword: The keyword arguments that were passed.
@type keyword: L{dict}

@return: A dictionary mapping argument names (those declared in C{argspec})
    to values that were passed explicitly by the user.
@rtype: L{dict} mapping L{str} to L{object}
Nr   Too many arguments.Already passed.no such param)rG   r_   keywordsvarargs	TypeErrorzipitems)argspec
positionalkeywordr   unpassedr`   r'   r   s           r)   _passedArgSpecr   w  s    & !#F7<< 3z?2H#,..(()!|??"122&0W\\1B1D&EF??#7<<4t 5}}<<~ 122 4L) F4LO,, ' Mr1   c                "   0 nSnSn[        U R                  R                  5       5       GHh  u  nu  pxUR                  [        R
                  R                  :X  a  XS X7'   [        X7   5      S-   nMI  UR                  [        R
                  R                  :X  a  0 =oCU'   My  UR                  [        R
                  R                  [        R
                  R                  4;   a  U[        U5      :  a  X   X7'   US-  nM  M  UR                  [        R
                  R                  :X  aO  Xr;  aG  UR                  [        R
                  R                  :X  a  [        SU 35      eUR                  X7'   GMM  GMP  [        SU SUR                   35      e   [        U5      U:  a  [        S5      eUR                  5        HJ  u  pyXpR                  R                  5       ;   a  Xs;   a  [        S5      eXU'   M8  Ub  XU'   MA  [        S	5      e   U$ )
at  
Take an L{inspect.Signature}, a tuple of positional arguments, and a dict of
keyword arguments, and return a mapping of arguments that were actually
passed to their passed values.

@param signature: The signature of the function to inspect.
@type signature: L{inspect.Signature}

@param positional: The positional arguments that were passed.
@type positional: L{tuple}

@param keyword: The keyword arguments that were passed.
@type keyword: L{dict}

@return: A dictionary mapping argument names (those declared in
    C{signature}) to values that were passed explicitly by the user.
@rtype: L{dict} mapping L{str} to L{object}
Nr   r@   zmissing keyword arg 'z' parameter is invalid kind: r   r   r   )	enumerate
parametersr   kindr!   	ParameterVAR_POSITIONALrG   VAR_KEYWORDPOSITIONAL_OR_KEYWORDPOSITIONAL_ONLYKEYWORD_ONLYdefaultemptyr   keys)
	signaturer   r   r   r`   numPositionalnr'   paramr   s
             r)   _passedSignaturer     s   & FFM%i&:&:&@&@&BC=D::**999%b>FL-1MZZ7,,888$&&FD\ZZ33--
 
 3z?")}" # ZZ7,,999"==G$5$5$;$;;#&:4&$ABB#(==FL	 # av%B5::,OPP- D0 :&-..}}'',,..~ 122 4L 4LO,, ' Mr1   c                   ^  U 4S jnU$ )ak  
Decorator which causes its decoratee to raise a L{TypeError} if two of the
given arguments are passed at the same time.

@param argumentPairs: pairs of argument identifiers, each pair indicating
    an argument that may not be passed in conjunction with another.
@type argumentPairs: sequence of 2-sequences of L{str}

@return: A decorator, used like so::

        @_mutuallyExclusiveArguments([["tweedledum", "tweedledee"]])
        def function(tweedledum=1, tweedledee=2):
            "Don't pass tweedledum and tweedledee at the same time."

@rtype: 1-argument callable taking a callable and returning a callable.
c                t   >^ ^^ [         R                  " T 5      m[        m[        T 5      UUUU 4S j5       nU$ )Nc                    > T" TX5      nT H2  u  p4X2;   d  M  XB;   d  M  [        SU< SU< S[        T5      < S35      e   T" U 0 UD6$ )NThe z and z arguments to z are mutually exclusive.)r   r*   )	r_   r`   	argumentsthisthat_passedargumentPairsspecwrappees	        r)   wrapped=_mutuallyExclusiveArguments.<locals>.wrapper.<locals>.wrapped  sX    d3I+
$):#':7'CE  , D+F++r1   )r!   r   r   r   )r   r   r   r   r   s   ` @@r)   wrapper,_mutuallyExclusiveArguments.<locals>.wrapper  s5      )"	w	, 
	, r1   rj   )r   r   s   ` r)   _mutuallyExclusiveArgumentsr    s    $" Nr1   _Tc.)boundc                    ^ ^^ SUUU 4S jjnU$ )a?  
Return a decorator that marks a keyword parameter of a callable
as deprecated. A warning will be emitted if a caller supplies
a value for the parameter, whether the caller uses a keyword or
positional syntax.

@type version: L{incremental.Version}
@param version: The version in which the parameter will be marked as
    having been deprecated.

@type name: L{str}
@param name: The name of the deprecated parameter.

@type replacement: L{str}
@param replacement: Optional text indicating what should be used in
    place of the deprecated parameter.

@since: Twisted 21.2.0
c                  >^ ^^ [        ST< S[        T 5       3T	TS9mSR                  T[        T	5      5      nT(       a  US-   [	        T5      -   nUS-  n[
        R                  " T 5      R                  nTU;   aO  UT   R                  [
        R                  R                  :X  a$  [        U5      R                  T5      mUUUU 4S jnOUUU 4S jn[        [        [        T 5      " U5      5      n[!        XA5        U$ )	Nr   z parameter to r.   z'The {!r} parameter was deprecated in {}r3   r   c                 \   > [        U 5      T:  d  TU;   a  [        T[        SS9  T" U 0 UD6$ rX   )rG   r   r]   )r_   r`   r'   parameterIndexr;   r   s     r)   checkDeprecatedParameterMdeprecatedKeywordParameter.<locals>.wrapper.<locals>.checkDeprecatedParameter3  s2    t9~-(:qI///r1   c                 >   > TU;   a  [        T[        SS9  T" U 0 UD6$ rX   r\   )r_   r`   r'   r;   r   s     r)   r  r	  :  s'    6>(:qI///r1   )r<   r*   r:   r   r0   r!   r   r   r   r   r   listindexr   r  r   rT   )
r   r5   paramsr  	decoratedr  r;   r'   r/   r4   s
   `    @@r)   r   +deprecatedKeywordParameter.<locals>.wrapper  s    44(.)<W)E(FG#
 8>>W%
 *4[AACs
""7+66FNt!!W%6%6%L%LL!&\//5N0 00
 eGn-EFG	9*r1   )r   r  re   r  rj   )r4   r'   r/   r   s   ``` r)   r
   r
     s    .$ $L Nr1   ru   )NN)r4   r   r/   z"str | Callable[..., object] | Nonere   z.Callable[[Callable[_P, _R]], Callable[_P, _R]])r4   r   r'   r   r/   zOptional[str]re   zCallable[[_Tc], _Tc])6rE   
__future__r   __all__r!   r   disr   	functoolsr   typesr   typingr   r   r   r   r   r   warningsr   r   incrementalr   r   typing_extensionsr   r   r   r9   r*   r$   r    r   r0   r6   r<   r   rT   r   r   r   r   r   r   r   r   r	   r   r   r   r  r  r
   rj   r1   r)   <module>r     sl  
LZ #  
    ? ? ( 1 't_T]E , ":  3  #7   /( F<5< IM& & #E& 3& T IM@ @ #E@ 3@ FW W&M M`, ,^'086!H'T9x#L e8CH-. ?C===.;==r1   