HEX
Server: LiteSpeed
System: Linux us-phx-web1284.main-hosting.eu 4.18.0-553.109.1.lve.el8.x86_64 #1 SMP Thu Mar 5 20:23:46 UTC 2026 x86_64
User: u300739242 (300739242)
PHP: 8.2.30
Disabled: system, shell_exec, passthru, mysql_list_dbs, ini_alter, dl, symlink, link, chgrp, leak, popen, apache_child_terminate, virtual, mb_send_mail
Upload Files
File: //opt/alt/python37/lib/python3.7/site-packages/zipp/__pycache__/__init__.cpython-37.pyc
B

XP�e�)�@s�ddlZddlZddlZddlZddlZddlZddlZddlZddlm	Z	dgZ
dd�Zdd�Ze
jZd	d
�ZGdd�d�ZGd
d�deej�ZGdd�de�Zddd�ZGdd�d�ZdS)�N�)�
text_encoding�PathcCst�t|�dd�S)a2
    Given a path with elements separated by
    posixpath.sep, generate all parents of that path.

    >>> list(_parents('b/d'))
    ['b']
    >>> list(_parents('/b/d/'))
    ['/b']
    >>> list(_parents('b/d/f/'))
    ['b/d', 'b']
    >>> list(_parents('b'))
    []
    >>> list(_parents(''))
    []
    rN)�	itertools�islice�	_ancestry)�path�r	�>/opt/alt/python37/lib/python3.7/site-packages/zipp/__init__.py�_parentssrccs8|�tj�}x&|r2|tjkr2|Vt�|�\}}qWdS)aR
    Given a path with elements separated by
    posixpath.sep, generate all elements of that path

    >>> list(_ancestry('b/d'))
    ['b/d', 'b']
    >>> list(_ancestry('/b/d/'))
    ['/b/d', '/b']
    >>> list(_ancestry('b/d/f/'))
    ['b/d/f', 'b/d', 'b']
    >>> list(_ancestry('b'))
    ['b']
    >>> list(_ancestry(''))
    []
    N)�rstrip�	posixpath�sep�split)r�tailr	r	r
r#srcCst�t|�j|�S)zZ
    Return items in minuend not in subtrahend, retaining order
    with O(1) lookup.
    )r�filterfalse�set�__contains__)ZminuendZ
subtrahendr	r	r
�_difference=srcs4eZdZdZ�fdd�Zdd�Z�fdd�Z�ZS)�InitializedStatez?
    Mix-in to save the initialization state for pickling.
    cs||_||_t�j||�dS)N)�_InitializedState__args�_InitializedState__kwargs�super�__init__)�self�args�kwargs)�	__class__r	r
rJszInitializedState.__init__cCs|j|jfS)N)rr)rr	r	r
�__getstate__OszInitializedState.__getstate__cs|\}}t�j||�dS)N)rr)r�staterr)rr	r
�__setstate__RszInitializedState.__setstate__)�__name__�
__module__�__qualname__�__doc__rrr �
__classcell__r	r	)rr
rEsrcsTeZdZdZedd��Z�fdd�Zdd�Zdd	�Z�fd
d�Z	e
dd
��Z�ZS)�CompleteDirsa8
    A ZipFile subclass that ensures that implied directories
    are always included in the namelist.

    >>> list(CompleteDirs._implied_dirs(['foo/bar.txt', 'foo/bar/baz.txt']))
    ['foo/', 'foo/bar/']
    >>> list(CompleteDirs._implied_dirs(['foo/bar.txt', 'foo/bar/baz.txt', 'foo/bar/']))
    ['foo/']
    cCs.tj�tt|��}dd�|D�}tt||��S)Ncss|]}|tjVqdS)N)r
r)�.0�pr	r	r
�	<genexpr>esz-CompleteDirs._implied_dirs.<locals>.<genexpr>)r�chain�
from_iterable�mapr�_deduper)�names�parentsZas_dirsr	r	r
�
_implied_dirsbszCompleteDirs._implied_dirscst���}|t|�|��S)N)r�namelist�listr0)rr.)rr	r
r1hs
zCompleteDirs.namelistcCst|���S)N)rr1)rr	r	r
�	_name_setlszCompleteDirs._name_setcCs,|��}|d}||ko||k}|r(|S|S)zx
        If the name represents a directory, return that name
        as a directory (with the trailing slash).
        �/)r3)r�namer.�dirnameZ	dir_matchr	r	r
