403Webshell
Server IP : 192.158.238.246  /  Your IP : 18.222.25.95
Web Server : LiteSpeed
System : Linux uniform.iwebfusion.net 4.18.0-553.27.1.lve.1.el8.x86_64 #1 SMP Wed Nov 20 15:58:00 UTC 2024 x86_64
User : jenniferflocom ( 1321)
PHP Version : 8.1.32
Disable Function : NONE
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : ON  |  Sudo : OFF  |  Pkexec : OFF
Directory :  /opt/alt/python37/lib/python3.7/site-packages/packaging/__pycache__/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /opt/alt/python37/lib/python3.7/site-packages/packaging/__pycache__/specifiers.cpython-37.pyc
B

N�Xym�@s�ddlmZmZmZddlZddlZddlZddlZddlm	Z	m
Z
ddlmZm
Z
mZGdd�de�ZGdd	�d	e
eje��ZGd
d�de�ZGdd
�d
e�Zdd�ZGdd�de�Ze�d�Zdd�Zdd�ZGdd�de�ZdS)�)�absolute_import�division�print_functionN�)�string_types�with_metaclass)�Version�
LegacyVersion�parsec@seZdZdZdS)�InvalidSpecifierzH
    An invalid specifier was found, users should refer to PEP 440.
    N)�__name__�
__module__�__qualname__�__doc__�rr�E/opt/alt/python37/lib/python3.7/site-packages/packaging/specifiers.pyrsrc@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.
        Nr)rrrr�__hash__szBaseSpecifier.__hash__cCsdS)zq
        Returns a boolean representing whether or not the two Specifier like
        objects are equal.
        Nr)r�otherrrr�__eq__$szBaseSpecifier.__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�prereleases2szBaseSpecifier.prereleasescCsdS)zd
        Sets whether or not pre-releases as a whole are allowed by this
        specifier.
        Nr)r�valuerrrr9sNcCsdS)zR
        Determines if the given item is contained within this specifier.
        Nr)r�itemrrrr�contains@szBaseSpecifier.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�iterablerrrr�filterFszBaseSpecifier.filter)N)N)rr
r�abc�abstractmethodrrrr�abstractpropertyr�setterrrrrrrrsrc@s�eZdZiZd dd�Zdd�Zdd�Zd	d
�Zdd�Zd
d�Z	dd�Z
dd�Zedd��Z
edd��Zedd��Zejdd��Zdd�Zd!dd�Zd"dd�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__Rsz_IndividualSpecifier.__init__cCs0|jdk	rd�|j�nd}d�|jjt|�|�S)Nz, prereleases={0!r}r$z<{0}({1!r}{2})>)r-r)r�	__class__r�str)r�prerrr�__repr___sz_IndividualSpecifier.__repr__cCsdj|j�S)Nz{0}{1})r)r,)rrrrrlsz_IndividualSpecifier.__str__cCs
t|j�S)N)�hashr,)rrrrrosz_IndividualSpecifier.__hash__cCsLt|t�r0y|�|�}Wq@tk
r,tSXnt||j�s@tS|j|jkS)N)�
isinstancerr1r�NotImplementedr,)rrrrrrrs
z_IndividualSpecifier.__eq__cCsLt|t�r0y|�|�}Wq@tk
r,tSXnt||j�s@tS|j|jkS)N)r6rr1rr7r,)rrrrrr}s
z_IndividualSpecifier.__ne__cCst|d�|j|��S)Nz_compare_{0})�getattrr)�
_operators)r�oprrr�
_get_operator�sz"_IndividualSpecifier._get_operatorcCst|ttf�st|�}|S)N)r6r	rr
)rr&rrr�_coerce_version�sz$_IndividualSpecifier._coerce_versioncCs
|jdS)Nr)r,)rrrrr%�sz_IndividualSpecifier.operatorcCs
|jdS)Nr)r,)rrrrr&�sz_IndividualSpecifier.versioncCs|jS)N)r-)rrrrr�sz _IndividualSpecifier.prereleasescCs
||_dS)N)r-)rrrrrr�scCs
|�|�S)N)r)rrrrr�__contains__�sz!_IndividualSpecifier.__contains__cCs:|dkr|j}|�|�}|jr&|s&dS|�|j�||j�S)NF)rr<�
is_prereleaser;r%r&)rrrrrrr�s

