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.6/site-packages/pip/_vendor/packaging/__pycache__/

Upload File :
current_dir [ Writeable] document_root [ Writeable]

 

Command :


[ Back ]     

Current File : C:/cygwin64/lib/python3.6/site-packages/pip/_vendor/packaging/__pycache__/specifiers.cpython-36.pyc
3

�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$ej%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� /usr/lib/python3.6/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@sZeZdZUiZeeefeed+eee	dd�dd�Z
ed�dd�Zed�d	d
�Ze
eeefd�dd��Zed�d
d�Zee	d�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-e e!ee	e e!d(�d)d*�Z"dS).�_IndividualSpecifier�N)�specr"rcCsH|jj|�}|s td|�d���|jd�j�|jd�j�f|_||_dS)NzInvalid specifier: '�'�operator�version)�_regex�searchr�group�strip�_spec�_prereleases)rr3r"�matchrrr�__init__fsz_IndividualSpecifier.__init__)rcCs0|jdk	rd|j��nd}dj|jjt|�|�S)Nz, prereleases=r2z<{}({!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)�hashrC)rrrrr�sz_IndividualSpecifier.__hash__)rrcCsPt|t�r4y|jt|��}WqDtk
r0tSXnt||j�sDtS|j|jkS)N)�
isinstancer*r@r�NotImplementedrC)rrrrrr �s
z_IndividualSpecifier.__eq__cCsPt|t�r4y|jt|��}WqDtk
r0tSXnt||j�sDtS|j|jkS)N)rEr*r@rrFr;)rrrrrr!�s
z_IndividualSpecifier.__ne__)�oprcCst|d|j|���}|S)NZ	_compare_)�getattr�
_operators)rrG�operator_callablerrr�
_get_operator�sz"_IndividualSpecifier._get_operator)r6rcCst|ttf�st|�}|S)N)rErrr)rr6rrr�_coerce_version�sz$_IndividualSpecifier._coerce_versioncCs
|jdS)Nr)r;)rrrrr5�sz_IndividualSpecifier.operatorcCs
|jdS)Nr
)r;)rrrrr6�sz_IndividualSpecifier.versioncCs|jS)N)r<)rrrrr"�sz _IndividualSpecifier.prereleases)r#rcCs
||_dS)N)r<)rr#rrrr"�s)r$rcCs
|j|�S)N)r%)rr$rrr�__contains__�sz!_IndividualSpecifier.__contains__)r$r"rcCs@|dkr|j}|j|�}|jr(|r(dS|j|j�}|||j�S)NF)r"rL�
is_prereleaserKr5r6)rr$r"Znormalized_itemrJrrrr%�s
z_IndividualSpecifier.contains)r&r"rccs�d}g}d|dk	r|ndi}xL|D]D}|j|�}|j|f|�r"|jr\|pL|jr\|j|�q"d}|Vq"W|r�|r�x|D]
}|VqzWdS)NFr"T)rLr%rNr"�append)rr&r"Zyielded�found_prereleases�kwr6�parsed_versionrrrr'�s




z_IndividualSpecifier.filter)r2N)N)N)#rrrrIrr*rr7rr-r>rBr�propertyr
rCr+rr,r r!�CallableOperatorrK�UnparsedVersion�
ParsedVersionrLr5r6r"r/rMr%rrr'rrrrr1as2

	
r1cs�eZdZdZejdedejejB�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>=�<�>r2N)r3r"rcst�j||�tjdt�dS)NzZCreating a LegacyVersion has been deprecated and will be removed in the next major release)�superr>�warnings�warn�DeprecationWarning)rr3r")r@rrr>szLegacySpecifier.__init__)r6rcCst|t�stt|��}|S)N)rErr*)rr6rrrrLs
zLegacySpecifier._coerce_version)�prospectiver3rcCs||j|�kS)N)rL)rrdr3rrr�_compare_equalszLegacySpecifier._compare_equalcCs||j|�kS)N)rL)rrdr3rrr�_compare_not_equalsz"LegacySpecifier._compare_not_equalcCs||j|�kS)N)rL)rrdr3rrr�_compare_less_than_equal"sz(LegacySpecifier._compare_less_than_equalcCs||j|�kS)N)rL)rrdr3rrr�_compare_greater_than_equal%sz+LegacySpecifier._compare_greater_than_equalcCs||j|�kS)N)rL)rrdr3rrr�_compare_less_than*sz"LegacySpecifier._compare_less_thancCs||j|�kS)N)rL)rrdr3rrr�_compare_greater_than-sz%LegacySpecifier._compare_greater_than)r2N)rrr�
_regex_str�re�compile�VERBOSE�
IGNORECASEr7rIr*rr-r>rUrrLrerfrgrhrirj�
__classcell__rr)r@rrW�s"	rW�	Specifier)�fnrcs&tj��dtttd��fdd��}|S)Nrq)rrdr3rcst|t�sdS�|||�S)NF)rEr)rrdr3)rrrr�wrapped4s
z)_require_version_compare.<locals>.wrapped)�	functools�wrapsrVr*r-)rrrsr)rrr�_require_version_compare1srvc	@seZdZdZejdedejejB�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)%rqa
        (?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
compatiblerXrYrZr[r\r]Z	arbitrary)z~=z==z!=z<=z>=r^r_z===)rdr3rcCsJdjttjtt|���dd��}|d7}|jd�||�oH|jd�||�S)N�.r
z.*z>=z==���)�join�list�	itertools�	takewhile�_is_not_suffix�_version_splitrK)rrdr3�prefixrrr�_compare_compatible�s
zSpecifier._compare_compatiblec	Csz|jd�rVt|j�}t|dd��}tt|��}|dt|��}t||�\}}||kSt|�}|jsnt|j�}||kSdS)Nz.*����)�endswithr�publicr~r*�len�_pad_version�local)	rrdr3Z
split_specZsplit_prospectiveZshortened_prospectiveZpadded_specZpadded_prospectiveZspec_versionrrrre�s


