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 :  /lib64/python3.9/site-packages/mercurial/__pycache__/

Upload File :
current_dir [ Writeable] document_root [ Writeable]

 

Command :


[ Back ]     

Current File : /lib64/python3.9/site-packages/mercurial/__pycache__/pycompat.cpython-39.opt-1.pyc
a

�+�bTA�@s$dZddlmZddlZddlZddlZddlZddlZddlZddl	Z	ej
ddkZdejvZ
dZe�sxddlZejZes�ddlZddlZddlZddlZddlZddlZddlmZd	d
�ZeZn^ddlZddl mZddl!m"Zddl#m$ZddlZddlZddlZddl%m$Zdd
�ZejZdd
�Z&dd�Z'dd�Z(e�r�ddlZddl)Z)ddl*Z*ddl+Z+ddl,Z,ej-dk�r�ej
dk�r�e�.�ej/Z/ej0Z0ej1�2d�Z3ej4�2d�Z5ej-�2d�Z6ej7�2d�Z8ej9�2d�Z:ej;�2d�Z<ej=Z>e>�r�e>�2d�Z>ej?�2d�Z@ejA�2d�ZBejCZDeD�r"e�/eD�ZDe+jEZFeFZGdd�ZHdd�ZIdd�ZJeKZLejMZNeOZPeQedd�du�r�ej-dk�r�dd�ejRD�ZSndd�ejRD�ZSe,�Td�jUZVd jWZXGd!d"�d"eY�ZZd#d$�Z[d%d&�Z\d'd(�Z]d)d*�Z^d+d,�Z_d-d.�Z`d/d0�Zad1d2�Zbd3d4�Zcecejd�ZdecejQ�ZQeceje�Zeecejf�ZfejgZheiZjdgd7d8�Zkeceje�Zld9d:�Zmd;d<�Znd=d>�Zodhd@dA�ZpdBdC�ZqdDdC�Zrej
ddE�dk�r�dFdG�ZsdHdI�ZtnejuZt�nddlvZvehZhejZjewZVexZXeiZZeyZ[e&Z\e&Z]e&Z^e&Z_e&Z`ekZkedZdeQZQeeZeefZfezdJ�dKdL�Z/e&Z0dMd2�Zbe{�Z|dNdO�ZldPd:�Zme&Zne&Zoej1Z3ej4Z5ej-Z6ej7Z8ej9Z:ej;Z<ej=Z>ej?Z@ePZPeQedd�du�rrejRZSejAZBejCZDej}Zpevj~ZFeFZGeZHegZIe�ZJe�ZLejNZNdQdC�ZqdRdC�ZrejuZteB��dS�Z�eB��dT�Z�eB��dU�Z�e6dVkZ�e6dWkZ�dXdY�Z�dZd[�Z�did^d_�Z�djd`da�Z�dkdbdc�Z�dldedf�Z�dS)mzwMercurial portability shim for python 3.

This contains aliases to hide python version-specific details from the core.
�)�absolute_importN�Z__pypy__F�)�futurescCs|j|�dS�N)Zset_exception_info��f�exc_info�r
�8/usr/lib64/python3.9/site-packages/mercurial/pycompat.py�future_set_exception_info(srcCs|�|d�dS)Nr)Z
set_exceptionrr
r
rr8scCs|Srr
)�ar
r
r�identity>srcsf|dur|St|tttf�r6t|��fdd�|D��St|t�r^t|��fdd�|��D��S�|�S)Nc3s|]}t�|�VqdSr��_rapply)�.0�x�rr
r�	<genexpr>G�z_rapply.<locals>.<genexpr>c3s&|]\}}t�|�t�|�fVqdSrr�r�k�vrr
rrIr)�
isinstance�list�set�tuple�type�dict�items�rZxsr
rrrBs
rcCs|tur|St||�S)a�Apply function recursively to every item preserving the data structure

    >>> def f(x):
    ...     return 'f(%s)' % x
    >>> rapply(f, None) is None
    True
    >>> rapply(f, 'a')
    'f(a)'
    >>> rapply(f, {'a'}) == {'f(a)'}
    True
    >>> rapply(f, ['a', 'b', None, {'c': 'd'}, []])
    ['f(a)', 'f(b)', None, {'f(c)': 'f(d)'}, []]

    >>> xs = [object()]
    >>> rapply(identity, xs) is xs
    True
    )rrr r
