§
    ÈtºfFo  ã                  óê  — d Z ddlmZ g d¢ZddlZddlZddlmZ ddlm	Z	 ddl
mZ ddlmZmZmZmZmZmZ dd	lmamZ dd
lmZmZ ddlmZ  ed¦  «        Z ed¦  «        ZdZd„ Zde_        de_         de_!        d„ Z"d5d„Z#d6d„Z$d6d„Z%d„ Z&	 d5d7d„Z'd5d„Z(d„ Z)d „ Z* G d!„ d"¦  «        Z+ G d#„ d$¦  «        Z, G d%„ d&¦  «        Z-d'„ Z.d(„ Z/d)„ Z0d*„ Z1d+„ Z2d,„ Z3 ed-ed.ef         ¬/¦  «        Z4	 d5d8d4„Z5dS )9aÄ  
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                óü   — 	 | j         }n# t          $ r
 | j        }Y nw xY wt          j        | ¦  «        st          j        | ¦  «        r| j        }|› d|› �S t          j        | ¦  «        r| j        › d| j         › �S |S )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      úW/var/www/surfInsights/venv3-11/lib/python3.11/site-packages/twisted/python/deprecate.pyÚ_fullyQualifiedNamer*   t   s©   € ðØÔˆˆøÝð ð ð ØŒ|ˆˆˆðøøøõ „�sÑÔð 6�wÔ1°#Ñ6Ô6ð 6Ø”^ˆ
ØÐ%Ð%˜tÐ%Ð%Ð%Ý	Ô	˜#Ñ	Ô	ð 6Ø”.Ð5Ð5 3Ô#3Ð5Ð5Ð5Ø€Ks   ‚
 Š�ztwisted.python.reflectÚfullyQualifiedNamec                óJ   — t          | ¦  «        rt          | ¦  «        } d| › d�S )a
  
    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   �   s2   € õ �ÑÔð 7Ý)¨+Ñ6Ô6ˆØ.˜Ð.Ð.Ð.Ð.ó    c                ó\   — dt          | ¦  «        › �}|r|› dt          |¦  «        › �}|dz   S )aœ  
    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   ž   sH   € ð 7Õ+¨GÑ4Ô4Ð
6Ð
6€CØð =ØÐ<Ð<Õ-¨kÑ:Ô:Ð<Ð<ˆØ�‰9Ðr1   c                óŒ   — |€t           }|| t          |¦  «        dœz  }|r#d                     |t          |¦  «        ¦  «        }|S )ag  
    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}
    N)Úfqpnr4   z{}; {})ÚDEPRECATION_WARNING_FORMATr   Úformatr0   )r8   r4   r:   r/   ÚwarningStrings        r)   Ú_getDeprecationWarningStringr<   ²   sZ   € ð2 €~Ý+ˆØ dÕ7GÈÑ7PÔ7PÐQÐQÑQ€MØð 
Ø ŸšØÕ0°Ñ=Ô=ñ
ô 
ˆð Ðr1   c                ó@   — t          t          | ¦  «        |||¦  «        S )ak  
    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°V¸[ñô ð r1   c                óÜ  — | j         r| j                              ¦   «         }ng }t          |¦  «        dk    r|                     |¦  «         n…t          |¦  «        dk    r|                     d|dg¦  «         nY|d         }d}|                     ¦   «         s|                     ¦   «         }|                     d||z   |g¦  «         d„ |D ¦   «         }d                     |¦  «        | _         dS )av  
    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   é   Ú éÿÿÿÿc                ó8   — g | ]}|                      d ¦  «        ‘ŒS )ú )Úlstrip)Ú.0Úls     r)   ú
