403Webshell
Server IP : 80.87.202.40  /  Your IP : 216.73.216.169
Web Server : Apache
System : Linux rospirotorg.ru 5.14.0-539.el9.x86_64 #1 SMP PREEMPT_DYNAMIC Thu Dec 5 22:26:13 UTC 2024 x86_64
User : bitrix ( 600)
PHP Version : 8.2.27
Disable Function : NONE
MySQL : OFF |  cURL : ON |  WGET : ON |  Perl : ON |  Python : OFF |  Sudo : ON |  Pkexec : ON
Directory :  /lib/python3.9/site-packages/setuptools/_vendor/packaging/__pycache__/

Upload File :
current_dir [ Writeable] document_root [ Writeable]

 

Command :


[ Back ]     

Current File : /lib/python3.9/site-packages/setuptools/_vendor/packaging/__pycache__/specifiers.cpython-39.pyc
a

�D�f�|�@sXddlmZmZmZddlZddlZddlZddlZddlm	Z	m
Z
ddlmZddl
mZddlmZmZmZer�ddlmZmZmZmZmZmZmZmZmZeeefZeeeefZeeege fZ!Gd	d
�d
e"�Z#Gdd�de
ej$e%��Z&Gd
d�de&�Z'Gdd�de'�Z(dd�Z)Gdd�de'�Z*e�+d�Z,dd�Z-dd�Z.Gdd�de&�Z/dS)�)�absolute_import�division�print_functionN�)�string_types�with_metaclass)�
TYPE_CHECKING)�canonicalize_version)�Version�
LegacyVersion�parse)	�List�Dict�Union�Iterable�Iterator�Optional�Callable�Tuple�	FrozenSetc@seZdZdZdS)�InvalidSpecifierzH
    An invalid specifier was found, users should refer to PEP 440.
    N)�__name__�
__module__�__qualname__�__doc__�rr�K/usr/lib/python3.9/site-packages/setuptools/_vendor/packaging/specifiers.pyr"src@s�eZdZejdd��Zejdd��Zejdd��Zejdd��Zej	d	d
��Z
e
jdd
��Z
ejdd
d��Zejddd��Z
dS)�
BaseSpecifiercCsdS)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.
        Nrrrrr�__hash__1szBaseSpecifier.__hash__cCsdS)zq
        Returns a boolean representing whether or not the two Specifier like
        objects are equal.
        Nr�r�otherrrr�__eq__8szBaseSpecifier.__eq__cCsdS)zu
        Returns a boolean representing whether or not the two Specifier like
        objects are not equal.
        Nrr"rrr�__ne__@szBaseSpecifier.__ne__cCsdS)zg
        Returns whether or not pre-releases as a whole are allowed by this
        specifier.
        Nrrrrr�prereleasesHszBaseSpecifier.prereleasescCsdS)zd
        Sets whether or not pre-releases as a whole are allowed by this
        specifier.
        Nr�r�valuerrrr&PsNcCsdS)zR
        Determines if the given item is contained within this specifier.
        Nr�r�itemr&rrr�containsXszBaseSpecifier.containscCsdS)z�
        Takes an iterable of items and filters them so that only items which
        are contained within this specifier are allowed in it.
        Nr)r�iterabler&rrr�filter_szBaseSpecifier.filter)N)N)rrr�abc�abstractmethodr r!r$r%�abstractpropertyr&�setterr+r-rrrrr(s 





rc@s�eZdZiZd"dd�Zdd�Zdd�Zed	d
��Zdd�Z	d
d�Z
dd�Zdd�Zdd�Z
edd��Zedd��Zedd��Zejdd��Zdd�Zd#dd�Zd$d d!�ZdS)%�_IndividualSpecifier�NcCsF|j�|�}|std�|���|�d���|�d���f|_||_dS)NzInvalid specifier: '{0}'�operator�version)�_regex�searchr�format�group�strip�_spec�_prereleases)r�specr&�matchrrr�__init__ls�z_IndividualSpecifier.__init__cCs0|jdurd�|j�nd}d�|jjt|�|�S)N�, prereleases={0!r}r3z<{0}({1!r}{2})>)r<r8r&�	__class__r�str�rZprerrr�__repr__zs
��z_IndividualSpecifier.__repr__cCsdj|j�S)Nz{0}{1})r8r;rrrrr �sz_IndividualSpecifier.__str__cCs|jdt|jd�fS)Nrr)r;r	rrrr�_canonical_spec�sz$_IndividualSpecifier._canonical_speccCs
t|j�S�N)�hashrErrrrr!�sz_IndividualSpecifier.__hash__cCsRt|t�r6z|�t|��}WqFty2tYS0nt||j�sFtS|j|jkSrF)�
isinstancerrArBr�NotImplementedrEr"rrrr$�s
z_IndividualSpecifier.__eq__cCsRt|t�r6z|�t|��}WqFty2tYS0nt||j�sFtS|j|jkSrF)rHrrArBrrIr;r"rrrr%�s
z_IndividualSpecifier.__ne__cCst|d�|j|��}|S)Nz_compare_{0})�getattrr8�
_operators)r�op�operator_callablerrr�
_get_operator�s�z"_IndividualSpecifier._get_operatorcCst|ttf�st|�}|SrF)rHrr
r�rr5rrr�_coerce_version�sz$_IndividualSpecifier._coerce_versioncCs
|jdS)Nr�r;rrrrr4�sz_IndividualSpecifier.operatorcCs
|jdS)NrrQrrrrr5�sz_IndividualSpecifier.versioncCs|jSrF�r<rrrrr&�sz _IndividualSpecifier.prereleasescCs
||_dSrFrRr'rrrr&�scCs
|�|�SrF�r+�rr*rrr�__contains__�sz!_IndividualSpecifier.__contains__cCs>|dur|j}|�|�}|jr&|s&dS|�|j�}|||j�S�NF)r&rP�
is_prereleaserNr4r5)rr*r&Znormalized_itemrMrrrr+�s

