관리-도구
편집 파일: _deprecated.cpython-311.pyc
� �܋f, � �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.6/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"