<listcomp>z&_appendToDocstring.<locals>.<listcomp>  s"   € Ð@Ð@Ð@¨A˜!Ÿ(š( 3™-œ-Ð@Ð@Ð@r1   ú
N)Ú__doc__Ú
splitlinesÚlenÚappendÚextendÚstripÚpopÚjoin)ÚthingWithDocÚtextToAppendÚdocstringLinesÚtrailerÚspacess        r)   Ú_appendToDocstringrW   ó   s  € ð Ôð Ø%Ô-×8Ò8Ñ:Ô:ˆˆàˆå
ˆ>ÑÔ˜aÒÐØ×Ò˜lÑ+Ô+Ð+Ð+Ý	ˆ^Ñ	Ô	 Ò	!Ð	!Ø×Ò˜r <°Ð4Ñ5Ô5Ð5Ð5à  Ô$ˆØˆØ�}Š}‰Œð 	*à#×'Ò'Ñ)Ô)ˆFØ×Ò˜r 6¨LÑ#8¸&ÐAÑBÔBÐBØ@Ð@°Ð@Ñ@Ô@ˆØŸ9š9 ^Ñ4Ô4€LÔÐÐr1   r4   r   r/   ú"str | Callable[..., object] | NoneÚreturnú.Callable[[Callable[_P, _R]], Callable[_P, _R]]c                ó   ‡ ‡— dˆˆ fd„}|S )a—  
    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
    ÚfunctionúCallable[_P, _R]rY   c                ó²   •‡ ‡— t          ‰ ‰d‰¦  «        Št          ‰ ¦  «        d	ˆ ˆfd„¦   «         }t          |t          ‰‰¦  «        ¦  «         ‰|_        |S )
zA
        Decorator that marks C{function} as deprecated.
        NÚargsú_P.argsÚkwargsú	_P.kwargsrY   r   c                 óB   •— t          ‰t          d¬¦  «          ‰| i |¤ŽS ©Né   ©Ú