z_IndividualSpecifier.containsccs�d}g}d|dk	r|ndi}xJ|D]B}|�|�}|j|f|�r"|jrZ|sZ|jsZ|�|�q"d}|Vq"W|s�|r�x|D]
}|VqvWdS)NFrT)r<rr>r�append)rrr�yielded�found_prereleases�kwr&�parsed_versionrrrr�s




z_IndividualSpecifier.filter)r$N)N)N)rr
rr9r0r4rrrrr;r<�propertyr%r&rr"r=rrrrrrr#Ns 



r#c@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.
        )
        z^\s*z\s*$�equal�	not_equal�less_than_equal�greater_than_equal�	less_than�greater_than)z==z!=z<=z>=�<�>cCst|t�stt|��}|S)N)r6r	r2)rr&rrrr<�s
zLegacySpecifier._coerce_versioncCs||�|�kS)N)r<)r�prospectiver.rrr�_compare_equal�szLegacySpecifier._compare_equalcCs||�|�kS)N)r<)rrNr.rrr�_compare_not_equal�sz"LegacySpecifier._compare_not_equalcCs||�|�kS)N)r<)rrNr.rrr�_compare_less_than_equal�sz(LegacySpecifier._compare_less_than_equalcCs||�|�kS)N)r<)rrNr.rrr�_compare_greater_than_equalsz+LegacySpecifier._compare_greater_than_equalcCs||�|�kS)N)r<)rrNr.rrr�_compare_less_thansz"LegacySpecifier._compare_less_thancCs||�|�kS)N)r<)rrNr.rrr�_compare_greater_thansz%LegacySpecifier._compare_greater_thanN)rr
r�
_regex_str�re�compile�VERBOSE�
IGNORECASEr'r9r<rOrPrQrRrSrTrrrrrE�s 
rEcst����fdd��}|S)Ncst|t�sdS�|||�S)NF)r6r)rrNr.)�fnrr�wrappeds
z)_require_version_compare.<locals>.wrapped)�	functools�wraps)rZr[r)rZr�_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
            )
        )
        z^\s*z\s*$�
compatiblerFrGrHrIrJrK�	arbitrary)z~=z==z!=z<=z>=rLrMz===cCsNd�tt�dd�t|���dd��}|d7}|�d�||�oL|�d�||�S)N�.cSs|�d�o|�d�S)N�post�dev)�
startswith)�xrrr�<lambda>�sz/Specifier._compare_compatible.<locals>.<lambda>���z.*z>=z==)�join�list�	itertools�	takewhile�_version_splitr;)rrNr.�prefixrrr�_compare_compatible�s
zSpecifier._compare_compatiblecCsp|�d�rPt|j�}t|dd��}tt|��}|dt|��}t||�\}}nt|�}|jsht|j�}||kS)Nz.*���)�endswithr�publicrmr2�len�_pad_version�local)rrNr.rrrrO�s


zSpecifier._compare_equalcCs|�||�S)N)rO)rrNr.rrrrP�szSpecifier._compare_not_equalcCs|t|�kS)N)r)rrNr.rrrrQ�sz"Specifier._compare_less_than_equalcCs|t|�kS)N)r)rrNr.rrrrR�sz%Specifier._compare_greater_than_equalcCs<t|�}||ksdS|js8|jr8t|j�t|j�kr8dSdS)NFT)rr>�base_version)rrNr.rrrrS�szSpecifier._compare_less_thancCs^t|�}||ksdS|js8|jr8t|j�t|j�kr8dS|jdk	rZt|j�t|j�krZdSdS)NFT)r�is_postreleaservru)rrNr.rrrrT�s
zSpecifier._compare_greater_thancCst|���t|���kS)N)r2�lower)rrNr.rrr�_compare_arbitraryszSpecifier._compare_arbitrarycCsR|jdk	r|jS|j\}}|dkrN|dkr@|�d�r@|dd�}t|�jrNdSdS)N)z==z>=z<=z~=z===z==z.*rpTF)r-r,rqr
r>)rr%r&rrrrs


