Why Gemfury? Push, build, and install  RubyGems npm packages Python packages Maven artifacts PHP packages Go Modules Debian packages RPM packages NuGet packages

Repository URL to install this package:

Details    
odigos / etc / odigos-vmagent / instrumentations / python / deprecated / __pycache__ / sphinx.cpython-311.pyc
Size: Mime:
§

ëEqf(ãón—dZddlZddlZddlZddlmZddlmZGd„de¦«Zdd	„Z	dd
„Z
dd„ZdS)
a-
Sphinx directive integration
============================

We usually need to document the life-cycle of functions and classes:
when they are created, modified or deprecated.

To do that, `Sphinx <http://www.sphinx-doc.org>`_ has a set
of `Paragraph-level markups <http://www.sphinx-doc.org/en/stable/markup/para.html>`_:

- ``versionadded``: to document the version of the project which added the described feature to the library,
- ``versionchanged``: to document changes of a feature,
- ``deprecated``: to document a deprecated feature.

The purpose of this module is to defined decorators which adds this Sphinx directives
to the docstring of your function and classes.

Of course, the ``@deprecated`` decorator will emit a deprecation warning
when the function/method is called or the class is constructed.
éN)ÚClassicAdapter)Ú
deprecatedcóB‡—eZdZdZdddedfˆfd„	Zˆfd„Zˆfd„ZˆxZS)Ú
SphinxAdaptera
    Sphinx adapter -- *for advanced usage only*

    This adapter override the :class:`~deprecated.classic.ClassicAdapter`
    in order to add the Sphinx directives to the end of the function/class docstring.
    Such a directive is a `Paragraph-level markup <http://www.sphinx-doc.org/en/stable/markup/para.html>`_

    - The directive can be one of "versionadded", "versionchanged" or "deprecated".
    - The version number is added if provided.
    - The reason message is obviously added in the directive block if not empty.
    ÚNéFcóž•—|std¦«‚||_||_tt|¦« ||||¬¦«dS)a
        Construct a wrapper adapter.

        :type  directive: str
        :param directive:
            Sphinx directive: can be one of "versionadded", "versionchanged" or "deprecated".

        :type  reason: str
        :param reason:
            Reason message which documents the deprecation in your library (can be omitted).

        :type  version: str
        :param version:
            Version of your project which deprecates this feature.
            If you follow the `Semantic Versioning <https://semver.org/>`_,
            the version number has the format "MAJOR.MINOR.PATCH".

        :type  action: str
        :param action:
            A warning filter used to activate or not the deprecation warning.
            Can be one of "error", "ignore", "always", "default", "module", or "once".
            If ``None`` or empty, the the global filtering mechanism is used.
            See: `The Warnings Filter`_ in the Python documentation.

        :type  category: type
        :param category:
            The warning category to use for the deprecation warning.
            By default, the category class is :class:`~DeprecationWarning`,
            you can inherit this class to define your own deprecation warning category.

        :type  line_length: int
        :param line_length:
            Max line length of the directive text. If non nul, a long text is wrapped in several lines.
        z3'version' argument is required in Sphinx directives)ÚreasonÚversionÚactionÚcategoryN)Ú
ValueErrorÚ	directiveÚline_lengthÚsuperrÚ__init__)Úselfrr
rrr
rÚ	__class__s       €ú8/tmp/pip-target-asg8frr5/lib/python/deprecated/sphinx.pyrzSphinxAdapter.__init__,s\ø€ðVð	TåÐRÑSÔSÐSØ"ˆŒØ&ˆÔÝ
m˜TÑ"Ô"×+Ò+°6À7ÐSYÐdlÐ+ÑmÔmÐmÐmÐmóc	󨕗|jrdnd}| |j|j¬¦«g}|jdkr
|jdz
nd}t	j|j¦« ¦«}| ¦«D]W}|r>| 	t	j
||dd¬¦« ¦«¦«ŒB| d¦«ŒX|jpd}| d	¬
¦«pdg}t|¦«dkr/t	jd |dd…¦«¦«nd}|d
|z}|r&tjdd|tj¬¦«dz}nd}|d d„|D¦«¦«z
}||_|jdvr|St%t&|¦« |¦«S)z¬
        Add the Sphinx directive to your class or function.

        :param wrapped: Wrapped class or function.

        :return: the decorated class or function.
        z.. {directive}:: {version}z.. {directive}::)rréiz   )ÚwidthÚinitial_indentÚsubsequent_indentrT)ÚkeependséNrz\n+$©Úflagsz