stacklevel©r   ÚDeprecationWarning©r_   ra   r\   r;   s     €€r)   ÚdeprecatedFunctionzDdeprecated.<locals>.deprecationDecorator.<locals>.deprecatedFunction+  ó.   ø€ å�Õ 2¸qÐAÑAÔAÐAØ�8˜TÐ, VÐ,Ð,Ð,r1   )r_   r`   ra   rb   rY   r   )r   r   rW   r6   ÚdeprecatedVersion)r\   rk   r;   r/   r4   s   ` @€€r)   ÚdeprecationDecoratorz(deprecated.<locals>.deprecationDecorator#  s‰   øøø€ õ 4Ø�g˜t [ñ
ô 
ˆõ 
ˆx‰Œð	-ð 	-ð 	-ð 	-ð 	-ð 	-ñ 
Œð	-õ 	ØÕ 8¸À+Ñ NÔ Nñ	
ô 	
ð 	
ð 07ÐÔ,Ø!Ð!r1   )r\   r]   rY   r]   © )r4   r/   rn   s   `` r)   r   r     s/   øø€ ð&"ð "ð "ð "ð "ð "ð "ð&  Ðr1   c                ó@   ‡ ‡‡—  G d„ dt           ¦  «        Šˆˆˆ fd„}|S )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                  ó   — e Zd ZdZd„ Zd„ ZdS )ú/deprecatedProperty.<locals>._DeprecatedPropertyzQ
        Extension of the build-in property to allow deprecated setters.
        c                ó@   ‡ ‡— t          ‰¦  «        ˆˆ fd„¦   «         }|S )Nc                 óL   •— t          ‰j        t          d¬¦  «          ‰| i |¤ŽS rd   )r   r;   ri   )r_   ra   r\   Úselfs     €€r)   rk   z^deprecatedProperty.<locals>._DeprecatedProperty._deprecatedWrapper.<locals>.deprecatedFunctionV  s=   ø€ åØÔ&Ý&Ø ðñ ô ð ð
  �x Ð0¨Ð0Ð0Ð0r1   r   )ru   r\   rk   s   `` r)   Ú_deprecatedWrapperzBdeprecatedProperty.<locals>._DeprecatedProperty._deprecatedWrapperU  s:   øø€ Ý�8‰_Œ_ð1ð 1ð 1ð 1ð 1ñ Œ_ð1ð &Ð%r1   c                ó^   — t                                | |                      |¦  «        ¦  «        S ©N)ÚpropertyÚsetterrv   )ru   r\   s     r)   rz   z6deprecatedProperty.<locals>._DeprecatedProperty.settera  s$   € Ý—?’? 4¨×)@Ò)@ÀÑ)JÔ)JÑKÔKÐKr1   N)r    r$   r   rJ   rv   rz   ro   r1   r)   Ú_DeprecatedPropertyrr   P  sA   € € € € € ð	ð 	ð
	&ð 
	&ð 
	&ð	Lð 	Lð 	Lð 	Lð 	Lr1   r{   c                óÔ   •‡ ‡— t          ‰ ‰d ‰¦  «        Št          ‰ ¦  «        ˆ ˆfd„¦   «         }t          |t          ‰‰¦  «        ¦  «         ‰|_         ‰|¦  «        }‰|_        |S )Nc                 óB   •— t          ‰t          d¬¦  «          ‰| i |¤ŽS rd   rh   rj   s     €€r)   rk   zLdeprecatedProperty.<locals>.deprecationDecorator.<locals>.deprecatedFunctioni  rl   r1   )r   r   rW   r6   rm   r;   )r\   rk   Úresultr;   r{   r/   r4   s   `  @€€€r)   rn   z0deprecatedProperty.<locals>.deprecationDecoratord  sš   øøø€ Ý3Ø�g˜t [ñ
ô 
ˆõ 
ˆx‰Œð	-ð 	-ð 	-ð 	-ð 	-ñ 
Œð	-õ 	ØÕ 8¸À+Ñ NÔ Nñ	
ô 	
ð 	
ð 07ÐÔ,à$Ð$Ð%7Ñ8Ô8ˆØ,ˆÔØˆr1   )ry   )r4   r/   rn   r{   s   `` @r)   r   r   9  sb   øøø€ ð.Lð Lð Lð Lð L�hñ Lô Lð Lð(ð ð ð ð ð ð ð&  Ðr1   c                 ó   — t           S )zR
    Return the warning method currently used to record deprecation warnings.
    ©r   ro   r1   r)   r   r   z  s	   € õ €Kr1   c                ó
   — | a dS )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   € ð €D€D€Dr1   c                  ó$   — e Zd ZdZd„ Zd„ Zd„ ZdS )Ú_InternalStatezò
    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                ó>   — t                                | d|¦  «         d S ©NÚproxy)ÚobjectÚ__setattr__)ru   r‡   s     r)   Ú__init__z_InternalState.__init__•  s    € Ý×Ò˜4 ¨%Ñ0Ô0Ð0Ð0Ð0r1   c                ój   — t                                t                                | d¦  «        |¦  «        S r†   )rˆ   Ú__getattribute__)ru   r'   s     r)   rŒ   z_InternalState.__getattribute__˜  s(   € Ý×&Ò&¥v×'>Ò'>¸tÀWÑ'MÔ'MÈtÑTÔTÐTr1   c                ól   — t                                t                                | d¦  «        ||¦  «        S r†   )rˆ   r‰   rŒ   )ru   r'   Úvalues      r)   r‰   z_InternalState.__setattr__›  s+   € Ý×!Ò!¥&×"9Ò"9¸$ÀÑ"HÔ"HÈ$ÐPUÑVÔVÐVr1   N)r    r$   r   rJ   rŠ   rŒ   r‰   ro   r1   r)   r„   r„   Œ  sS   € € € € € ðð ð1ð 1ð 1ðUð Uð UðWð Wð Wð Wð Wr1   r„   c                  ó,   — e Zd ZdZd„ Zd	d„Zd„ Zd„ ZdS )
Ú_ModuleProxya¬  
    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                óN   — t          | ¦  «        }||_        i |_        d|_        d S )NF)r„   Ú_moduleÚ_deprecatedAttributesÚ_lastWasPath)ru   ÚmoduleÚstates      r)   rŠ   z_ModuleProxy.__init__»  s,   € Ý˜tÑ$Ô$ˆØˆŒØ&(ˆÔ#Ø"ˆÔÐÐr1   rY   Ústrc                ó`   — t          | ¦  «        }dt          | ¦  «        j        › d|j        ›d�S )z�
        Get a string containing the type of the module proxy and a
        representation of the wrapped module object.
        ú<z module=ú>)r„   Útyper    r’   )ru   r–   s     r)   Ú__repr__z_ModuleProxy.__repr__Á  s5   € õ
 ˜tÑ$Ô$ˆØB•4˜‘:”:Ô&ÐBÐB°´ÐBÐBÐBÐBr1   c                ó^   — t          | ¦  «        }d|_        t          |j        ||¦  «         dS )z@
        Set an attribute on the wrapped module object.
        FN)r„   r”   Úsetattrr’   )ru   r'   rŽ   r–   s       r)   r‰   z_ModuleProxy.__setattr__É  s3   € õ ˜tÑ$Ô$ˆØ"ˆÔÝ�”˜t UÑ+Ô+Ð+Ð+Ð+r1   c                óî   — t          | ¦  «        }|j        rd}n|j                             |¦  «        }|�|                     ¦   «         }nt	          |j        |¦  «        }|dk    rd|_        nd|_        |S )aG  
        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’   )ru   r'   r–   ÚdeprecatedAttributerŽ   s        r)   rŒ   z_ModuleProxy.__getattribute__Ñ  sŽ   € õ ˜tÑ$Ô$ˆØÔð 	HØ"&ÐÐà"'Ô"=×"AÒ"AÀ$Ñ"GÔ"GÐàÐ*ð (×+Ò+Ñ-Ô-ˆEˆEõ ˜EœM¨4Ñ0Ô0ˆEØ�:ÒÐØ!%ˆEÔÐà!&ˆEÔØˆr1   N)rY   r—   )r    r$   r   rJ   rŠ   rœ   r‰   rŒ   ro   r1   r)   r�   r�   Ÿ  sc   € € € € € ðð ð6#ð #ð #ðCð Cð Cð Cð,ð ,ð ,ðð ð ð ð r1   r�   c                  ó   — e Zd ZdZd„ Zd„ ZdS )Ú_DeprecatedAttributeaE  
    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   — || _         || _        |j        dz   |z   | _        || _        || _        dS )z7
        Initialise a deprecated name wrapper.
        r   N)r•   r    r8   r4   Úmessage)ru   r•   r'   r4   r§   s        r)   rŠ   z_DeprecatedAttribute.__init__  s7   € ð ˆŒØˆŒØ”O cÑ)¨DÑ0ˆŒ	ØˆŒØˆŒˆˆr1   c                ó¾   — t          | j        | j        ¦  «        }t          | j        | j        t          dz   | j        z   ¦  «        }t          |t          d¬¦  «         |S )zU
        Get the underlying attribute value and issue a deprecation warning.
        z: é   rf   )