�resolve_diroszCompleteDirs.resolve_dircsFyt��|�Stk
r@|�d�r2||��kr4�tj|d�SXdS)z6
        Supplement getinfo for implied dirs.
        r4)�filenameN)r�getinfo�KeyError�endswithr3�zipfile�ZipInfo)rr5)rr	r
r9yszCompleteDirs.getinfocCs:t|t�r|St|tj�s"||�Sd|jkr0t}||_|S)zl
        Given a source (filename or zipfile), return an
        appropriate CompleteDirs subclass.
        �r)�
isinstancer&r<�ZipFile�moder)�cls�sourcer	r	r
�make�s

zCompleteDirs.make)
r!r"r#r$�staticmethodr0r1r3r7r9�classmethodrDr%r	r	)rr
r&Ws	
r&cs,eZdZdZ�fdd�Z�fdd�Z�ZS)�
FastLookupzV
    ZipFile subclass to ensure implicit
    dirs exist and are resolved rapidly.
    c	s*t�t��|jSQRXt���|_|jS)N)�
contextlib�suppress�AttributeErrorZ_FastLookup__namesrr1)r)rr	r
r1�szFastLookup.namelistc	s*t�t��|jSQRXt���|_|jS)N)rHrIrJZ_FastLookup__lookuprr3)r)rr	r
r3�szFastLookup._name_set)r!r"r#r$r1r3r%r	r	)rr
rG�srGcOst|d�||fS)N�)r)�encodingrrr	r	r
�_extract_text_encoding�srMc@seZdZdZdZd=dd�Zdd�Zdd	�Zd>dd�d
d�Ze	dd��Z
e	dd��Ze	dd��Ze	dd��Z
e	dd��Zdd�Zdd�Zdd�Zdd �Zd!d"�Zd#d$�Zd%d&�Zd'd(�Zd)d*�Zd+d,�Zd-d.�Zd/d0�Zd1d2�Zd3d4�Zd5d6�Zd7d8�Zd9d:�ZeZ e	d;d<��Z!dS)?ruD
    A pathlib-compatible interface for zip files.

    Consider a zip file with this structure::

        .
        ├── a.txt
        └── b
            ├── c.txt
            └── d
                └── e.txt

    >>> data = io.BytesIO()
    >>> zf = zipfile.ZipFile(data, 'w')
    >>> zf.writestr('a.txt', 'content of a')
    >>> zf.writestr('b/c.txt', 'content of c')
    >>> zf.writestr('b/d/e.txt', 'content of e')
    >>> zf.filename = 'mem/abcde.zip'

    Path accepts the zipfile object itself or a filename

    >>> root = Path(zf)

    From there, several path operations are available.

    Directory iteration (including the zip file itself):

    >>> a, b = root.iterdir()
    >>> a
    Path('mem/abcde.zip', 'a.txt')
    >>> b
    Path('mem/abcde.zip', 'b/')

    name property:

    >>> b.name
    'b'

    join with divide operator:

    >>> c = b / 'c.txt'
    >>> c
    Path('mem/abcde.zip', 'b/c.txt')
    >>> c.name
    'c.txt'

    Read text:

    >>> c.read_text(encoding='utf-8')
    'content of c'

    existence:

    >>> c.exists()
    True
    >>> (b / 'missing.txt').exists()
    False

    Coercion to string:

    >>> import os
    >>> str(c).replace(os.sep, posixpath.sep)
    'mem/abcde.zip/b/c.txt'

    At the root, ``name``, ``filename``, and ``parent``
    resolve to the zipfile. Note these attributes are not
    valid and will raise a ``ValueError`` if the zipfile
    has no filename.

    >>> root.name
    'abcde.zip'
    >>> str(root.filename).replace(os.sep, posixpath.sep)
    'mem/abcde.zip'
    >>> str(root.parent)
    'mem'
    z>{self.__class__.__name__}({self.root.filename!r}, {self.at!r})�cCst�|�|_||_dS)aX
        Construct a Path from a ZipFile or filename.

        Note: When the source is an existing ZipFile object,
        its type (__class__) will be mutated to a
        specialized type. If the caller wishes to retain the
        original type, the caller should either create a
        separate ZipFile object or pass a filename.
        N)rGrD�root�at)rrOrPr	r	r
rs
z
Path.__init__cCs(|j|jk	rtS|j|jf|j|jfkS)zU
        >>> Path(zipfile.ZipFile(io.BytesIO(), 'w')) == 'foo'
        False
        )r�NotImplementedrOrP)r�otherr	r	r