ú
c3ó@K—|]}d |¦«V—ŒdS)z{}
N)Úformat)Ú.0Úlines  rú	<genexpr>z)SphinxAdapter.__call__.<locals>.<genexpr>†s.èè€ÐGÐG°T˜VŸ]š]¨4Ñ0Ô0ÐGÐGÐGÐGÐGÐGr>ÚversionaddedÚversionchanged)rr"rrÚtextwrapÚdedentr
ÚstripÚ
splitlinesÚextendÚfillÚappendÚ__doc__ÚlenÚjoinÚreÚsubÚDOTALLrrÚ__call__)
rÚwrappedÚfmtÚ	div_linesrr
Ú	paragraphÚ	docstringÚlinesrs
         €rr5zSphinxAdapter.__call__^sòø€ð/3¬lÐRÐ*Ð*Ð@RˆØ—Z’Z¨$¬.À$Ä,ZÑOÔOÐPˆ	Ø(,Ô(8¸1Ò(<Ð(<Ô  1Ñ$Ð$À'ˆÝ” ¤Ñ-Ô-×3Ò3Ñ5Ô5ˆØ×*Ò*Ñ,Ô,ð	%ð	%ˆIØð

%Ø× Ò Ý”MØ!Ø#Ø',Ø*/ð	ñô÷
!’j‘l”lñ
ôððð× Ò  Ñ$Ô$Ð$Ð$ð”OÐ) rˆ	Ø×$Ò$¨dÐ$Ñ3Ô3Ð;¸°tˆÝ;>¸u¹:¼:Ⱥ>¸>•H”O B§G¢G¨E°!°"°"¬IÑ$6Ô$6Ñ7Ô7Ð7Èrˆ	ؘ!”H˜yÑ(ˆ	Øð	團w¨¨I½R¼YÐGÑGÔGÈ&ÑPˆIˆIðˆIð	R—W’WÐGÐG¸YÐGÑGÔGÑGÔGÑGˆ	à#ˆŒØŒ>Ð?Ð?Ð?؈NÝ•] DÑ)Ô)×2Ò2°7Ñ;Ô;Ð;rcóž•—tt|¦« ||¦«}tjdd|tj¬¦«}|S)a“
        Get the deprecation warning message (without Sphinx cross-referencing syntax) for the user.

        :param wrapped: Wrapped class or function.

        :param instance: The object to which the wrapped function was bound when it was called.

        :return: The warning message.

        .. versionadded:: 1.2.12
           Strip Sphinx cross-referencing syntax from warning message.

        z*(?: : [a-zA-Z]+ )? : [a-zA-Z]+ : (`[^`]*`)z\1r)rrÚget_deprecated_msgr2r3ÚX)rr6ÚinstanceÚmsgrs    €rr=z SphinxAdapter.get_deprecated_msgsHø€õ•M 4Ñ(Ô(×;Ò;¸GÀXÑNÔNˆõŒfÐBÀEÈ3ÕVXÔVZÐ[Ñ[Ô[ˆØˆ
r)	Ú__name__Ú
__module__Ú__qualname__r/ÚDeprecationWarningrr5r=Ú
__classcell__)rs@rrrs’ø€€€€€ð
ð
ðØØØ#Øð0nð0nð0nð0nð0nð0nðd-<ð-<ð-<ð-<ð-<ð^ððððððððrrrrcó,—td|||¬¦«}|S)a2
    This decorator can be used to insert a "versionadded" directive
    in your function/class docstring in order to documents the
    version of the project which adds this new functionality in your library.

    :param str reason:
        Reason message which documents the addition in your library (can be omitted).

    :param str version:
        Version of your project which adds this feature.
        If you follow the `Semantic Versioning <https://semver.org/>`_,
        the version number has the format "MAJOR.MINOR.PATCH", and,
        in the case of a new functionality, the "PATCH" component should be "0".

    :type  line_length: int
    :param line_length:
        Max line length of the directive text. If non nul, a long text is wrapped in several lines.

    :return: the decorated function.
    r&©r
rr©r©r
rrÚadapters    rr&r&£s+€õ*ØØØØð	ñô€Gð€Nrcó,—td|||¬¦«}|S)aæ
    This decorator can be used to insert a "versionchanged" directive
    in your function/class docstring in order to documents the
    version of the project which modifies this functionality in your library.

    :param str reason:
        Reason message which documents the modification in your library (can be omitted).

    :param str version:
        Version of your project which modifies this feature.
        If you follow the `Semantic Versioning <https://semver.org/>`_,
        the version number has the format "MAJOR.MINOR.PATCH".

    :type  line_length: int
    :param line_length:
        Max line length of the directive text. If non nul, a long text is wrapped in several lines.

    :return: the decorated function.
    r'rGrHrIs    rr'r'Ás+€õ(ØØØØð	ñô€Gð€Nrcó —| dd¦«}| dt¦«}||d<||d<||d<td||dœ|¤ŽS)	ax
    This decorator can be used to insert a "deprecated" directive
    in your function/class docstring in order to documents the
    version of the project which deprecates this functionality in your library.

    :param str reason:
        Reason message which documents the deprecation in your library (can be omitted).

    :param str version:
        Version of your project which deprecates this feature.
        If you follow the `Semantic Versioning <https://semver.org/>`_,
        the version number has the format "MAJOR.MINOR.PATCH".

    :type  line_length: int
    :param line_length:
        Max line length of the directive text. If non nul, a long text is wrapped in several lines.

    Keyword arguments can be:

    -   "action":
        A warning filter used to activate or not the deprecation warning.
        Can be one of "error", "ignore", "always", "default", "module", or "once".
        If ``None``, empty or missing, the the global filtering mechanism is used.

    -   "category":
        The warning category to use for the deprecation warning.
        By default, the category class is :class:`~DeprecationWarning`,
        you can inherit this class to define your own deprecation warning category.

    :return: a decorator used to deprecate a function.

    .. versionchanged:: 1.2.13
       Change the signature of the decorator to reflect the valid use cases.
    rrÚadapter_clsr
rr)rrM©)ÚpoprÚ_classic_deprecated)r
rrÚkwargsrrMs      rrrÞsd€ðF—
’
˜;¨Ñ5Ô5€IØ—*’*˜]­MÑ:Ô:€KØ€Fˆ8ÑØ€Fˆ9ÑØ'€Fˆ=ÑÝÐV¨ÀÐVÐVÈvÐVÐVÐVr)rrr)r/r2r(ÚwraptÚdeprecated.classicrrrPrr&r'rNrrú<module>rTsÏðððð(
€	€	€	Ø€€€à€€€à-Ð-Ð-Ð-Ð-Ð-Ø@Ð@Ð@Ð@Ð@Ð@ðAðAðAðAðANñAôAðAðHðððð<ðððð:(Wð(Wð(Wð(Wð(Wð(Wr