zSpecifier.prereleasescCs
||_dS)N)r-)rrrrrrsN)rr
rrUrVrWrXrYr'r9r^rorOrPrQrRrSrTryrDrr"rrrrr_s*^#r_z^([0-9]+)((?:a|b|c|rc)[0-9]+)$cCsDg}x:|�d�D],}t�|�}|r2|�|���q|�|�qW|S)Nrb)�split�
_prefix_regexr(�extend�groupsr?)r&�resultrr/rrrrm's
rmc
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)rfrrrrg6�z_pad_version.<locals>.<lambda>cSs|��S)N)r)rfrrrrg7r�rr�0)r?rjrkrlrs�insert�max�chain)�left�right�
left_split�right_splitrrrrt2s
&&rtc@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)!�SpecifierSetr$Nc	Csrdd�|�d�D�}t�}xB|D]:}y|�t|��Wq tk
rX|�t|��Yq Xq Wt|�|_||_dS)NcSsg|]}|��r|���qSr)r+)�.0�srrr�
<listcomp>Rsz)SpecifierSet.__init__.<locals>.<listcomp>�,)	rz�set�addr_rrE�	frozenset�_specsr-)r�
specifiersr�parsed�	specifierrrrr0Os

zSpecifierSet.__init__cCs*|jdk	rd�|j�nd}d�t|�|�S)Nz, prereleases={0!r}r$z<SpecifierSet({0!r}{1})>)r-r)rr2)rr3rrrr4dszSpecifierSet.__repr__cCsd�tdd�|jD���S)Nr�css|]}t|�VqdS)N)r2)r�r�rrr�	<genexpr>nsz'SpecifierSet.__str__.<locals>.<genexpr>)ri�sortedr�)rrrrrmszSpecifierSet.__str__cCs
t|j�S)N)r5r�)rrrrrpszSpecifierSet.__hash__cCs�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.)r6rr�r7r�r�r-�
ValueError)rrr�rrr�__and__ss





zSpecifierSet.__and__cCsFt|t�rt|�}n&t|t�r,tt|��}nt|t�s:tS|j|jkS)N)r6rr�r#r2r7r�)rrrrrr�s



zSpecifierSet.__eq__cCsFt|t�rt|�}n&t|t�r,tt|��}nt|t�s:tS|j|jkS)N)r6rr�r#r2r7r�)rrrrrr�s



zSpecifierSet.__ne__cCs
t|j�S)N)rsr�)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��any)rrrrr�s

zSpecifierSet.prereleasescCs
||_dS)N)r-)rrrrrr�scCs
|�|�S)N)r)rrrrrr=�szSpecifierSet.__contains__csLt�ttf�st����dkr$|j��s2�jr2dSt��fdd�|jD��S)NFc3s|]}|j��d�VqdS))rN)r)r�r�)rrrrr��sz(SpecifierSet.contains.<locals>.<genexpr>)r6r	rr
rr>�allr�)rrrr)rrrr�s
zSpecifierSet.containscCs�|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)
rr�r�boolr6r	rr
r>r?)rrrr.�filteredrArrCrrrr�s*



zSpecifierSet.filter)r$N)N)N)rr
rr0r4rrr�rrr�r�rDrr"r=rrrrrrr�Ms
	


r�)�
__future__rrrrr\rkrV�_compatrrr&rr	r
r�r�ABCMeta�objectrr#rEr^r_rWr{rmrtr�rrrr�<module>s&9	4	


Youez - 2016 - github.com/yon3zu
LinuXploit