r¢   r•   r    r<   r8   r4   r9   r§   r   ri   )ru   r~   r§   s      r)   r¡   z_DeprecatedAttribute.get  s[   € õ ˜œ d¤mÑ4Ô4ˆÝ.ØŒI�t”|Õ%?À$Ñ%FÈÌÑ%Uñ
ô 
ˆõ 	ˆWÕ(°QÐ7Ñ7Ô7Ð7Øˆr1   N)r    r$   r   rJ   rŠ   r¡   ro   r1   r)   r¥   r¥   ï  s<   € € € € € ðð ð(ð ð ðð ð ð ð r1   r¥   c                ó    — t                                | d¦  «        }t          ||||¦  «        }t                                | d¦  «        }|||<   dS )a”  
    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¬     sV   € õ  ×%Ò% e¨YÑ7Ô7€GÝ ¨¨w¸Ñ@Ô@€Dõ #×3Ò3°EÐ;RÑSÔSÐØ"&Ð˜$ÑÐÐr1   c                óÚ   — t           j        |         }t          |t          ¦  «        s1t	          t
          t          |¦  «        ¦  «        }|t           j        |<   t          ||| |¦  «         dS )aE  
    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	   6  s_   € õ& Œ[˜Ô$€FÝ�f�lÑ+Ô+ð )Ý•j¥,¨vÑ"6Ô"6Ñ7Ô7ˆØ"(�Œ�JÑå˜  g¨wÑ7Ô7Ð7Ð7Ð7r1   c                ó  — t           j        | j                 }t          |t          t          j        |¦  «        t          d„ t          | j	        ¦  «        D ¦   «         ¦  «        |j
        | j                             di ¦  «        d¬¦  «         dS )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  ó$   K  — | ]\  }}|®|V — Œd S rx   ro   )rF   Ú_Ú
