§
x<ˆj, ã óX — d Z ddlZddlZddlmZmZ ddlmZ ddlm Z m
Z
mZmZ ddl
mZ ddlmZ dd lmZmZ d6ddded
œdee dee d
ee dee de e defd„Z edde¬¦ « dededefd„¦ « Z ed¬¦ « d„ ¦ « Z edd¬¦ « d„ ¦ « Z ed¬¦ « d„ ¦ « Z edd ¬¦ « d!„ ¦ « Z ed"d ¬¦ « d#„ ¦ « Z ed$d¬¦ « d7d%„¦ « Z ed¬¦ « d&„ ¦ « Z! ed¬¦ « d'„ ¦ « Z" ed¬¦ « d(„ ¦ « Z# ed¬¦ « d8d*„¦ « Z$ ed¬¦ « d9d,„¦ « Z% ed¬¦ « d-„ ¦ « Z& ed¬¦ « d.„ ¦ « Z' eej( d/d¬¦ « Z( eej) d0d¬¦ « Z) eej* d1d¬¦ « Z* eej+ d2d¬¦ « Z+ eej, d3d¬¦ « Z, eej- d4d¬¦ « Z- eej. d5d¬¦ « Z.dS ):zA
Contains all deprecated functions.
.. autofunction: deprecated
é N)ÚpartialÚwraps)Ú FrameType)ÚTypeÚCallableÚOptionalÚcasté )Úcli)ÚVersion)Ú DecoratorÚF©ÚreplaceÚversionÚremoveÚcategoryÚfuncr r r r Úreturnc ó¬ ‡ ‡‡‡‡— ‰ €t t ‰‰‰‰¬¦ « S t ‰ ¦ « dt dt f fˆˆ ˆˆˆfd„¦ « }|S )aN
Decorates a function to output a deprecation warning.
:param func: the function to decorate
:param replace: the function to replace (use the full qualified
name like ``semver.version.Version.bump_major``.
:param version: the first version when this function was deprecated.
:param category: allow you to specify the deprecation warning class
of your choice. By default, it's :class:`DeprecationWarning`, but
you can choose :class:`PendingDeprecationWarning` or a custom class.
:return: decorated function which is marked as deprecated
Nr r .c óŽ •— dg}‰r| d¦ « ‰ s| d¦ « n"| t ‰ ¦ « ¦ « ‰
r| d¦ « n| d¦ « t t ‰¦ « j }‰
p|}t t
t t
t
j ¦ « ¦ « j ¦ « }d |¦ « }t j | ||‰¬¦ « ‰t
j
|j ¦ « |j ¬¦ « ~ ‰| i |¤ŽS ) Nz$Function 'semver.{f}' is deprecated.zDeprecated since version {v}. z*This function will be removed in semver 3.zUse {r!r} instead.z0Use the respective 'semver.Version.{r}' instead.ú )ÚfÚrÚv)r ÚfilenameÚlineno)ÚappendÚstrr r Ú__qualname__r ÚinspectÚcurrentframeÚf_backÚjoinÚwarningsÚ
warn_explicitÚformatÚgetfileÚf_codeÚf_lineno)ÚargsÚkwargsÚmsg_listr r ÚframeÚmsgr r r r r s €€€€€úd/builddir/build/BUILD/cloudlinux-venv-1.0.12/venv/lib/python3.11/site-packages/semver/_deprecated.pyÚwrapperzdeprecated..wrapper/ s= ø€ à:Ð;ˆàð >Ø�OŠOÐ<Ñ=Ô=Ð=àð )Ø�OŠOÐHÑIÔIÐIÐIà�OŠO�C ™KœKÑ(Ô(Ð(àð PØ�OŠOÐ0Ñ1Ô1Ð1Ð1à�OŠOÐNÑOÔOÐOå•�D‰MŒMÔ&ˆØˆL�qˆå•Y¥¥YµÔ0DÑ0FÔ0FÑ GÔ GÔ NÑOÔOˆà�hŠh�xÑ Ô ˆÝÔØ�JŠJ˜˜a 7ˆJÑ+Ô+ØÝ”_ U¤\Ñ2Ô2Ø”>ð
ñ
ô
ð
ð
؈t�TÐ$˜VÐ$Ð$Ð$ó )r Ú
deprecatedr r r )r r r r r r1 s ````` r0 r3 r3 s� øøøøø€ ð* €|ÝÝØØØØð
ñ
ô
ð
õ ˆ4�[„[ð %¥H¨Sµ!¨VÔ$4ð %ð %ð %ð %ð %ð %ð %ð %ð %ñ „[ð %ðD €Nr2 z3.0.0z$Still under investigation, see #258.)r r r Úver1Úver2c óP — t j | ¦ « |¦ « S )a`
Compare two versions strings.
.. deprecated:: 3.0.0
The situation of this function is unclear and it might
disappear in the future.
If possible, use :meth:`semver.version.Version.compare`.
See :gh:`258` for details.
:param ver1: first version string
:param ver2: second version string
:return: The return value is negative if ver1 < ver2,
zero if ver1 == ver2 and strictly positive if ver1 > ver2
>>> semver.compare("1.0.0", "2.0.0")
-1
>>> semver.compare("2.0.0", "1.0.0")
1
>>> semver.compare("2.0.0", "2.0.0")
0
)r ÚparseÚcompare©r4 r5 s r0 r8 r8 U s" € õ6 Œ=˜ÑÔ×&Ò& tÑ,Ô,Ð,r2 z2.10.0©r c óN — t j | ¦ « ¦ « S )aP
Parse version to major, minor, patch, pre-release, build parts.
.. deprecated:: 2.10.0
Use :meth:`~semver.version.Version.parse` instead.
:param version: version string
:return: dictionary with the keys 'build', 'major', 'minor', 'patch',
and 'prerelease'. The prerelease or build keys can be None
if not provided
:rtype: dict
>>> ver = semver.parse('3.4.5-pre.2+build.4')
>>> ver['major']
3
>>> ver['minor']
4
>>> ver['patch']
5
>>> ver['prerelease']
'pre.2'
>>> ver['build']
'build.4'
)r r7 Úto_dictr: s r0 r7 r7 s s € õ4 Œ=˜Ñ!Ô!×)Ò)Ñ+Ô+Ð+r2 zsemver.version.Version.parse)r r c ó* — t j | ¦ « S )a#
Parse version string to a Version instance.
.. deprecated:: 2.10.0
Use :meth:`~semver.version.Version.parse` instead.
.. versionadded:: 2.7.2
Added :func:`semver.parse_version_info`
:param version: version string
:return: a :class:`VersionInfo` instance
>>> version_info = semver.Version.parse("3.4.5-pre.2+build.4")
>>> version_info.major
3
>>> version_info.minor
4
>>> version_info.patch
5
>>> version_info.prerelease
'pre.2'
>>> version_info.build
'build.4'
)r r7 r: s r0 Úparse_version_infor> � s € õ2 Œ=˜Ñ!Ô!Ð!r2 c óT — t j | ¦ « }| |¦ « S )aj
Compare two versions strings through a comparison.
.. deprecated:: 2.10.0
Use :meth:`~semver.version.Version.match` instead.
:param str version: a version string
:param str match_expr: operator and version; valid operators are
< smaller than
> greater than
>= greator or equal than
<= smaller or equal than
== equal
!= not equal
:return: True if the expression matches the version, otherwise False
:rtype: bool
>>> semver.match("2.0.0", ">=1.0.0")
True
>>> semver.match("1.0.0", ">1.0.0")
False
)r r7 Úmatch)r Ú
match_exprÚvers r0 r@ r@ ¬ s% € õ0 Œ-˜Ñ
Ô
€CØ�9Š9�ZÑ Ô Ð r2 Úmaxz2.10.2c óT — t t | |t j ¬¦ « ¦ « S )a>
Returns the greater version of two versions strings.
.. deprecated:: 2.10.2
Use :func:`max` instead.
:param ver1: version string 1
:param ver2: version string 2
:return: the greater version of the two
:rtype: :class:`Version`
>>> semver.max_ver("1.0.0", "2.0.0")
'2.0.0'
©Úkey)r rC r r7 r9 s r0 Úmax_verrG È ó# € õ �s�4˜¥7¤=Ð1Ñ1Ô1Ñ2Ô2Ð2r2 Úminc óT — t t | |t j ¬¦ « ¦ « S )aB
Returns the smaller version of two versions strings.
.. deprecated:: 2.10.2
Use Use :func:`min` instead.
:param ver1: version string 1
:param ver2: version string 2
:return: the smaller version of the two
:rtype: :class:`Version`
>>> semver.min_ver("1.0.0", "2.0.0")
'1.0.0'
rE )r rI r r7 r9 s r0 Úmin_verrK Û rH r2 zstr(versionobject)c óB — t t | ||||¦ « ¦ « S )aX
Format a version string according to the Semantic Versioning specification.
.. deprecated:: 2.10.0
Use ``str(Version(VERSION)`` instead.
:param int major: the required major part of a version
:param int minor: the required minor part of a version
:param int patch: the required patch part of a version
:param str prerelease: the optional prerelease part of a version
:param str build: the optional build part of a version
:return: the formatted string
:rtype: str
>>> semver.format_version(3, 4, 5, 'pre.2', 'build.4')
'3.4.5-pre.2+build.4'
)r r )ÚmajorÚminorÚpatchÚ
prereleaseÚbuilds r0 Úformat_versionrR î s" € õ&