r
r�rapplyMsr!�nt)r��asciicGstt|��Sr)r�map��argsr
r
r�maplist�sr(cGstt|��Sr)r�ranger&r
r
r�	rangelist�sr*cGstt|��Sr)r�zipr&r
r
r�ziplist�sr,�argvcCsg|]}|�dd��qS)�mbcs�ignore��encode�rr
r
r
r�
<listcomp>�rr3cCsg|]}t|��qSr
)�fsencoder2r
r
rr3�rz>Bs%rc@s@eZdZdZerddd�Zddd�Zdd�Zd	d
�Zdd�Z	d
S)�bytestra�A bytes which mostly acts as a Python 2 str

        >>> bytestr(), bytestr(bytearray(b'foo')), bytestr(u'ascii'), bytestr(1)
        ('', 'foo', 'ascii', '1')
        >>> s = bytestr(b'foo')
        >>> assert s is bytestr(s)

        __bytes__() should be called if provided:

        >>> class bytesable(object):
        ...     def __bytes__(self):
        ...         return b'bytes'
        >>> bytestr(bytesable())
        'bytes'

        There's no implicit conversion from non-ascii str as its encoding is
        unknown:

        >>> bytestr(chr(0x80)) # doctest: +ELLIPSIS
        Traceback (most recent call last):
          ...
        UnicodeEncodeError: ...

        Comparison between bytestr and bytes should work:

        >>> assert bytestr(b'foo') == b'foo'
        >>> assert b'foo' == bytestr(b'foo')
        >>> assert b'f' in bytestr(b'foo')
        >>> assert bytestr(b'f') in b'foo'

        Sliced elements should be bytes, not integer:

        >>> s[1], s[:2]
        (b'o', b'fo')
        >>> list(s), list(reversed(s))
        ([b'f', b'o', b'o'], [b'o', b'o', b'f'])

        As bytestr type isn't propagated across operations, you need to cast
        bytes to bytestr explicitly:

        >>> s = bytestr(b'foo').upper()
        >>> t = bytestr(s)
        >>> s[0], t[0]
        (70, b'F')

        Be careful to not pass a bytestr object to a function which expects
        bytearray-like behavior.

        >>> t = bytes(t)  # cast to bytes
        >>> assert type(t) is bytes
        rcCsdSrr
)�self�sr
r
r�__init__�szbytestr.__init__cCs@t|t�r|St|ttf�s4t|d�s4t|��d�}t�||�S)N�	__bytes__r$)rr5�bytes�	bytearray�hasattr�strr1�__new__)�clsr7r
r
rr>�s
���zbytestr.__new__cCs"t�||�}t|t�st|�}|Sr)r:�__getitem__r�bytechr)r6�keyr7r
r
rr@�s
zbytestr.__getitem__cCstt�|��Sr)�iterbytestrr:�__iter__�r6r
r
rrD�szbytestr.__iter__cCst�|�dd�S)Nr)r:�__repr__rEr
r
rrF�szbytestr.__repr__N)r)r)
�__name__�
__module__�__qualname__�__doc__�
TYPE_CHECKINGr8r>r@rDrFr
r
r
rr5�s8

r5cCs
tt|�S)z4Iterate bytes as if it were a str object of Python 2)r%rA�r7r
r
rrCsrCcCst|t�rt|�S|S)zPromote bytes to bytestr)rr:r5rLr
r
r�maybebytestrs
rMcCst|t�r|S|�d�S)z�Convert an internal str (e.g. keyword, __doc__) back to bytes

        This never raises UnicodeEncodeError, but only ASCII characters
        can be round-trip by sysstr(sysbytes(s)).
        �utf-8)rr:r1rLr
