HEX
Server: Apache/2.4.52 (Ubuntu)
System: Linux spn-python 5.15.0-89-generic #99-Ubuntu SMP Mon Oct 30 20:42:41 UTC 2023 x86_64
User: arjun (1000)
PHP: 8.1.2-1ubuntu2.20
Disabled: NONE
Upload Files
File: //lib/python3/dist-packages/incremental/__pycache__/__init__.cpython-312.pyc
�

@�=`�&���dZddlmZmZddlZddlZejdkrdZndZ	eZ	d�ZeGd	�d
e��Z
e
�Z
Gd�de�ZeGd
�de��Zd�Zd�ZddlmZgd�Zy#e
$rd�Z	Y�PwxYw)z0
Versions for Python packages.

See L{Version}.
�)�division�absolute_importN)�rFTc��||kry||k(ryy)z�
        Compare two objects.

        Returns a negative number if C{a < b}, zero if they are equal, and a
        positive number if C{a > b}.
        ���r��)�a�bs  �6/usr/lib/python3/dist-packages/incremental/__init__.py�_cmpr
s��
�q�5��
�!�V���c��ts|Sd�}d�}d�}d�}d�}d�}||_||_||_||_||_||_|S)z�
    Class decorator that ensures support for the special C{__cmp__} method.

    On Python 2 this does nothing.

    On Python 3, C{__eq__}, C{__lt__}, etc. methods are added to the class,
    relying on C{__cmp__} to implement their comparisons.
    c�B�|j|�}|tur|S|dk(S�Nr��__cmp__�NotImplemented��self�other�cs   r�__eq__z_comparable.<locals>.__eq__8�&���L�L��������H��A�v�
rc�B�|j|�}|tur|S|dk7Srrrs   r�__ne__z_comparable.<locals>.__ne__>rrc�B�|j|�}|tur|S|dkSrrrs   r�__lt__z_comparable.<locals>.__lt__D�&���L�L��������H��1�u�rc�B�|j|�}|tur|S|dkSrrrs   r�__le__z_comparable.<locals>.__le__Jrrc�B�|j|�}|tur|S|dkDSrrrs   r�__gt__z_comparable.<locals>.__gt__Prrc�B�|j|�}|tur|S|dk\Srrrs   r�__ge__z_comparable.<locals>.__ge__Vrr)�_PY3rr#r!r%rr)�klassrrrr!r#r%s       r�_comparabler(+s[������������E�L��E�L��E�L��E�L��E�L��E�L��Lrc��eZdZdZd�Zy)�_infz:
    An object that is bigger than all other objects.
    c��|turyy)z�
        @param other: Another object.
        @type other: any

        @return: 0 if other is inf, 1 otherwise.
        @rtype: C{int}
        rr)r*)rrs  rrz_inf.__cmp__ps���D�=��rN)�__name__�
__module__�__qualname__�__doc__rr	rrr*r*js���
rr*c��eZdZdZy)�IncomparableVersionsz-
    Two versions could not be compared.
    N)r,r-r.r/r	rrr1r1�s��rr1c�T�eZdZdZ				d	d�Zed��Zd�ZeZeZ	eZ
d�Zd�Zd�Z
y)
�Versionz�
    An encapsulation of a version for a project, with support for outputting
    PEP-440 compatible version strings.

    This class supports the standard major.minor.micro[rcN] scheme of
    versioning.
    Nc	��|r
|rtd��|r |s|}tjdtd��|dk(r|s|s|s|s|rtd��||_||_||_||_||_||_	||_
y)a�
        @param package: Name of the package that this is a version of.
        @type package: C{str}
        @param major: The major version number.
        @type major: C{int} or C{str} (for the "NEXT" symbol)
        @param minor: The minor version number.
        @type minor: C{int}
        @param micro: The micro version number.
        @type micro: C{int}
        @param release_candidate: The release candidate number.
        @type release_candidate: C{int}
        @param prerelease: The prerelease number. (Deprecated)
        @type prerelease: C{int}
        @param post: The postrelease number.
        @type post: C{int}
        @param dev: The development release number.
        @type dev: C{int}
        z Please only return one of these.zvPassing prerelease to incremental.Version was deprecated in Incremental 16.9.0. Please pass release_candidate instead.���
stacklevel�NEXTz;When using NEXT, all other values except Package must be 0.N)�
ValueError�warnings�warn�DeprecationWarning�package�major�minor�micro�release_candidate�post�dev)	rr=r>r?r@rA�
prereleaserBrCs	         r�__init__zVersion.__init__�s���:���?�@�@�
� 1� *���M�M�1�#��
��F�?���!2�d�c� �U��������
���
���
�!2�����	���rc�T�tjdtd��f|jS)NzuAccessing incremental.Version.prerelease was deprecated in Incremental 16.9.0. Use Version.release_candidate instead.r5r6)r:r;r<rA�rs rrDzVersion.prerelease�s.���
�
�5�
��	
�	��%�%�%rc�>�|jdk(r|jS|j�d}nd|j��}|j�d}nd|j��}|j�d}nd|j��}d|j|j|j
|||fzS)z�
        Return a PEP440-compatible "public" representation of this L{Version}.

        Examples:

          - 14.4.0
          - 1.2.3rc1
          - 14.2.1rc1dev9
          - 16.04.0dev0
        r8�z.rcz.postz.devz%r.%d.%d%s%s%s)r>rArBrCr?r@)r�rcrBrCs    r�publiczVersion.public�s����:�:����:�:���!�!�)��B�*�!�2�2�4�B��9�9���D��!%�	�	�+�D��8�8���C��#�h�h�(�C��4�:�:�t�z�z�4�:�:�r�4�QT�"U�U�Urc	�H�|j�d}nd|j��}|j�d}nd|j��}|j�d}nd|j��}d|jj|j
|j|j|j|||fzS)NrIz, release_candidate=z, post=z, dev=z%s(%r, %r, %d, %d%s%s%s))	rArBrC�	__class__r,r=r>r?r@)rrArBrCs    r�__repr__zVersion.__repr__�s����!�!�)� "��*�=A�<R�<R� T���9�9���D��#'�)�)�-�D��8�8���C��!%���*�C�)��N�N�#�#��L�L��J�J��J�J��J�J����	-
�	
�		
rc�D�d|j�d|j��d�S)N�[z
, version �]�r=�shortrGs r�__str__zVersion.__str__s��%)�\�\�4�:�:�<�@�@rc	�\�t||j�stS|jj	�|jj	�k7r$t|j�d|j����|jdk(rt}n|j}|j�t}n|j}|j�d}n|j}|j�t}n|j}|jdk(rt}n|j}|j�t}n|j}|j�d}n|j}|j�t}	n|j}	t||j|j|||f||j|j|||	f�}
|
S)aw
        Compare two versions, considering major versions, minor versions, micro
        versions, then release candidates, then postreleases, then dev
        releases. Package names are case insensitive.

        A version with a release candidate is always less than a version
        without a release candidate. If both versions have release candidates,
        they will be included in the comparison.

        Likewise, a version with a dev release is always less than a version
        without a dev release. If both versions have dev releases, they will
        be included in the comparison.

        @param other: Another version.
        @type other: L{Version}

        @return: NotImplemented when the other object is not a Version, or one
            of -1, 0, or 1.

        @raise IncomparableVersions: when the package names of the versions
            differ.
        z != r8r)�
isinstancerMrr=�lowerr1r>r*rArBrCr
r?r@)rrr>rArBrC�
othermajor�otherrc�	otherpost�otherdev�xs           rrzVersion.__cmp__sb��.�%����0�!�!��<�<����5�=�=�#6�#6�#8�8�&�T�\�\�5�=�=�'Q�R�R��:�:����E��J�J�E��!�!�)� $�� $� 6� 6���9�9���D��9�9�D��8�8���C��(�(�C��;�;�&� ��J����J��"�"�*��G��-�-�G��:�:���I��
�
�I��9�9���H��y�y�H��
�D�J�J��
�
�,=�t�S�I�
����e�k�k�7�I�x�P�
���r)NNNN)r,r-r.r/rE�propertyrDrK�baserS�localrNrTrr	rrr3r3�sW�����
��7�r�
&��
&�V�>�D��E��E�
�8A�Hrr3c�D�|j�d|j���}|S)z�
    Get a friendly string for the given version object.

    @param version: A L{Version} object.
    @return: A string containing the package and short version number.
    � rR)�version�results  r�getVersionStringrdcs�� �������
9�F��Mrc�l�|syddlm}|j|�}|j�|j�D]a}|ddk(s�i}t	|d�5}t|j
�|�ddd�|dj�|j_	ytd��#1swY�9xYw)	zF
    Get the version from the package listed in the Distribution.
    Nr)�build_pyr�_versionr5�__version__zNo _version.py found.)�distutils.commandrf�finalize_options�find_all_modules�open�exec�readrK�metadatarb�	Exception)�dist�keyword�valuerf�
sp_command�item�version_file�fs        r�_get_versionrxns�����*��"�"�4�(�J����!��+�+�-����7�j� ��L��d�1�g��!��Q�V�V�X�|�,��%1��$?�$F�$F�$H�D�M�M�!��.��+�
,�,�
��s�B*�*B3	r)rh)rhr3rd)r/�
__future__rr�sysr:�version_infor&�cmpr
�	NameErrorr(�objectr*�	TypeErrorr1r3rdrxrgrh�__all__r	rr�<module>r�s����1�
�����f���D��D���D�$7�~
��6��
��$�v���9��
�Y�f�Y�
�Y�x�-�2"�9���a����s�A0�0A;�:A;