lineNumbers      r)   ú	<genexpr>z$warnAboutFunction.<locals>.<genexpr>j  s8   è è € ð 
ð 
á��:ØÐ%ð à%Ð%Ð%Ð%ð
ð 
r1   Ú__warningregistry__N)ÚcategoryÚfilenameÚlinenor•   ÚregistryÚmodule_globals)r®   r¯   r$   r   ri   r!   Ú
getabsfileÚmaxr   Ú__code__r    Ú__globals__Ú
setdefault)Úoffenderr;   ÚoffenderModules      r)   ÚwarnAboutFunctionrÃ   Q  sž   € õ( ”[ Ô!4Ô5€NÝØÝ#ÝÔ# NÑ3Ô3Ýð 
ð 
å!/°Ô0AÑ!BÔ!Bð
ñ 
ô 
ñ 
ô 
ð
 Ô&ØÔ%×0Ò0Ð1FÈÑKÔKØðñ ô ð ð ð r1   c                óæ  — i }t          | j        ¦  «        t          |¦  «        z
  }| j        �i x}|| j        <   |dk     r:| j        €t	          d¦  «        ‚|t          | j        ¦  «        d…         || j        <   t          | j        |¦  «        D ]
\  }}|||<   Œ|                     ¦   «         D ]B\  }}|| j        v r||v rt	          d¦  «        ‚|||<   Œ'| j        �|||<   Œ4t	          d¦  «        ‚|S )a¬  
    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)rL   r_   ÚkeywordsÚvarargsÚ	TypeErrorÚzipÚitems)ÚargspecÚ
positionalÚkeywordr~   Úunpassedra   r'   rŽ   s           r)   Ú_passedArgSpecrÑ   u  s  € ð& !#€FÝ�7”<Ñ Ô ¥3 z¡?¤?Ñ2€HØÔÐ#Ø,.Ð.ˆ�˜Ô(Ñ)Ø�!‚|€|ØŒ?Ð"ÝÐ1Ñ2Ô2Ð2à&0µ°W´\Ñ1BÔ1BÐ1DÐ1DÔ&EˆF�7”?Ñ#Ý˜7œ<¨Ñ4Ô4ð ð ‰ˆˆeØˆˆt‰ˆØ—}’}‘”ð -ð -‰ˆˆeØ�7”<ÐÐØ�vˆ~ˆ~ÝÐ 1Ñ2Ô2Ð2Ø ˆF�4‰LˆLØÔÐ)Ø ˆF�4‰LˆLå˜OÑ,Ô,Ð,Ø€Mr1   c                óº  — i }d}d}t          | j                             ¦   «         ¦  «        D �]&\  }\  }}|j        t          j        j        k    r&||d…         ||<   t          ||         ¦  «        dz   }ŒI|j        t          j        j        k    ri x}||<   Œk|j        t          j        j	        t          j        j
        fv r$|t          |¦  «        k     r||         ||<   |dz  }Œ¸|j        t          j        j        k    r<||vr6|j        t          j        j        k    rt          d|› �¦  «        ‚|j        ||<   �Œt          d|› d|j        › �¦  «        ‚t          |¦  «        |k    rt          d¦  «        ‚|                     ¦   «         D ]O\  }}	|| j                             ¦   «         v r||v rt          d¦  «        ‚|	||<   Œ9|�|	||<   ŒAt          d	¦  «        ‚|S )
a¨  
    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_POSITIONALrL   ÚVAR_KEYWORDÚPOSITIONAL_OR_KEYWORDÚPOSITIONAL_ONLYÚKEYWORD_ONLYÚdefaultÚemptyrÊ   Úkeys)
Ú	signaturerÎ   rÏ   r~   ra   ÚnumPositionalÚnr'   ÚparamrŽ   s
             r)   Ú_passedSignaturerä   Ÿ  s  € ð& €FØ€FØ€MÝ% iÔ&:×&@Ò&@Ñ&BÔ&BÑCÔCð Qñ QÑˆ‰=ˆD�%ØŒ:�Ô*Ô9Ò9Ð9à% a b bœ>ˆF�4‰LÝ  t¤Ñ-Ô-°Ñ1ˆMˆMØŒZ�7Ô,Ô8Ò8Ð8à$&Ð&ˆF�V˜D‘\�\ØŒZÝÔÔ3ÝÔÔ-ð