r
r�sysbytess
rOcCst|tj�r|S|�d�S)a8Return a keyword str to be passed to Python functions such as
        getattr() and str.encode()

        This never raises UnicodeDecodeError. Non-ascii characters are
        considered invalid and mapped to arbitrary but unique code points
        such that 'sysstr(a) != sysstr(b)' for all 'a != b'.
        �latin-1)r�builtinsr=�decoderLr
r
r�sysstrsrScCst|t�r|�d�S|S)z Converts a bytes url back to strr$)rr:rR��urlr
r
r�strurl"s

rVcCst|t�r|�d�S|S)z0Converts a str url to bytes by encoding in asciir$)rr=r1rTr
r
r�bytesurl(s

rWcCs|�|��dS)z(Raise exception with the given tracebackN)�with_traceback)�exc�tbr
r
r�raisewithtb.sr[cCs t|dd�}|dur|St|�S)zTGet docstring as bytes; may be None so gettext() won't confuse it
        with _('')rJN)�getattrrO)�obj�docr
r
r�getdoc2sr_cst����fdd��}|S)Ncs�|t|�g|�R�Sr)rS)�object�namer'rr
r�w;sz_wrapattrfunc.<locals>.w)�	functools�wraps)rrbr
rr�
_wrapattrfunc:sre�r���cCst�|t|�||�Sr)rQ�openrS)ra�mode�	buffering�encodingr
r
rrhIsrhcCsZdd�|D�}|�d�}dd�|D�}||||�\}}dd�|D�}dd�|D�}||fS)a
        Takes bytes arguments, converts them to unicode, pass them to
        getopt.getopt(), convert the returned values back to bytes and then
        return them for Python 3 compatibility as getopt.getopt() don't accepts
        bytes on Python 3.
        cSsg|]}|�d��qS�rP�rRr2r
r
rr3Urz#_getoptbwrapper.<locals>.<listcomp>rPcSsg|]}|�d��qSrlrmr2r
r
rr3WrcSs(g|] }|d�d�|d�d�f�qS)rrPrr0r2r
r
rr3YrcSsg|]}|�d��qSrlr0r2r
r
rr3Zrrm)�origr'�	shortlist�namelistZoptsr
r
r�_getoptbwrapperNs
rqcCsdd�|��D�}|S)z�
        Converts the keys of a python dictonary to str i.e. unicodes so that
        they can be passed as keyword arguments as dictionaries with bytes keys
        can't be passed as keyword arguments to functions on Python 3.
        cSsi|]\}}|�d�|�qSrlrmrr
r
r�
<dictcomp>crzstrkwargs.<locals>.<dictcomp>�r�Zdicr
r
r�	strkwargs]srucCsdd�|��D�}|S)z�
        Converts keys of python dictionaries to bytes as they were converted to
        str to pass that dictonary as a keyword argument on Python 3.
        cSsi|]\}}|�d�|�qSrlr0rr
r
rrrkrzbyteskwargs.<locals>.<dictcomp>rsrtr
r
r�byteskwargsfsrvTcCs"t�|�d�||�}dd�|D�S)z�
        Takes bytes argument, convert it to str i.e. unicodes, pass that into
        shlex.split(), convert the returned value to bytes and return that for
        Python 3 compatibility as shelx.split() don't accept bytes on Python 3.
        rPcSsg|]}|�d��qSrlr0r2r
