403Webshell
Server IP : 127.0.0.1  /  Your IP : 216.73.216.109
Web Server : Apache/2.4.54 (Win64) OpenSSL/1.1.1q PHP/8.1.10
System : Windows NT DESKTOP-E5T4RUN 10.0 build 19045 (Windows 10) AMD64
User : SERVERWEB ( 0)
PHP Version : 8.1.10
Disable Function : NONE
MySQL : OFF |  cURL : ON |  WGET : OFF |  Perl : OFF |  Python : OFF |  Sudo : OFF |  Pkexec : OFF
Directory :  C:/cygwin64/lib/python3.7/site-packages/pip/_vendor/packaging/__pycache__/

Upload File :
current_dir [ Writeable] document_root [ Writeable]

 

Command :


[ Back ]     

Current File : C:/cygwin64/lib/python3.7/site-packages/pip/_vendor/packaging/__pycache__/specifiers.cpython-37.pyc
B

�N�a�x�@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)Zboundc@seZdZdZdS)�InvalidSpecifierzH
    An invalid specifier was found, users should refer to PEP 440.
    N)�__name__�
__module__�__qualname__�__doc__�rr�D/usr/lib/python3.7/site-packages/pip/_vendor/packaging/specifiers.pyr!src@s�eZdZejed�dd��Zejed�dd��Zeje	e
d�dd��Zeje	e
d�d	d
��Zej
ee
d�dd��Zeje
d
d�dd��Zejdeee
e
d�dd��Zejdeeee
eed�dd��Zd
S)�
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)rrrrr�__eq__5szBaseSpecifier.__eq__cCsdS)zu
        Returns a boolean representing whether or not the two Specifier like
        objects are not equal.
        Nr)rrrrr�__ne__<szBaseSpecifier.__ne__cCsdS)zg
        Returns whether or not pre-releases as a whole are allowed by this
        specifier.
        Nr)rrrr�prereleasesCszBaseSpecifier.prereleasesN)�valuercCsdS)zd
        Sets whether or not pre-releases as a whole are allowed by this
        specifier.
        Nr)rr#rrrr"Js)�itemr"rcCsdS)zR
        Determines if the given item is contained within this specifier.
        Nr)rr$r"rrr�containsQszBaseSpecifier.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�filterWszBaseSpecifier.filter)N)N)rrr�abc�abstractmethod�strr�intr�object�boolr r!�abstractpropertyrr"�setterr%rrr'rrrrr's"r)�	metaclassc@sbeZdZUiZeeefed<eeed<d-eee	dd�dd�Z
ed�d	d
�Zed�dd�Ze
eeefd�d
d��Zed�dd�Zee	d�dd�Zee	d�dd�Zeed�dd�Zeed�dd�Ze
ed�dd��Ze
ed�dd��Ze
ee	d�d d!��Zeje	dd"�d#d!��Zee	d$�d%d&�Zd.eee	e	d'�d(d)�Zd/e e!ee	e e!d*�d+d,�Z"dS)0�_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__fsz_IndividualSpecifier.__init__)rcCs0|jdk	rd|j��nd}d�|jjt|�|�S)Nz, prereleases=r4z<{}({!r}{})>)r=r"�format�	__class__rr*)r�prerrr�__repr__ssz_IndividualSpecifier.__repr__cCsdj|j�S)Nz{}{})r@r<)rrrrr|sz_IndividualSpecifier.__str__cCs|jdt|jd�fS)Nrr
)r<r)rrrr�_canonical_specsz$_IndividualSpecifier._canonical_speccCs
t|j�S)N)�hashrD)rrrrr�sz_IndividualSpecifier.__hash__)rrcCsPt|t�r4y|�t|��}WqDtk
r0tSXnt||j�sDtS|j|jkS)N)�
isinstancer*rAr�NotImplementedrD)rrrrrr �s
z_IndividualSpecifier.__eq__cCsPt|t�r4y|�t|��}WqDtk
r0tSXnt||j�sDtS|j|jkS)N)rFr*rArrGr<)rrrrrr!�s
z_IndividualSpecifier.__ne__)�oprcCst|d|j|���}|S)NZ	_compare_)�getattrr2)rrH�operator_callablerrr�
_get_operator�sz"_IndividualSpecifier._get_operator)r8rcCst|ttf�st|�}|S)N)rFrrr)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"rL�
is_prereleaserKr7r8)rr$r"Znormalized_itemrJrrrr%�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)rLr%rNr"�append)rr&r"Zyielded�found_prereleases�kwr8�parsed_versionrrrr'�s