z_IndividualSpecifier.containsccs�d}g}d|dur|ndi}|D]F}|�|�}|j|fi|��r |jr\|s\|js\|�|�q d}|Vq |s�|r�|D]
}|VqtdS)NFr&T)rPr+rWr&�append)rr,r&�yielded�found_prereleases�kwr5�parsed_versionrrrr-�s"
��z_IndividualSpecifier.filter)r3N)N)N)rrrrKr?rDr �propertyrEr!r$r%rNrPr4r5r&r1rUr+r-rrrrr2hs,







r2c@sveZdZdZe�dedejejB�Zdddddd	d
�Z	dd�Z
d
d�Zdd�Zdd�Z
dd�Zdd�Zdd�ZdS)�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.
        )
        �^\s*�\s*$�equal�	not_equal�less_than_equal�greater_than_equal�	less_than�greater_than)�==�!=�<=�>=�<�>cCst|t�stt|��}|SrF)rHrrBrOrrrrP s
zLegacySpecifier._coerce_versioncCs||�|�kSrF�rP�r�prospectiver=rrr�_compare_equal&szLegacySpecifier._compare_equalcCs||�|�kSrFrmrnrrr�_compare_not_equal*sz"LegacySpecifier._compare_not_equalcCs||�|�kSrFrmrnrrr�_compare_less_than_equal.sz(LegacySpecifier._compare_less_than_equalcCs||�|�kSrFrmrnrrr�_compare_greater_than_equal2sz+LegacySpecifier._compare_greater_than_equalcCs||�|�kSrFrmrnrrr�_compare_less_than6sz"LegacySpecifier._compare_less_thancCs||�|�kSrFrmrnrrr�_compare_greater_than:sz%LegacySpecifier._compare_greater_thanN)rrr�
_regex_str�re�compile�VERBOSE�
IGNORECASEr6rKrPrprqrrrsrtrurrrrr^s �	r^cst����fdd��}|S)Ncst|t�sdS�|||�SrV)rHr
rn��fnrr�wrappedCs
z)_require_version_compare.<locals>.wrapped)�	functools�wraps)r|r}rr{r�_require_version_compare?sr�c	@s�eZdZdZe�dedejejB�Zdddddd	d
dd�Z	e
d
d��Ze
dd��Ze
dd��Z
e
dd��Ze
dd��Ze
dd��Ze
dd��Zdd�Zedd��Zejdd��Zd S)!�	Specifiera
        (?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
            )
        )
        r_r`Z
compatiblerarbrcrdrerfZ	arbitrary)�~=rgrhrirjrkrl�===cCsNd�tt�dd�t|���dd��}|d7}|�d�||�oL|�d�||�S)N�.cSs|�d�o|�d�S)NZpost�dev)�
startswith��xrrr�<lambda>��z/Specifier._compare_compatible.<locals>.<lambda>����.*rjrg)�join�list�	itertools�	takewhile�_version_splitrN)rror=�prefixrrr�_compare_compatible�s
����
�zSpecifier._compare_compatiblec	Csz|�d�rVt|j�}t|dd��}tt|��}|dt|��}t||�\}}||kSt|�}|jsnt|j�}||kSdS)Nr����)�endswithr
�publicr�rB�len�_pad_version�local)	rror=Z
split_specZsplit_prospectiveZshortened_prospectiveZpadded_specZpadded_prospectiveZspec_versionrrrrp�s

�
zSpecifier._compare_equalcCs|�||�SrF)rprnrrrrq�szSpecifier._compare_not_equalcCst|j�t|�kSrF�r
r�rnrrrrrsz"Specifier._compare_less_than_equalcCst|j�t|�kSrFr�rnrrrrs
sz%Specifier._compare_greater_than_equalcCs<t|�}||ksdS|js8|jr8t|j�t|j�kr8dSdS�NFT)r
rW�base_version�rroZspec_strr=rrrrtszSpecifier._compare_less_thancCs^t|�}||ksdS|js8|jr8t|j�t|j�kr8dS|jdurZt|j�t|j�krZdSdSr�)r
Zis_postreleaser�r�r�rrrru1s
zSpecifier._compare_greater_thancCst|���t|���kSrF)rB�lowerrnrrr�_compare_arbitraryRszSpecifier._compare_arbitrarycCsR|jdur|jS|j\}}|dvrN|dkr@|�d�r@|dd�}t|�jrNdSdS)N)rgrjrir�r�rgr�r�TF)r<r;r�rrW)rr4r5rrrr&Vs


zSpecifier.prereleasescCs
||_dSrFrRr'rrrr&psN)rrrrvrwrxryrzr6rKr�r�rprqrrrsrtrur�r]r&r1rrrrr�Ms<]�

(




 
r�z^([0-9]+)((?:a|b|c|rc)[0-9]+)$cCs@g}|�d�D],}t�|�}|r0|�|���q|�|�q|S)Nr�)�split�
_prefix_regexr7�extend�groupsrX)r5�resultr*r>rrrr�ys
r�c
Cs�gg}}|�tt�dd�|���|�tt�dd�|���|�|t|d�d��|�|t|d�d��|�ddgtdt|d�t|d���|�ddgtdt|d�t|d���ttj|��ttj|��fS)NcSs|��SrF��isdigitr�rrrr��r�z_pad_version.<locals>.<lambda>cSs|��SrFr�r�rrrr��r�rr�0)rXr�r�r�r��insert�max�chain)�left�rightZ
left_splitZright_splitrrrr��s
,,r�c@s�eZdZddd�Zdd�Zdd�Zd	d
�Zdd�Zd
d�Zdd�Z	dd�Z
dd�Zedd��Z
e
jdd��Z
dd�Zddd�Zd dd�ZdS)!�SpecifierSetr3Nc	Csldd�|�d�D�}t�}|D]8}z|�t|��WqtyT|�t|��Yq0qt|�|_||_dS)NcSsg|]}|��r|���qSr)r:��.0�srrr�
<listcomp>�r�z)SpecifierSet.__init__.<locals>.<listcomp>�,)	r��set�addr�rr^�	frozenset�_specsr<)rZ
specifiersr&Zsplit_specifiers�parsed�	specifierrrrr?�s
zSpecifierSet.__init__cCs*|jdurd�|j�nd}d�t|�|�S)Nr@r3z<SpecifierSet({0!r}{1})>)r<r8r&rBrCrrrrD�s
��zSpecifierSet.__repr__cCsd�tdd�|jD���S)Nr�css|]}t|�VqdSrF)rBr�rrr�	<genexpr>�r�z'SpecifierSet.__str__.<locals>.<genexpr>)r��sortedr�rrrrr �szSpecifierSet.__str__cCs
t|j�SrF)rGr�rrrrr!�szSpecifierSet.__hash__cCs�t|t�rt|�}nt|t�s"tSt�}t|j|jB�|_|jdurX|jdurX|j|_n<|jdurv|jdurv|j|_n|j|jkr�|j|_ntd��|S)NzFCannot combine SpecifierSets with True and False prerelease overrides.)rHrr�rIr�r�r<�
ValueError)rr#r�rrr�__and__�s 





�zSpecifierSet.__and__cCs6t|ttf�rtt|��}nt|t�s*tS|j|jkSrF�rHrr2r�rBrIr�r"rrrr$�s

zSpecifierSet.__eq__cCs6t|ttf�rtt|��}nt|t�s*tS|j|jkSrFr�r"rrrr%�s

zSpecifierSet.__ne__cCs
t|j�SrF)r�r�rrrr�__len__�szSpecifierSet.__len__cCs
t|j�SrF)�iterr�rrrr�__iter__�szSpecifierSet.__iter__cCs.|jdur|jS|jsdStdd�|jD��S)Ncss|]}|jVqdSrF�r&r�rrrr�r�z+SpecifierSet.prereleases.<locals>.<genexpr>)r<r��anyrrrrr&�s

zSpecifierSet.prereleasescCs
||_dSrFrRr'rrrr&scCs
|�|�SrFrSrTrrrrUszSpecifierSet.__contains__csLt�ttf�st����dur$|j��s2�jr2dSt��fdd�|jD��S)NFc3s|]}|j��d�VqdS)r�NrSr��r*r&rrr�*r�z(SpecifierSet.contains.<locals>.<genexpr>)rHrr
rr&rW�allr�r)rr�rr+s
zSpecifierSet.containscCs�|dur|j}|jr6|jD]}|j|t|�d�}q|Sg}g}|D]P}t|ttf�s^t|�}n|}t|t�rnqB|jr�|s�|s�|�	|�qB|�	|�qB|s�|r�|dur�|S|SdS)Nr�)
r&r�r-�boolrHrr
rrWrX)rr,r&r=ZfilteredrZr*r\rrrr-,s*




zSpecifierSet.filter)r3N)N)N)rrrr?rDr r!r�r$r%r�r�r]r&r1rUr+r-rrrrr��s"

		


�r�)0Z
__future__rrrr.r~r�rwZ_compatrrZ_typingrZutilsr	r5r
rr�typingr
rrrrrrrrZ
ParsedVersionrBZUnparsedVersionr�ZCallableOperatorr�r�ABCMeta�objectrr2r^r�r�rxr�r�r�r�rrrr�<module>s4,@ 8+


Youez - 2016 - github.com/yon3zu
LinuXploit