ð 
ð 
ð •3�z‘?”?Ò"Ð"Ø)¨!œ}��t‘Ø Ñ"�øØŒZ�7Ô,Ô9Ò9Ð9Ø˜7Ð"Ð"Ø”=¥GÔ$5Ô$;Ò;Ð;Ý#Ð$A¸4Ð$AÐ$AÑBÔBÐBà#(¤=�F˜4‘LùåÐO ÐOÐOÀ5Ä:ÐOÐOÑPÔPÐPå
ˆ:�„˜Ò&Ð&ÝÐ-Ñ.Ô.Ð.Ø—}’}‘”ð -ð -‰ˆˆeØ�9Ô'×,Ò,Ñ.Ô.Ð.Ð.Ø�vˆ~ˆ~ÝÐ 1Ñ2Ô2Ð2Ø ˆF�4‰LˆLØÐØ ˆF�4‰LˆLå˜OÑ,Ô,Ð,Ø€Mr1   c                ó   ‡ — ˆ fd„}|S )a—  
    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          j        ‰ ¦  «        Št          Št          ‰ ¦  «        ˆˆˆˆ fd„¦   «         }|S )Nc                 óš   •—  ‰‰| |¦  «        }‰D ]3\  }}||v r*||v r&t          d|›d|›dt          ‰¦  «        ›d�¦  «        ‚Œ4 ‰| i |¤ŽS )NúThe z and z arguments to z are mutually exclusive.)rÊ   r*   )	r_   ra   Ú	argumentsÚthisÚthatÚ_passedÚargumentPairsÚspecÚwrappees	        €€€€r)   Úwrappedz=_mutuallyExclusiveArguments.<locals>.wrapper.<locals>.wrappedñ  sŽ   ø€ à˜  d¨FÑ3Ô3ˆIØ+ð ð ‘
��dØ˜9Ð$Ð$¨°Ð):Ð):Ý#˜)à˜4˜4   Õ':¸7Ñ'CÔ'CÐ'CÐ'CðEñô ð øð �7˜DÐ+ FÐ+Ð+Ð+r1   )r!   rà   rä   r   )rï   rð   rì   rî   rí   s   ` @@€r)   Úwrapperz,_mutuallyExclusiveArguments.<locals>.wrapperí  sZ   øøøø€ ÝÔ  Ñ)Ô)ˆÝ"ˆå	ˆw‰Œð	,ð 	,ð 	,ð 	,ð 	,ð 	,ð 	,ñ 
Œð	,ð ˆr1   ro   )rí   rñ   s   ` r)   Ú_mutuallyExclusiveArgumentsrò   Û  s#   ø€ ð$ð ð ð ð ð" €Nr1   Ú_Tc.)Úboundr'   r—   úOptional[str]úCallable[[_Tc], _Tc]c                ó   ‡ ‡‡— dˆˆˆ fd„}|S )aw  
    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
    rï   ró   rY   c                ó*  •‡ ‡‡— t          d‰›dt          ‰ ¦  «        › �‰	‰¬¦  «        Šd                     ‰t          ‰	¦  «        ¦  «        }‰r|dz   t	          ‰¦  «        z   }|dz  }t          j        ‰ ¦  «        j        }‰|v rK|‰         j        t
          j	        j
        k    r+t          |¦  «                             ‰¦  «        Šˆˆˆˆ fd„}nˆˆˆ fd„}t          t           t          ‰ ¦  «        |¦  «        ¦  «        }t!          ||¦  «         |S )	Nrè   z parameter to r.   z'The {!r} parameter was deprecated in {}r3   r   c                 óp   •— t          | ¦  «        ‰k    s‰|v rt          ‰t          d¬¦  «          ‰| i |¤ŽS rd   )rL   r   ri   )r_   ra   r'   ÚparameterIndexr;   rï   s     €€€€r)   ÚcheckDeprecatedParameterzMdeprecatedKeywordParameter.<locals>.wrapper.<locals>.checkDeprecatedParameter1  sG   ø€ Ý�t‘9”9˜~Ò-Ð-°¸°°Ý˜Õ(:ÀqÐIÑIÔIÐIØ�w Ð/¨Ð/Ð/Ð/r1   c                 óJ   •— ‰|v rt          ‰t          d¬¦  «          ‰| i |¤ŽS rd   rh   )r_   ra   r'   r;   rï   s     €€€r)   rû   zMdeprecatedKeywordParameter.<locals>.wrapper.<locals>.checkDeprecatedParameter8  s7   ø€ Ø˜6�>�>Ý˜Õ(:ÀqÐIÑIÔIÐIØ�w Ð/¨Ð/Ð/Ð/r1   )r<   r*   r:   r   r0   r!   rà   rÕ   rÖ   r×   rÚ   ÚlistÚindexr   ró   r   rW   )
rï   r5   Úparamsrû   Ú	decoratedrú   r;   r'   r/   r4   s
   `    @@€€€r)   rñ   z+deprecatedKeywordParameter.<locals>.wrapper  sa  øøøø€ Ý4ØG�4ÐGÐGÕ)<¸WÑ)EÔ)EÐGÐGØØ#ð