z_IndividualSpecifier.filter)r4N)N)N)#rrrr2rr*�__annotations__rrr-r?rCr�propertyr
rDr+rr,r r!�CallableOperatorrK�UnparsedVersion�
ParsedVersionrLr7r8r"r/rMr%rrr'rrrrr1as2

	
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>=�<�>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")rArrr?szLegacySpecifier.__init__)r8rcCst|t�stt|��}|S)N)rFrr*)rr8rrrrLs
zLegacySpecifier._coerce_version)�prospectiver5rcCs||�|�kS)N)rL)rrer5rrr�_compare_equalszLegacySpecifier._compare_equalcCs||�|�kS)N)rL)rrer5rrr�_compare_not_equalsz"LegacySpecifier._compare_not_equalcCs||�|�kS)N)rL)rrer5rrr�_compare_less_than_equal"sz(LegacySpecifier._compare_less_than_equalcCs||�|�kS)N)rL)rrer5rrr�_compare_greater_than_equal%sz+LegacySpecifier._compare_greater_than_equalcCs||�|�kS)N)rL)rrer5rrr�_compare_less_than*sz"LegacySpecifier._compare_less_thancCs||�|�kS)N)rL)rrer5rrr�_compare_greater_than-sz%LegacySpecifier._compare_greater_than)r4N)rrr�
_regex_str�re�compile�VERBOSE�
IGNORECASEr3r2r*rr-r?rVrrLrfrgrhrirjrk�
__classcell__rr)rArrX�s"	rX�	Specifier)�fnrcs&t���dtttd��fdd��}|S)Nrr)rrer5rcst|t�sdS�|||�S)NF)rFr)rrer5)rsrr�wrapped4s
z)_require_version_compare.<locals>.wrapped)�	functools�wrapsrWr*r-)rsrtr)rsr�_require_version_compare1srwc	@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)%rra
        (?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*$Z
compatiblerYrZr[r\r]r^Z	arbitrary)z~=z==z!=z<=z>=r_r`z===)rer5rcCsJd�tt�tt|���dd��}|d7}|�d�||�oH|�d�||�S)N�.���z.*z>=z==)�join�list�	itertools�	takewhile�_is_not_suffix�_version_splitrK)rrer5�prefixrrr�_compare_compatible�s
zSpecifier._compare_compatiblec	Csz|�d�rVt|j�}t|dd��}tt|��}|dt|��}t||�\}}||kSt|�}|jsnt|j�}||kSdS)Nz.*���)�endswithr�publicrr*�len�_pad_version�local)	rrer5Z
split_specZsplit_prospectiveZshortened_prospectiveZpadded_specZpadded_prospectiveZspec_versionrrrrf�s


zSpecifier._compare_equalcCs|�||�S)N)rf)rrer5rrrrg�szSpecifier._compare_not_equalcCst|j�t|�kS)N)rr�)rrer5rrrrh�sz"Specifier._compare_less_than_equalcCst|j�t|�kS)N)rr�)rrer5rrrri�sz%Specifier._compare_greater_than_equal)re�spec_strrcCs<t|�}||ksdS|js8|jr8t|j�t|j�kr8dSdS)NFT)rrN�base_version)rrer�r5rrrrj�szSpecifier._compare_less_thancCs^t|�}||ksdS|js8|jr8t|j�t|j�kr8dS|jdk	rZt|j�t|j�krZdSdS)NFT)rZis_postreleaser�r�)rrer�r5rrrrks
zSpecifier._compare_greater_thancCst|���t|���kS)N)r*�lower)rrer5rrr�_compare_arbitrary7szSpecifier._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�rrN)rr7r8rrrr":s


zSpecifier.prereleasesN)r#rcCs
||_dS)N)r=)rr#rrrr"Ss)rrrrlrmrnrorpr3r2rwrWr*r-r�rfrgrhrirjrkrr�rTr"r/rrrrrr=s<]'z^([0-9]+)((?:a|b|c|rc)[0-9]+)$)r8rcCsDg}x:|�d�D],}t�|�}|r2|�|���q|�|�qW|S)Nrx)�split�
_prefix_regexr9�extend�groupsrO)r8�resultr$r>rrrr[s
r)�segmentrcst�fdd�dD��S)Nc3s|]}��|�VqdS)N)�
startswith)�.0r�)r�rr�	<genexpr>hsz!_is_not_suffix.<locals>.<genexpr>)Zdev�a�bZrcZpost)�any)r�r)r�rr~fsr~)�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>p�z_pad_version.<locals>.<lambda>cSs|��S)N)r�)r�rrrr�qr�rr
�0)rOr{r|r}r��insert�max�chain)r�r�Z
left_splitZright_splitrrrr�ls
,,r�c@seZdZd%eeedd�dd�Zed�dd�Zed�d	d
�Ze	d�dd�Z
edefdd
�dd�Ze
ed
�dd�Ze
ed
�dd�Ze	d�dd�Zeed�dd�Zeeed�dd��Zejedd�dd��Zeed�dd�Zd&eeeed�d d!�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>�sz)SpecifierSet.__init__.<locals>.<listcomp>�,)	r��set�addrrrrX�	frozenset�_specsr=)rr�r"Zsplit_specifiersZparsed�	specifierrrrr?s

zSpecifierSet.__init__)rcCs*|jdk	rd|j��nd}d�t|�|�S)Nz, prereleases=r4z<SpecifierSet({!r}{})>)r=r"r@r*)rrBrrrrC�szSpecifierSet.__repr__cCsd�tdd�|jD���S)Nr�css|]}t|�VqdS)N)r*)r�r�rrrr��sz'SpecifierSet.__str__.<locals>.<genexpr>)rz�sortedr�)rrrrr�szSpecifierSet.__str__cCs
t|j�S)N)rEr�)rrrrr�szSpecifierSet.__hash__)rrcCs�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.)rFr*r�rGr�r�r=�
ValueError)rrr�rrr�__and__�s





zSpecifierSet.__and__cCs6t|ttf�rtt|��}nt|t�s*tS|j|jkS)N)rFr*r1r�rGr�)rrrrrr �s

zSpecifierSet.__eq__cCs6t|ttf�rtt|��}nt|t�s*tS|j|jkS)N)rFr*r1r�rGr�)rrrrrr!�s

zSpecifierSet.__ne__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$rrrrM�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>)rFrrrr"rN�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-rFrrrrNrO)rr&r"r5ZfilteredrPr$rRrrrr'	s*



zSpecifierSet.filter)r4N)N)N)rrrr*rr-r?rCrr+rrr�r,r r!r�rr1r�rTr"r/rVrMr%rrr'rrrrr�~s&
	
r�)+r(rur|rmrb�typingrrrrrrrr	r
rrZutilsrr8rrrrWr*rVrr-rUr�r�ABCMetarr1rXrwrrrnr�rr~r�r�rrrr�<module>s44:=

*

Youez - 2016 - github.com/yon3zu
LinuXploit