HEX
Server: LiteSpeed
System: Linux kapuas.iixcp.rumahweb.net 5.14.0-427.42.1.el9_4.x86_64 #1 SMP PREEMPT_DYNAMIC Fri Nov 1 14:58:02 EDT 2024 x86_64
User: mirz4654 (1666)
PHP: 8.1.33
Disabled: system,exec,escapeshellarg,escapeshellcmd,passthru,proc_close,proc_get_status,proc_nice,proc_open,proc_terminate,shell_exec,popen,pclose,dl,pfsockopen,leak,apache_child_terminate,posix_kill,posix_mkfifo,posix_setsid,posix_setuid,posix_setpgid,ini_alter,show_source,define_syslog_variables,symlink,syslog,openlog,openlog,closelog,ocinumcols,listen,chgrp,apache_note,apache_setenv,debugger_on,debugger_off,ftp_exec,dll,ftp,myshellexec,socket_bind,mail,posix_getwpuid
Upload Files
File: //lib/python3.9/site-packages/ansible/utils/__pycache__/version.cpython-39.pyc
a

�)g��@s|ddlmZmZmZeZddlZddlmZm	Z	ddl
mZejdej
d�ZGdd�d�ZGd	d
�d
�ZGdd�de	�ZdS)
�)�absolute_import�division�print_functionN)�LooseVersion�Version)�	text_typea�
    ^
        (?P<major>0|[1-9]\d*)
        \.
        (?P<minor>0|[1-9]\d*)
        \.
        (?P<patch>0|[1-9]\d*)
        (?:
            -
            (?P<prerelease>
                (?:0|[1-9]\d*|\d*[a-zA-Z-][0-9a-zA-Z-]*)
                (?:\.(?:0|[1-9]\d*|\d*[a-zA-Z-][0-9a-zA-Z-]*))*
            )
        )?
        (?:
            \+
            (?P<buildmetadata>[0-9a-zA-Z-]+(?:\.[0-9a-zA-Z-]+)*)
        )?
    $
    )�flagsc@sPeZdZdZdd�Zdd�Zdd�Zdd	�Zd
d�Zdd
�Z	dd�Z
dd�ZdS)�_Alphaz�Class to easily allow comparing strings

    Largely this exists to make comparing an integer and a string on py3
    so that it works like py2.
    cCs
||_dS�N)�	specifier��selfr�r�9/usr/lib/python3.9/site-packages/ansible/utils/version.py�__init__0sz_Alpha.__init__cCs
t|j�Sr
��reprr�r
rrr�__repr__3sz_Alpha.__repr__cCs.t|t�r|j|jkSt|t�r*|j|kSdS�NF)�
isinstancer	r�str�r
�otherrrr�__eq__6s



z
_Alpha.__eq__cCs|�|�Sr
�rrrrr�__ne__>sz
_Alpha.__ne__cCs@t|t�r|j|jkSt|t�r*|j|kSt|t�r8dSt�dSr)rr	rr�_Numeric�
ValueErrorrrrr�__lt__As



z
_Alpha.__lt__cCs|�|�p|�|�Sr
�rrrrrr�__le__Ksz
_Alpha.__le__cCs|�|�Sr
�r!rrrr�__gt__Nsz
_Alpha.__gt__cCs|�|�Sr
�rrrrr�__ge__Qsz
_Alpha.__ge__N��__name__�
__module__�__qualname__�__doc__rrrrrr!r#r%rrrrr	*s
r	c@sPeZdZdZdd�Zdd�Zdd�Zdd	�Zd
d�Zdd
�Z	dd�Z
dd�ZdS)rz�Class to easily allow comparing numbers

    Largely this exists to make comparing an integer and a string on py3
    so that it works like py2.
    cCst|�|_dSr
)�intrrrrrr[sz_Numeric.__init__cCs
t|j�Sr
rrrrrr^sz_Numeric.__repr__cCs.t|t�r|j|jkSt|t�r*|j|kSdSr)rrrr+rrrrras



z_Numeric.__eq__cCs|�|�Sr
rrrrrrisz_Numeric.__ne__cCs@t|t�r|j|jkSt|t�r*|j|kSt|t�r8dSt�dS)NT)rrrr+r	rrrrrrls