ñ 
ô 
ˆð 8×>Ò>ØÝ˜WÑ%Ô%ñ
ô 
ˆð ð 	BØ˜‘*Õ4°[ÑAÔAÑAˆCØˆs‰
ˆåÔ" 7Ñ+Ô+Ô6ˆà�FˆNˆNØ�t”Ô!¥WÔ%6Ô%LÒLÐLå! &™\œ\×/Ò/°Ñ5Ô5ˆNð0ð 0ð 0ð 0ð 0ð 0ð 0ð 0ð 0ð0ð 0ð 0ð 0ð 0ð 0ð 0õ
 �˜n�e G™nœnÐ-EÑFÔFÑGÔGˆ	Ý˜9 cÑ*Ô*Ð*ØÐr1   )rï   ró   rY   ró   ro   )r4   r'   r/   rñ   s   ``` r)   r
   r
     s5   øøø€ ð.$ð $ð $ð $ð $ð $ð $ð $ðL €Nr1   rx   )NN)r4   r   r/   rX   rY   rZ   )r4   r   r'   r—   r/   rõ   rY   rö   )6rJ   Ú
__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   rW   r   r   r   r   r„   r�   r¥   r¬   r	   rÃ   rÑ   rä   rò   ró   r
   ro   r1   r)   ú<module>r
     s  ðð
Lð LðZ #Ð "Ð "Ð "Ð "Ð "ðð ð €ð €€€Ø 
€
€
€
Ø Ð Ð Ð Ð Ð Ø Ð Ð Ð Ð Ð Ø Ð Ð Ð Ð Ð Ø ?Ð ?Ð ?Ð ?Ð ?Ð ?Ð ?Ð ?Ð ?Ð ?Ð ?Ð ?Ð ?Ð ?Ð ?Ð ?Ø (Ð (Ð (Ð (Ð (Ð (Ð (Ð (à 1Ð 1Ð 1Ð 1Ð 1Ð 1Ð 1Ð 1Ø 'Ð 'Ð 'Ð 'Ð 'Ð 'à€Yˆt�_„_€Ø€WˆT�]„]€àEÐ ðð ð ð, ":Ð Ô Ø3Ð Ô Ø#7Ð Ô  ð/ð /ð /ðð ð ð ð( ð  ð  ð  ðFð ð ð ð<5ð 5ð 5ð< IMð& ð & ð & ð & ð & ðR> ð > ð > ð > ðBð ð ðð ð ðWð Wð Wð Wð Wñ Wô Wð Wð&Mð Mð Mð Mð Mñ Mô Mð Mð`,ð ,ð ,ð ,ð ,ñ ,ô ,ð ,ð^'ð 'ð 'ð08ð 8ð 8ð6!ð !ð !ðH'ð 'ð 'ðT9ð 9ð 9ðx#ð #ð #ðL €gˆe˜8 C¨ HÔ-Ð.Ñ.Ô.€ð ?Cð=ð =ð =ð =ð =ð =ð =r1   