HEX
Server: Apache
System: Linux zacp120.webway.host 4.18.0-553.50.1.lve.el8.x86_64 #1 SMP Thu Apr 17 19:10:24 UTC 2025 x86_64
User: govancoz (1003)
PHP: 8.3.26
Disabled: exec,system,passthru,shell_exec,proc_close,proc_open,dl,popen,show_source,posix_kill,posix_mkfifo,posix_getpwuid,posix_setpgid,posix_setsid,posix_setuid,posix_setgid,posix_seteuid,posix_setegid,posix_uname
Upload Files
File: //usr/local/lib/python3.7/site-packages/pip/_vendor/packaging/__pycache__/specifiers.cpython-37.pyc
B

L��g�u�@s�ddlZddlZddlZddlZddlZddlmZmZmZm	Z	m
Z
mZmZm
Z
mZmZmZddlmZddlmZmZmZeeefZeeeefZeded�ZeeegefZGdd	�d	e�ZGd
d�dejd�Z Gd
d�de �Z!Gdd�de!�Z"edeegefedeegefd�dd�Z#Gdd�de!�Z$e�%d�Z&ee
ed�dd�Z'eed�dd�Z(e
ee
eee
ee
efd�dd�Z)Gd d!�d!e �Z*dS)"�N)�Callable�Dict�Iterable�Iterator�List�Optional�Pattern�Set�Tuple�TypeVar�Union�)�canonicalize_version)�
LegacyVersion�Version�parse�VersionTypeVar)�boundc@seZdZdZdS)�InvalidSpecifierzH
    An invalid specifier was found, users should refer to PEP 440.
    N)�__name__�
__module__�__qualname__�__doc__�rr�D/tmp/pip-unpacked-wheel-hv55ucu3/pip/_vendor/packaging/specifiers.pyr!src@s�eZdZejed�dd��Zejed�dd��Zeje	e
d�dd��Zeje
e
d�d	d
��Zeje
dd�d
d
��Zejdee
e
e
d�dd��Zejdeee
e
eed�dd��ZdS)�
BaseSpecifier)�returncCsdS)z�
        Returns the str representation of this Specifier like object. This
        should be representative of the Specifier itself.
        Nr)�selfrrr�__str__(szBaseSpecifier.__str__cCsdS)zF
        Returns a hash value for this Specifier like object.
        Nr)rrrr�__hash__/szBaseSpecifier.__hash__)�otherrcCsdS)zq
        Returns a boolean representing whether or not the two Specifier like
        objects are equal.
        Nr)rr rrr�__eq__5szBaseSpecifier.__eq__cCsdS)zg
        Returns whether or not pre-releases as a whole are allowed by this
        specifier.
        Nr)rrrr�prereleases<szBaseSpecifier.prereleasesN)�valuercCsdS)zd
        Sets whether or not pre-releases as a whole are allowed by this
        specifier.
        Nr)rr#rrrr"Cs)�itemr"rcCsdS)zR
        Determines if the given item is contained within this specifier.
        Nr)rr$r"rrr�containsJszBaseSpecifier.contains)�iterabler"rcCsdS)z�
        Takes an iterable of items and filters them so that only items which
        are contained within this specifier are allowed in it.
        Nr)rr&r"rrr�filterPszBaseSpecifier.filter)N)N)rrr�abc�abstractmethod�strr�intr�object�boolr!�abstractpropertyrr"�setterr%rrr'rrrrr'sr)�	metaclassc@sReZdZUiZeeefed<eeed<d+eee	dd�dd�Z