zSpecifier._compare_equalcCs|j||�S)N)re)rrdr3rrrrf�szSpecifier._compare_not_equalcCst|j�t|�kS)N)rr�)rrdr3rrrrg�sz"Specifier._compare_less_than_equalcCst|j�t|�kS)N)rr�)rrdr3rrrrh�sz%Specifier._compare_greater_than_equal)rd�spec_strrcCs>t|�}||ksdS|jr:|jr:t|j�t|j�kr:dSdS)NFT)rrN�base_version)rrdr�r3rrrri�szSpecifier._compare_less_thancCs`t|�}||ksdS|jr:|jr:t|j�t|j�kr:dS|jdk	r\t|j�t|j�kr\dSdS)NFT)rZis_postreleaser�r�)rrdr�r3rrrrjs
zSpecifier._compare_greater_thancCst|�j�t|�j�kS)N)r*�lower)rrdr3rrr�_compare_arbitrary7szSpecifier._compare_arbitrary)rcCsR|jdk	r|jS|j\}}|d
krN|dkr@|jd�r@|dd�}t|�jrNdSd	S)N�==�>=�<=�~=�===z.*r�TF)r�r�r�r�r�r�)r<r;r�rrN)rr5r6rrrr":s


zSpecifier.prereleasesN)r#rcCs
||_dS)N)r<)rr#rrrr"Ss)rrrrkrlrmrnror7rIrvrVr*r-r�rerfrgrhrirjrr�rSr"r/rrrrrq=s<]'z^([0-9]+)((?:a|b|c|rc)[0-9]+)$)r6rcCsDg}x:|jd�D],}tj|�}|r2|j|j��q|j|�qW|S)Nrw)�split�
_prefix_regexr8�extend�groupsrO)r6�resultr$r=rrrr~[s
r~)�segmentrcst�fdd�dD��S)	Nc3s|]}�j|�VqdS)N)�
startswith)�.0r)r�rr�	<genexpr>hsz!_is_not_suffix.<locals>.<genexpr>�dev�a�b�rc�post)r�r�r�r�r�)�any)r�r)r�rr}fsr})�left�rightrc	Cs�gg}}|jttjdd�|���|jttjdd�|���|j|t|d�d��|j|t|d�d��|jddgtdt|d�t|d���|jddgtdt|d�t|d���ttj|��ttj|��fS)NcSs|j�S)N)�isdigit)�xrrr�<lambda>psz_pad_version.<locals>.<lambda>cSs|j�S)N)r�)r�rrrr�qsrr
�0)rOrzr{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)(�SpecifierSetr2N)�
specifiersr"rcCsrdd�|jd�D�}t�}xB|D]:}y|jt|��Wq tk
rX|jt|��Yq Xq Wt|�|_||_dS)NcSsg|]}|j�r|j��qSr)r:)r��srrr�
<listcomp>�sz)SpecifierSet.__init__.<locals>.<listcomp>�,)	r��set�addrqrrW�	frozenset�_specsr<)rr�r"Zsplit_specifiersZparsed�	specifierrrrr>s

zSpecifierSet.__init__)rcCs*|jdk	rd|j��nd}djt|�|�S)Nz, prereleases=r2z<SpecifierSet({!r}{})>)r<r"r?r*)rrArrrrB�szSpecifierSet.__repr__cCsdjtdd�|jD���S)Nr�css|]}t|�VqdS)N)r*)r�r�rrrr��sz'SpecifierSet.__str__.<locals>.<genexpr>)ry�sortedr�)rrrrr�szSpecifierSet.__str__cCs
t|j�S)N)rDr�)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.)rEr*r�rFr�r�r<�
ValueError)rrr�rrr�__and__�s




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

zSpecifierSet.__eq__cCs6t|ttf�rtt|��}nt|t�s*tS|j|jkS)N)rEr*r1r�rFr�)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
|j|�S)N)r%)rr$rrrrM�szSpecifierSet.__contains__)r$r"rcsNt�ttf�st����dkr$|j��r4�jr4dSt��fdd�|jD��S)NFc3s|]}|j��d�VqdS))r"N)r%)r�r�)r$r"rrr�sz(SpecifierSet.contains.<locals>.<genexpr>)rErrrr"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}xZ|D]R}t|ttf�sdt|�}n|}t|t�rtqH|jr�|r�|s�|j	|�qH|j	|�qHW|r�|r�|dkr�|S|SdS)N)r")
r"r�r'r-rErrrrNrO)rr&r"r3ZfilteredrPr$rRrrrr'	s*


zSpecifierSet.filter)r2N)N)N)rrrr*rr-r>rBrr+rrr�r,r r!r�rr1r�rSr"r/rUrMr%rrr'rrrrr�~s&
	
r�)+r(rtr{rlraZtypingrrrrrrrr	r
rrZutilsrr6rrrrVr*rUrr-rTr�r�ABCMetarr1rWrvrqrmr�r~r}r�r�rrrr�<module>s44:=

*

Youez - 2016 - github.com/yon3zu
LinuXploit