Edit File: _deprecated.cpython-311.pyc
� ����n�d,�����������������������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��� ������c/builddir/build/BUILD/cloudlinux-venv-1.0.2/venv/lib/python3.11/site-packages/semver/_deprecated.py�wrapperzdeprecated.<locals>.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"������&��w�u�e�U�J��>�>�?�?�?r2���c������������������h�����t����������t����������j��������|������������������������������������������������������������S�)a�� Raise the major part of the version string. .. deprecated:: 2.10.0 Use :meth:`~semver.version.Version.bump_major` instead. :param: version string :return: the raised version string :rtype: str >>> semver.bump_major("3.4.5") '4.0.0' )r���r���r7���� bump_majorr:���s��� r0���rT���rT������(��������w�}�W�%�%�0�0�2�2�3�3�3r2���c������������������h�����t����������t����������j��������|������������������������������������������������������������S�)a�� Raise the minor part of the version string. .. deprecated:: 2.10.0 Use :meth:`~semver.version.Version.bump_minor` instead. :param: version string :return: the raised version string :rtype: str >>> semver.bump_minor("3.4.5") '3.5.0' )r���r���r7���� bump_minorr:���s��� r0���rW���rW�����rU���r2���c������������������h�����t����������t����������j��������|������������������������������������������������������������S�)a�� Raise the patch part of the version string. .. deprecated:: 2.10.0 Use :meth:`~semver.version.Version.bump_patch` instead. :param: version string :return: the raised version string :rtype: str >>> semver.bump_patch("3.4.5") '3.4.6' )r���r���r7���� bump_patchr:���s��� r0���rY���rY���(��rU���r2����rcc������������������j�����t����������t����������j��������|����������������������������������|������������������������S�)aZ�� Raise the prerelease part of the version string. .. deprecated:: 2.10.0 Use :meth:`~semver.version.Version.bump_prerelease` instead. :param version: version string :param token: defaults to 'rc' :return: the raised version string :rtype: str >>> semver.bump_prerelease('3.4.5', 'dev') '3.4.5-dev.1' )r���r���r7����bump_prerelease�r����tokens��� r0���r\���r\���:��s*������ ��w�}�W�%�%�5�5�e�<�<�=�=�=r2���rQ���c������������������j�����t����������t����������j��������|����������������������������������|������������������������S�)a\�� Raise the build part of the version string. .. deprecated:: 2.10.0 Use :meth:`~semver.version.Version.bump_build` instead. :param version: version string :param token: defaults to 'build' :return: the raised version string :rtype: str >>> semver.bump_build('3.4.5-rc.1+build.9') '3.4.5-rc.1+build.10' )r���r���r7���� bump_buildr]���s��� r0���r`���r`���M��s*������ ��w�}�W�%�%�0�0��7�7�8�8�8r2���c������������������l�����t����������j��������|�������������}t����������|�����������������������������������������������S�)a��� Remove any prerelease and build metadata from the version string. .. deprecated:: 2.10.0 Use :meth:`~semver.version.Version.finalize_version` instead. .. versionadded:: 2.7.9 Added :func:`finalize_version` :param version: version string :return: the finalized version string :rtype: str >>> semver.finalize_version('1.2.3-rc.5') '1.2.3' )r���r7���r����finalize_version)r����verinfos��� r0���rb���rb���`��s-������$��m�G�$�$�G��w�'�'�)�)�*�*�*r2���c������������������Z�����t�����������t����������j��������|�������������j��������di�|��������������S�)aH�� Replace one or more parts of a version and return the new string. .. deprecated:: 2.10.0 Use :meth:`~semver.version.Version.replace` instead. .. versionadded:: 2.9.0 Added :func:`replace` :param version: the version string to replace :param parts: the parts to be updated. Valid keys are: ``major``, ``minor``, ``patch``, ``prerelease``, or ``build`` :return: the replaced version string :raises TypeError: if ``parts`` contains invalid keys >>> import semver >>> semver.replace("1.2.3", major=2, patch=10) '2.2.10' ��)r���r���r7���r���)r����partss��� r0���r���r���v��s0������(��-�w�}�W�%�%�-�6�6��6�6�7�7�7r2���zsemver.cli.cmd_bumpzsemver.cli.cmd_checkzsemver.cli.cmd_comparezsemver.cli.cmd_nextverzsemver.cli.createparserzsemver.cli.processzsemver.cli.main)N)NN)rZ���)rQ���)/�__doc__r!���r%���� functoolsr���r����typesr����typingr���r���r���r �����r���r���r����_typesr ���r����DeprecationWarningr����Warningr3����PendingDeprecationWarning�intr8���r7���r>���r@���rG���rK���rR���rT���rW���rY���r\���r`���rb���r����cmd_bump� cmd_check�cmd_compare�cmd_nextver�createparser�process�mainre���r2���r0����<module>rx������s�������� �����������$��$��$��$��$��$��$��$��������������1��1��1��1��1��1��1��1��1��1��1��1�������������������������� �� �� �� �� �� �� �� ���A��"�!� �0� A��A��A� �1�+�A���c�]�A���c�]� A� � �S�M�A���7�m� A���A��A��A��A�H����1� &������ -�#��-�S��-�S��-��-��-���� -�2���H����,��,����,�8���2�H�E�E�E�"��"��F�E�"�6���H����!��!����!�6���E�8�,�,�,�3��3��-�,�3�$���E�8�,�,�,�3��3��-�,�3�$���(�(�;�;�;�@��@��@��<�;�@�*���H����4��4����4�"���H����4��4����4�"���H����4��4����4�"���H����>��>��>����>�$���H����9��9��9����9�$���H����+��+����+�*���H����8��8����8�.��:�c�l�,A�7�S�S�S���J�s�}�.D�g�V�V�V� ��j��O�5�w���������j��O�5�w���������z���7����������*�S�[�*>�� P� P� P���z�#�(�$5�w�G�G�G���r2���