ed�d	d
�Zed�dd�Ze
eeefd�d
d��Zed�dd�Zee	d�dd�Zeed�dd�Zeed�dd�Ze
ed�dd��Ze
ed�dd��Ze
ee	d�dd��Zeje	dd �d!d��Zee	d"�d#d$�Zd,eee	e	d%�d&d'�Zd-ee ee	ee d(�d)d*�Z!dS).�_IndividualSpecifier�
_operators�_regex�N)�specr"rcCsH|j�|�}|s td|�d���|�d���|�d���f|_||_dS)NzInvalid specifier: '�'�operator�version)r3�searchr�group�strip�_spec�_prereleases)rr5r"�matchrrr�__init___sz_IndividualSpecifier.__init__)rcCs8|jdk	rd|j��nd}d|jj�dt|��|�d�S)Nz, prereleases=r4�<�(z)>)r=r"�	__class__rr*)r�prerrr�__repr__lsz_IndividualSpecifier.__repr__cCsdj|j�S)Nz{}{})�formatr<)rrrrrusz_IndividualSpecifier.__str__cCs|jdt|jd�fS)Nrr
)r<r)rrrr�_canonical_specxsz$_IndividualSpecifier._canonical_speccCs
t|j�S)N)�hashrF)rrrrr|sz_IndividualSpecifier.__hash__)r rcCsPt|t�r4y|�t|��}WqDtk
r0tSXnt||j�sDtS|j|jkS)N)�
isinstancer*rBr�NotImplementedrF)rr rrrr!s
z_IndividualSpecifier.__eq__)�oprcCst|d|j|���}|S)NZ	_compare_)�getattrr2)rrJ�operator_callablerrr�
_get_operator�sz"_IndividualSpecifier._get_operator)r8rcCst|ttf�st|�}|S)N)rHrrr)rr8rrr�_coerce_version�sz$_IndividualSpecifier._coerce_versioncCs
|jdS)Nr)r<)rrrrr7�sz_IndividualSpecifier.operatorcCs
|jdS)Nr
)r<)rrrrr8�sz_IndividualSpecifier.versioncCs|jS)N)r=)rrrrr"�sz _IndividualSpecifier.prereleases)r#rcCs
||_dS)N)r=)rr#rrrr"�s)r$rcCs
|�|�S)N)r%)rr$rrr�__contains__�sz!_IndividualSpecifier.__contains__)r$r"rcCs>|dkr|j}|�|�}|jr&|s&dS|�|j�}|||j�S)NF)r"rN�
is_prereleaserMr7r8)rr$r"�normalized_itemrLrrrr%�s

z_IndividualSpecifier.contains)r&r"rccs�d}g}d|dk	r|ndi}xJ|D]B}|�|�}|j|f|�r"|jrZ|sZ|jsZ|�|�q"d}|Vq"W|s�|r�x|D]
}|VqvWdS)NFr"T)rNr%rPr"�append)rr&r"�yielded�found_prereleases�kwr8�parsed_versionrrrr'�s




z_IndividualSpecifier.filter)r4N)N)N)"rrrr2rr*�__annotations__rrr-r?rDr�propertyr
rFr+rr,r!�CallableOperatorrM�UnparsedVersion�
ParsedVersionrNr7r8r"r/rOr%rrr'rrrrr1Zs0

	
r1cs�eZdZdZe�dedejejB�Zdddddd	d
�Z	d e
eedd
��fdd�
Z
eed�dd�Zee
ed�dd�Zee
ed�dd�Zee
ed�dd�Zee
ed�dd�Zee
ed�dd�Zee
ed�dd�Z�ZS)!�LegacySpecifiera�
        (?P<operator>(==|!=|<=|>=|<|>))
        \s*
        (?P<version>
            [^,;\s)]* # Since this is a "legacy" specifier, and the version
                      # string can be just about anything, we match everything
                      # except for whitespace, a semi-colon for marker support,
                      # a closing paren since versions can be enclosed in
                      # them, and a comma since it's a version separator.
        )
        z^\s*z\s*$�equal�	not_equal�less_than_equal�greater_than_equal�	less_than�greater_than)z==z!=z<=z>=r@�>r4N)r5r"rcst��||�t�dt�dS)NzZCreating a LegacyVersion has been deprecated and will be removed in the next major release)�superr?�warnings�warn�DeprecationWarning)rr5r")rBrrr?�szLegacySpecifier.__init__)r8rcCst|t�stt|��}|S)N)rHrr*)rr8rrrrNs