z_Numeric.__lt__cCs|�|�p|�|�Sr
r rrrrr!vsz_Numeric.__le__cCs|�|�Sr
r"rrrrr#ysz_Numeric.__gt__cCs|�|�Sr
r$rrrrr%|sz_Numeric.__ge__Nr&rrrrrUs
rc@s�eZdZdZeZddd�Zdd�Zedd��Z	d	d
�Z
edd��Zed
d��Z
edd��Zdd�Zdd�Zdd�Zdd�Zdd�Zdd�Zdd�ZdS) �SemanticVersionzwVersion comparison class that implements Semantic Versioning 2.0.0

    Based off of ``distutils.version.Version``
    NcCs6||_d|_d|_d|_d|_d|_|r2|�|�dS)Nr)�vstring�major�minor�patch�
prerelease�
buildmetadata�parse)r
r-rrrr�szSemanticVersion.__init__cCs
d|jS)NzSemanticVersion(%r))r-rrrrr�szSemanticVersion.__repr__c	Cst|t�std|��z|jdd�}WntyFtd|��Yn0d}dD]6}z|�|�}WntyxYqPYqP0||krP|}qP|d|�}|r�tdd�|D��ttf�kr�td|��t�	d|j
�}|d	gdt|�}td
d�
dd�|D��|�r
|�d	�nd
f�S)z�This method is designed to take a ``LooseVersion``
        and attempt to construct a ``SemanticVersion`` from it

        This is useful where you want to do simple version math
        without requiring users to provide a compliant semver.
        z%r is not a LooseVersionN�)�-�+css|]}t|�VqdSr
)�type��.0�vrrr�	<genexpr>��z5SemanticVersion.from_loose_version.<locals>.<genexpr>zNon integer values in %rz[+-].+$rz%s%s�.css|]}t|�VqdSr
)rr8rrrr;�r<�)rrr�version�AttributeError�index�setr+�re�searchr-�lenr,�join�group)Z
loose_versionr?Z	extra_idxZmarker�idxZextrarrr�from_loose_version�s2

 ��z"SemanticVersion.from_loose_versioncCs�t�|�}|std|��|�ddddd�\}}}}}t|�|_t|�|_t|�|_|rrtdd�|�	d	�D��|_
|r�td
d�|�	d	�D��|_dS)Nzinvalid semantic version '%s'��r4��css&|]}|��rt|�nt|�VqdSr
��isdigitrr	�r9�xrrrr;�r<z(SemanticVersion.parse.<locals>.<genexpr>r=css&|]}|��rt|�nt|�VqdSr
rNrPrrrr;�r<)�	SEMVER_RE�matchrrGr+r.r/r0�tuple�splitr1r2)r
r-rSr.r/r0r1r2rrrr3�s



zSemanticVersion.parsecCs|j|j|jfSr
)r.r/r0rrrr�core�szSemanticVersion.corecCs
t|j�Sr
)�boolr1rrrr�
is_prerelease�szSemanticVersion.is_prereleasecCs|jdkp|jS�Nr)r.rXrrrr�	is_stable�szSemanticVersion.is_stablecCs�t|t�rt|�}|j|jkr2|j|jkr.dSdSt|j|jf�sFdS|jrV|jsVdS|jsf|jrfdS|j|jkrvdS|j|jkr�dSdS)N���rJr)rrr,rV�anyr1rrrr�_cmp�s"
zSemanticVersion._cmpcCs|�|�dkSrY�r]rrrrrszSemanticVersion.__eq__cCs|�|�Sr
rrrrrrszSemanticVersion.__ne__cCs|�|�dkSrYr^rrrrrszSemanticVersion.__lt__cCs|�|�dkSrYr^rrrrr!	szSemanticVersion.__le__cCs|�|�dkSrYr^rrrrr#szSemanticVersion.__gt__cCs|�|�dkSrYr^rrrrr%szSemanticVersion.__ge__)N)r'r(r)r*rRZ
version_rerr�staticmethodrIr3�propertyrVrXrZr]rrrr!r#r%rrrrr,�s(

(


#r,)Z
__future__rrrr7Z
__metaclass__rCZ#ansible.module_utils.compat.versionrrZansible.module_utils.sixr�compile�XrRr	rr,rrrr�<module>s�++