r
rr3vrzshlexsplit.<locals>.<listcomp>)�shlex�splitrR)r7Zcomments�posix�retr
r
r�
shlexsplitosr{cCs|��Srrs�rr
r
r�<lambda>xrr}cCs|��Sr)�valuesr|r
r
rr}yr�cCs�|j}|tjtjf�rdS|tjtjf�r.dS|tj�r<dSt|�dkr�|ds`|dr\dSdS|ds�|d	sx|d
r|dSdSn$t|�d	kr�|ds�dS|ds�dSd
S)Nzutf-32zutf-16z	utf-8-sig�rrz	utf-16-bez	utf-32-berrz	utf-16-lez	utf-32-lerN)�
startswith�codecs�BOM_UTF32_BE�BOM_UTF32_LE�BOM_UTF16_BE�BOM_UTF16_LE�BOM_UTF8�len)�bZbstartswithr
r
r�_detect_encodings$
r�cOs6t|ttf�r|�t|�d�}tj|g|�Ri|��S)N�
surrogatepass)rr:r;rRr��json�loads)r7r'�kwargsr
r
r�
json_loads�sr�s2def raisewithtb(exc, tb):
    raise exc, None, tb
cCs$t|t�r|Stdt|�j��dS)z�
        Partial backport from os.py in Python 3, which only accepts bytes.
        In Python 2, our paths should only ever be bytes, a unicode path
        indicates a bug.
        zexpect str, not %sN)rr=�	TypeErrorrrG)�filenamer
r
rr4�s
r4cCst|dd�S)NrJ)r\)r]r
r
rr_�scCst||t�tuSr)r\�_notset)�thing�attrr
r
r�safehasattr�sr�cCs||||�Srr
)rnr'rorpr
r
rrq�scCs|��Sr)�	iteritemsr|r
r
rr}�rcCs|��Sr)�
itervaluesr|r
r
rr}�rsjavasdarwinslinuxsposixsntcCsttj|||�Sr)rq�getopt�r'rorpr
r
r�getoptb�sr�cCsttj|||�Sr)rqr�Z
gnu_getoptr�r
r
r�
gnugetoptb�sr�r�tmpcCst�|||�Sr)�tempfile�mkdtemp��suffix�prefix�dirr
r
rr�sr�cCst�|||�Sr)r��mkstempr�r
r
rr�sr�cOs.|durd}nt|�}tj|g|�Ri|��S)Nzw+b)rSr�Z
TemporaryFile)rir'r�r
r
r�unnamedtempfile
sr��w+bcCst|�}tj||||||d�S)N)r�r�r��delete)rSr�ZNamedTemporaryFile)ri�bufsizer�r�r�r�r
r
r�
namedtempfiles�r�)rfrgN)FT)rr�N)rr�N)N)r�rgrr�NT)�rJZ
__future__rr��inspectr��osrw�sysr��version_infoZispy3�builtin_module_namesZispypyrK�globals�typingZ	cookielibZcPickle�pickleZhttplibZQueueZqueueZSocketServerZsocketserverZ	xmlrpclibZthirdparty.concurrentrr�OSError�FileNotFoundErrorrQ�concurrent.futuresZhttp.cookiejarZ	cookiejarZhttp.clientZclientZ
xmlrpc.clientrrr!r�rc�io�structraZ_enablelegacywindowsfsencodingr4�fsdecode�curdirr1Zoscurdir�linesepZ	oslinesepZosname�pathsepZ	ospathsep�pardirZospardir�sepZossep�altsepZosaltsep�devnullZ	osdevnull�platformZsysplatform�
executableZ
sysexecutable�BytesIOZbytesioZstringior(r*r,�inputZrawinputZgetfullargspecZ
getargspec�intZlongr\r-Zsysargv�Struct�packrA�__mod__Zbytereprr:r5rCrMrOrSrVrWr[r_re�delattrr<�setattrr)Zxranger=Zunicoderhr�rqrurvr{r�r�r�r�r�Z	cStringIO�chr�repr�iter�execr`r�rx�StringIOr%r+Z	raw_inputr�ZisjythonZisdarwinZislinuxZisposixZ	iswindowsr�r�r�r�r�r�r
r
r
r�<module>sJ


U






		
	








�

Youez - 2016 - github.com/yon3zu
LinuXploit