zLegacySpecifier._coerce_version)�prospectiver5rcCs||�|�kS)N)rN)rrhr5rrr�_compare_equal
szLegacySpecifier._compare_equalcCs||�|�kS)N)rN)rrhr5rrr�_compare_not_equal
sz"LegacySpecifier._compare_not_equalcCs||�|�kS)N)rN)rrhr5rrr�_compare_less_than_equalsz(LegacySpecifier._compare_less_than_equalcCs||�|�kS)N)rN)rrhr5rrr�_compare_greater_than_equalsz+LegacySpecifier._compare_greater_than_equalcCs||�|�kS)N)rN)rrhr5rrr�_compare_less_thansz"LegacySpecifier._compare_less_thancCs||�|�kS)N)rN)rrhr5rrr�_compare_greater_thansz%LegacySpecifier._compare_greater_than)r4N)rrr�
_regex_str�re�compile�VERBOSE�
IGNORECASEr3r2r*rr-r?rZrrNrirjrkrlrmrn�
__classcell__rr)rBrr\�s"	r\�	Specifier)�fnrcs&t���dtttd��fdd��}|S)Nru)rrhr5rcst|t�sdS�|||�S)NF)rHr)rrhr5)rvrr�wrapped"s
z)_require_version_compare.<locals>.wrapped)�	functools�wrapsr[r*r-)rvrwr)rvr�_require_version_comparesrzc	@seZdZdZe�dedejejB�Zdddddd	d
dd�Z	e
eee
d
�dd��Ze
eee
d
�dd��Ze
eee
d
�dd��Ze
eee
d
�dd��Ze
eee
d
�dd��Ze
eee
d�dd��Ze
eee
d�dd��Zeee
d
�dd�Zee
d�d d!��Zeje
d"d#�d$d!��Zd"S)%rua
        (?P<operator>(~=|==|!=|<=|>=|<|>|===))
        (?P<version>
            (?:
                # The identity operators allow for an escape hatch that will
                # do an exact string match of the version you wish to install.
                # This will not be parsed by PEP 440 and we cannot determine
                # any semantic meaning from it. This operator is discouraged
                # but included entirely as an escape hatch.
                (?<====)  # Only match for the identity operator
                \s*
                [^\s]*    # We just match everything, except for whitespace
                          # since we are only testing for strict identity.
            )
            |
            (?:
                # The (non)equality operators allow for wild card and local
                # versions to be specified so we have to define these two
                # operators separately to enable that.
                (?<===|!=)            # Only match for equals and not equals

                \s*
                v?
                (?:[0-9]+!)?          # epoch
                [0-9]+(?:\.[0-9]+)*   # release
                (?:                   # pre release
                    [-_\.]?
                    (a|b|c|rc|alpha|beta|pre|preview)
                    [-_\.]?
                    [0-9]*
                )?
                (?:                   # post release
                    (?:-[0-9]+)|(?:[-_\.]?(post|rev|r)[-_\.]?[0-9]*)
                )?

                # You cannot use a wild card and a dev or local version
                # together so group them with a | and make them optional.
                (?:
                    (?:[-_\.]?dev[-_\.]?[0-9]*)?         # dev release
                    (?:\+[a-z0-9]+(?:[-_\.][a-z0-9]+)*)? # local
                    |
                    \.\*  # Wild card syntax of .*
                )?
            )
            |
            (?:
                # The compatible operator requires at least two digits in the
                # release segment.
                (?<=~=)               # Only match for the compatible operator

                \s*
                v?
                (?:[0-9]+!)?          # epoch
                [0-9]+(?:\.[0-9]+)+   # release  (We have a + instead of a *)
                (?:                   # pre release
                    [-_\.]?
                    (a|b|c|rc|alpha|beta|pre|preview)
                    [-_\.]?
                    [0-9]*
                )?
                (?:                                   # post release
                    (?:-[0-9]+)|(?:[-_\.]?(post|rev|r)[-_\.]?[0-9]*)
                )?
                (?:[-_\.]?dev[-_\.]?[0-9]*)?          # dev release
            )
            |
            (?:
                # All other operators only allow a sub set of what the
                # (non)equality operators do. Specifically they do not allow
                # local versions to be specified nor do they allow the prefix
                # matching wild cards.
                (?<!==|!=|~=)         # We have special cases for these
                                      # operators so we want to make sure they
                                      # don't match here.

                \s*
                v?
                (?:[0-9]+!)?          # epoch
                [0-9]+(?:\.[0-9]+)*   # release
                (?:                   # pre release
                    [-_\.]?
                    (a|b|c|rc|alpha|beta|pre|preview)
                    [-_\.]?
                    [0-9]*
                )?
                (?:                                   # post release
                    (?:-[0-9]+)|(?:[-_\.]?(post|rev|r)[-_\.]?[0-9]*)
                )?
                (?:[-_\.]?dev[-_\.]?[0-9]*)?          # dev release
            )
        )
        z^\s*z\s*$�
compatibler]r^r_r`rarb�	arbitrary)z~=z==z!=z<=z>=r@rcz===)rhr5rcCsJd�tt�tt|���dd��}|d7}|�d�||�oH|�d�||�S)N�.���z.*z>=z==)�join�list�	itertools�	takewhile�_is_not_suffix�_version_splitrM)rrhr5�prefixrrr�_compare_compatible�s
zSpecifier._compare_compatiblec	Csz|�d�rVt|j�}t|dd��}tt|��}|dt|��}t||�\}}||kSt|�}|jsnt|j�}||kSdS)Nz.*���)�endswithr�publicr�r*�len�_pad_version�local)	rrhr5�
split_spec�split_prospective�shortened_prospective�padded_spec�padded_prospective�spec_versionrrrri�s


zSpecifier._compare_equalcCs|�||�S)N)ri)rrhr5rrrrj�szSpecifier._compare_not_equalcCst|j�t|�kS)N)rr�)rrhr5rrrrk�sz"Specifier._compare_less_than_equalcCst|j�t|�kS)N)rr�)rrhr5rrrrl�sz%Specifier._compare_greater_than_equal)rh�spec_strrcCs<t|�}||ksdS|js8|jr8t|j�t|j�kr8dSdS)NFT)rrP�base_version)rrhr�r5rrrrm�szSpecifier._compare_less_thancCs^t|�}||ksdS|js8|jr8t|j�t|j�kr8dS|jdk	rZt|j�t|j�krZdSdS)NFT)r�is_postreleaser�r�)rrhr�r5rrrrns
zSpecifier._compare_greater_thancCst|���t|���kS)N)r*�lower)rrhr5rrr�_compare_arbitrary%szSpecifier._compare_arbitrary)rcCsR|jdk	r|jS|j\}}|dkrN|dkr@|�d�r@|dd�}t|�jrNdSdS)N)z==z>=z<=z~=z===z==z.*r�TF)r=r<r�rrP)rr7r8rrrr"(s


zSpecifier.prereleasesN)r#rcCs
||_dS)N)r=)rr#rrrr"As)rrrrorprqrrrsr3r2rzr[r*r-r�rirjrkrlrmrnrr�rXr"r/rrrrru+s<]'z^([0-9]+)((?:a|b|c|rc)[0-9]+)$)r8rcCsDg}x:|�d�D],}t�|�}|r2|�|���q|�|�qW|S)Nr})�split�
_prefix_regexr9�extend�groupsrR)r8�resultr$r>rrrr�Is
r�)�segmentrcst�fdd�dD��S)Nc3s|]}��|�VqdS)N)�
startswith)�.0r�)r�rr�	<genexpr>Vsz!_is_not_suffix.<locals>.<genexpr>)�dev�a�b�rc�post)�any)r�r)r�rr�Tsr�)�left�rightrc
Cs�gg}}|�tt�dd�|���|�tt�dd�|���|�|t|d�d��|�|t|d�d��|�ddgtdt|d�t|d���|�ddgtdt|d�t|d���ttj|��ttj|��fS)NcSs|��S)N)�isdigit)�xrrr�<lambda>^�z_pad_version.<locals>.<lambda>cSs|��S)N)r�)r�rrrr�_r�rr
�0)rRr�r�r�r��insert�max�chain)r�r��
left_split�right_splitrrrr�Zs
,,r�c@s
eZdZd#eeedd�dd�Zed�dd�Zed�d	d
�Ze	d�dd�Z
edefdd
�dd�Ze
ed
�dd�Ze	d�dd�Zeed�dd�Zeeed�dd��Zejedd�dd��Zeed�dd�Zd$eeeed�dd�Zd%eeeeeed �d!d"�ZdS)&�SpecifierSetr4N)�
specifiersr"rc	Csrdd�|�d�D�}t�}xB|D]:}y|�t|��Wq tk
rX|�t|��Yq Xq Wt|�|_||_dS)NcSsg|]}|��r|���qSr)r;)r��srrr�
<listcomp>ssz)SpecifierSet.__init__.<locals>.<listcomp>�,)	r��set�addrurr\�	frozenset�_specsr=)rr�r"�split_specifiers�parsed�	specifierrrrr?ms

zSpecifierSet.__init__)rcCs.|jdk	rd|j��nd}dt|��|�d�S)Nz, prereleases=r4z<SpecifierSet(z)>)r=r"r*)rrCrrrrD�szSpecifierSet.__repr__cCsd�tdd�|jD���S)Nr�css|]}t|�VqdS)N)r*)r�r�rrrr��sz'SpecifierSet.__str__.<locals>.<genexpr>)r�sortedr�)rrrrr�szSpecifierSet.__str__cCs
t|j�S)N)rGr�)rrrrr�szSpecifierSet.__hash__)r rcCs�t|t�rt|�}nt|t�s"tSt�}t|j|jB�|_|jdkrX|jdk	rX|j|_n<|jdk	rv|jdkrv|j|_n|j|jkr�|j|_ntd��|S)NzFCannot combine SpecifierSets with True and False prerelease overrides.)rHr*r�rIr�r�r=�
ValueError)rr r�rrr�__and__�s





zSpecifierSet.__and__cCs6t|ttf�rtt|��}nt|t�s*tS|j|jkS)N)rHr*r1r�rIr�)rr rrrr!�s

zSpecifierSet.__eq__cCs
t|j�S)N)r�r�)rrrr�__len__�szSpecifierSet.__len__cCs
t|j�S)N)�iterr�)rrrr�__iter__�szSpecifierSet.__iter__cCs.|jdk	r|jS|jsdStdd�|jD��S)Ncss|]}|jVqdS)N)r")r�r�rrrr��sz+SpecifierSet.prereleases.<locals>.<genexpr>)r=r�r�)rrrrr"�s

zSpecifierSet.prereleases)r#rcCs
||_dS)N)r=)rr#rrrr"�s)r$rcCs
|�|�S)N)r%)rr$rrrrO�szSpecifierSet.__contains__)r$r"rcsLt�ttf�st����dkr$|j��s2�jr2dSt��fdd�|jD��S)NFc3s|]}|j��d�VqdS))r"N)r%)r�r�)r$r"rrr��sz(SpecifierSet.contains.<locals>.<genexpr>)rHrrrr"rP�allr�)rr$r"r)r$r"rr%�s
zSpecifierSet.contains)r&r"rcCs�|dkr|j}|jr:x |jD]}|j|t|�d�}qW|Sg}g}xX|D]P}t|ttf�sdt|�}n|}t|t�rtqH|jr�|s�|s�|�	|�qH|�	|�qHW|s�|r�|dkr�|S|SdS)N)r")
r"r�r'r-rHrrrrPrR)rr&r"r5�filteredrTr$rVrrrr'�s*



zSpecifierSet.filter)r4N)N)N)rrrr*rr-r?rDrr+rrr�r,r!r�rr1r�rXr"r/rZrOr%rrr'rrrrr�ls$
	
r�)+r(rxr�rpre�typingrrrrrrrr	r
rr�utilsrr8rrrr[r*rZrr-rYr�r�ABCMetarr1r\rzrurqr�r�r�r�r�rrrr�<module>s443
=

*