HEX
Server: Apache
System: Linux zacp120.webway.host 4.18.0-553.50.1.lve.el8.x86_64 #1 SMP Thu Apr 17 19:10:24 UTC 2025 x86_64
User: govancoz (1003)
PHP: 8.3.26
Disabled: exec,system,passthru,shell_exec,proc_close,proc_open,dl,popen,show_source,posix_kill,posix_mkfifo,posix_getpwuid,posix_setpgid,posix_setsid,posix_setuid,posix_setgid,posix_seteuid,posix_setegid,posix_uname
Upload Files
File: //usr/local/lib/python3.10/site-packages/setuptools/_vendor/__pycache__/zipp.cpython-310.pyc
o

��i� �@s�ddlZddlZddlZddlZddlZddlZddlZejdkr(ddlm	Z	ne
Z	dgZdd�Zdd�Z
e	jZ	d	d
�ZGdd�dej�ZGd
d�de�Zdd�ZGdd�d�ZdS)�N)��)�OrderedDict�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(''))
    []
    �N)�	itertools�islice�	_ancestry��path�r�B/usr/local/lib/python3.10/site-packages/setuptools/_vendor/zipp.py�_parentssrccsN�|�tj�}|r!|tjkr%|Vt�|�\}}|r#|tjksdSdSdSdS)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��r	cCst�t|�j|�S)zZ
    Return items in minuend not in subtrahend, retaining order
    with O(1) lookup.
    )r�filterfalse�set�__contains__)�minuend�
subtrahendrrr
�_difference?srcsHeZdZdZedd��Z�fdd�Zdd�Zdd	�Ze	d
d��Z
�ZS)�CompleteDirszk
    A ZipFile subclass that ensures that implied directories
    are always included in the namelist.
    cCs.tj�tt|��}dd�|D�}tt||��S)Ncss�|]}|tjVqdS�N)rr)�.0�prrr
�	<genexpr>Ps�z-CompleteDirs._implied_dirs.<locals>.<genexpr>)r�chain�
from_iterable�mapr�_deduper)�names�parents�as_dirsrrr
�
_implied_dirsMszCompleteDirs._implied_dirscs tt|���}|t|�|��Sr)�superr�namelist�listr&)�selfr#��	__class__rr
r(SszCompleteDirs.namelistcCst|���Sr)rr(�r*rrr
�	_name_setWszCompleteDirs._name_setcCs,|��}|d}||vo||v}|r|S|S)zx
        If the name represents a directory, return that name
        as a directory (with the trailing slash).
        �/)r.)r*�namer#�dirname�	dir_matchrrr
�resolve_dirZszCompleteDirs.resolve_dircCs>t|t�r|St|tj�s|t|��Sd|jvrt}||_|S)zl
        Given a source (filename or zipfile), return an
        appropriate CompleteDirs subclass.
        �r)�
isinstancer�zipfile�ZipFile�_pathlib_compat�moder,)�cls�sourcerrr
�makeds

zCompleteDirs.make)�__name__�
__module__�__qualname__�__doc__�staticmethodr&r(r.r3�classmethodr<�
__classcell__rrr+r
rGs

rcs,eZdZdZ�fdd�Z�fdd�Z�ZS)�
FastLookupzV
    ZipFile subclass to ensure implicit
    dirs exist and are resolved rapidly.
    c�Ft�t��|jWd�S1swYtt|���|_|jSr)�
contextlib�suppress�AttributeError�_FastLookup__namesr'rDr(r-r+rr
r(~�
 �zFastLookup.namelistcrEr)rFrGrH�_FastLookup__lookupr'rDr.r-r+rr
r.�rJzFastLookup._name_set)r=r>r?r@r(r.rCrrr+r
rDxsrDcCs&z|��WStyt|�YSw)zi
    For path-like objects, convert to a filename for compatibility
    on Python 3.6.1 and earlier.
    )�
__fspath__rH�strr
rrr
r8�s

�r8c@s�eZdZdZdZd-dd�Zd.dd�d	d
�Zedd��Zed
d��Z	edd��Z
edd��Zedd��Zdd�Z
dd�Zdd�Zdd�Zdd�Zdd �Zd!d"�Zd#d$�Zd%d&�Zd'd(�Zd)d*�ZeZed+d,��ZdS)/ru4
    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()
    '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)rDr<�root�at)r*rOrPrrr
�__init__�s

z
Path.__init__r4N��pwdcOsx|��rt|��|d}|��s|dkrt|��|jj|j||d�}d|vr0|s*|r.td��|Stj	|g|�Ri|��S)z�
        Open this entry as text or binary following the semantics
        of ``pathlib.Path.open()`` by passing arguments through
        to io.TextIOWrapper().
        rr4rR�bz*encoding args invalid for binary operation)
�is_dir�IsADirectoryError�exists�FileNotFoundErrorrO�openrP�
ValueError�io�
TextIOWrapper)r*r9rS�args�kwargs�zip_mode�streamrrr
rY�sz	Path.opencC�t�|j�jp
|jjSr)�pathlibrrPr0�filenamer-rrr
r0�z	Path.namecCrar)rbrrP�suffixrcr-rrr
re	rdzPath.suffixcCrar)rbrrP�suffixesrcr-rrr
rf
rdz
Path.suffixescCrar)rbrrP�stemrcr-rrr
rgrdz	Path.stemcCst�|jj��|j�Sr)rbrrOrc�joinpathrPr-rrr
rcrdz
Path.filenamecOsD|jdg|�Ri|���}|��Wd�S1swYdS)Nr4�rY�read)r*r]r^�strmrrr
�	read_texts$�zPath.read_textcCs6|�d��}|��Wd�S1swYdS)N�rbri)r*rkrrr
�
read_bytess$�zPath.read_bytescCst�|j�d��|j�d�kS�Nr/)rr1rPr)r*rrrr
�	_is_child!szPath._is_childcCs|�|j|�Sr)r,rO)r*rPrrr
�_next$�z
Path._nextcCs|jp	|j�d�Sro)rP�endswithr-rrr
rU'szPath.is_dircCs|��o|��Sr)rWrUr-rrr
�is_file*�zPath.is_filecCs|j|j��vSr)rPrOr.r-rrr
rW-szPath.existscCs.|��std��t|j|j���}t|j|�S)NzCan't listdir a file)rUrZr!rqrOr(�filterrp)r*�subsrrr
�iterdir0szPath.iterdircCst�|jj|j�Sr)r�joinrOrcrPr-rrr
�__str__6ruzPath.__str__cCs|jj|d�S)Nr-)�_Path__repr�formatr-rrr
�__repr__9rrz
Path.__repr__cGs,tj|jgtt|��R�}|�|j�|��Sr)rryrPr!r8rqrOr3)r*�other�nextrrr
rh<sz
Path.joinpathcCs6|js|jjSt�|j�d��}|r|d7}|�|�Sro)rPrc�parentrr1rrq)r*�	parent_atrrr
r�Bs
zPath.parent)rN)r4)r=r>r?r@r{rQrY�propertyr0rerfrgrcrlrnrprqrUrtrWrxrzr}rh�__truediv__r�rrrr
r�s:M






)r[rr6rrF�sysrb�version_info�collectionsr�dict�__all__rr	�fromkeysr"rr7rrDr8rrrrr
�<module>s(
1