�__eq__
szPath.__eq__cCst|j|jf�S)N)�hashrOrP)rr	r	r
�__hash__sz
Path.__hash__r>N)�pwdcOs�|��rt|��|d}|��s0|dkr0t|��|jj|j||d�}d|kr`|sT|r\td��|St||�\}}}t	j
||f|�|�S)z�
        Open this entry as text or binary following the semantics
        of ``pathlib.Path.open()`` by passing arguments through
        to io.TextIOWrapper().
        rr>)rV�bz*encoding args invalid for binary operation)�is_dir�IsADirectoryError�exists�FileNotFoundErrorrO�openrP�
ValueErrorrM�io�
TextIOWrapper)rrArVrrZzip_mode�streamrLr	r	r
r\sz	Path.opencCst�|j�jp|jjS)N)�pathlibrrPr5r8)rr	r	r
r5-sz	Path.namecCst�|j�jp|jjS)N)rarrP�suffixr8)rr	r	r
rb1szPath.suffixcCst�|j�jp|jjS)N)rarrP�suffixesr8)rr	r	r
rc5sz
Path.suffixescCst�|j�jp|jjS)N)rarrP�stemr8)rr	r	r
rd9sz	Path.stemcCst�|jj��|j�S)N)rarrOr8�joinpathrP)rr	r	r
r8=sz
Path.filenamec	Os8t||�\}}}|jd|f|�|��
}|��SQRXdS)Nr>)rMr\�read)rrrrL�strmr	r	r
�	read_textAszPath.read_textc	Cs|�d��
}|��SQRXdS)N�rb)r\rf)rrgr	r	r
�
read_bytesFszPath.read_bytescCst�|j�d��|j�d�kS)Nr4)r
r6rPr)rrr	r	r
�	_is_childJszPath._is_childcCs|�|j|�S)N)rrO)rrPr	r	r
�_nextMsz
Path._nextcCs|jp|j�d�S)Nr4)rPr;)rr	r	r
rXPszPath.is_dircCs|��o|��S)N)rZrX)rr	r	r
�is_fileSszPath.is_filecCs|j|j��kS)N)rPrOr3)rr	r	r
rZVszPath.existscCs.|��std��t|j|j���}t|j|�S)NzCan't listdir a file)rXr]r,rlrOr1�filterrk)r�subsr	r	r
�iterdirYszPath.iterdircCst�|j��|�S)N)rarrP�match)r�path_patternr	r	r
rq_sz
Path.matchcCsdS)z]
        Return whether this path is a symlink. Always false (python/cpython#82102).
        Fr	)rr	r	r
�
is_symlinkbszPath.is_symlinkccs2x,|��D] }|V|��r
|��EdHq
WdS)N)rprX�_descendants)r�childr	r	r
rthszPath._descendantscs<|std|����t�t�|��j���fdd����D�S)NzUnacceptable pattern: c3s$|]}�t|�����r|VqdS)N)�str�relative_to)r'ru)�matchesrr	r
r)tszPath.glob.<locals>.<genexpr>)r]�re�compile�fnmatch�	translate�	fullmatchrt)r�patternr	)rxrr
�globns
z	Path.globcCs|�d|���S)Nz**/)r)rr~r	r	r
�rglobysz
Path.rglobcGst�t|�t|j|���S)N)r
�relpathrvre)rrR�extrar	r	r
rw|szPath.relative_tocCst�|jj|j�S)N)r
�joinrOr8rP)rr	r	r
�__str__szPath.__str__cCs|jj|d�S)N)r)�_Path__repr�format)rr	r	r
�__repr__�sz
Path.__repr__cGs$tj|jf|��}|�|j�|��S)N)r
r�rPrlrOr7)rrR�nextr	r	r
re�sz
Path.joinpathcCs6|js|jjSt�|j�d��}|r,|d7}|�|�S)Nr4)rPr8�parentr
r6rrl)rZ	parent_atr	r	r
r��szPath.parent)rN)r>)"r!r"r#r$r�rrSrUr\�propertyr5rbrcrdr8rhrjrkrlrXrmrZrprqrsrtrr�rwr�r�re�__truediv__r�r	r	r	r
r�s<L

	)N)r^r
r<rrHraryr{Zpy310compatr�__all__rr�dict�fromkeysr-rrr@r&rGrMrr	r	r	r
�<module>s$A