403Webshell
Server IP : 127.0.0.1  /  Your IP : 216.73.216.109
Web Server : Apache/2.4.54 (Win64) OpenSSL/1.1.1q PHP/8.1.10
System : Windows NT DESKTOP-E5T4RUN 10.0 build 19045 (Windows 10) AMD64
User : SERVERWEB ( 0)
PHP Version : 8.1.10
Disable Function : NONE
MySQL : OFF |  cURL : ON |  WGET : OFF |  Perl : OFF |  Python : OFF |  Sudo : OFF |  Pkexec : OFF
Directory :  C:/cygwin64/lib/python3.9/site-packages/sphinx/util/__pycache__/

Upload File :
current_dir [ Writeable] document_root [ Writeable]

 

Command :


[ Back ]     

Current File : C:/cygwin64/lib/python3.9/site-packages/sphinx/util/__pycache__/inventory.cpython-39.opt-1.pyc
a

�ab�@s�dZddlZddlZddlZddlmZmZmZmZddl	m
Z
ddlmZdZ
e
�e�ZervddlmZddlmZGd	d
�d
�ZGdd�d�ZdS)
z�
    sphinx.util.inventory
    ~~~~~~~~~~~~~~~~~~~~~

    Inventory utility functions for Sphinx.

    :copyright: Copyright 2007-2022 by the Sphinx team, see AUTHORS.
    :license: BSD, see LICENSE for details.
�N)�IO�
TYPE_CHECKING�Callable�Iterator)�logging)�	Inventoryi@)�Builder)�BuildEnvironmentc@sreZdZdZedd�dd�Zdd�dd�Zed�d	d
�Ze	ed�dd�Z
e	ed�d
d�Ze	ed�dd�Z
dS)�InventoryFileReaderzjA file reader for an inventory file.

    This reader supports mixture of texts and compressed texts.
    N)�stream�returncCs||_d|_d|_dS)N�F)r�buffer�eof)�selfr�r�9/usr/lib/python3.9/site-packages/sphinx/util/inventory.py�__init__ szInventoryFileReader.__init__)rcCs,|j�t�}|dkrd|_|j|7_dS)Nr
T)r�read�BUFSIZErr)r�chunkrrr�read_buffer%szInventoryFileReader.read_buffercCsh|j�d�}|dkr<|jd|���}|j|dd�|_n(|jrT|j��}d|_n|��|��}|S)N�
����r
)r�find�decoderr�readline)r�pos�linerrrr+s
zInventoryFileReader.readlineccs|js|��}|r|VqdS)N)rr)rrrrr�	readlines9szInventoryFileReader.readlinesccs:t��}|js,|��|�|j�Vd|_q|��VdS)Nr
)�zlib�
decompressobjrr�
decompressr�flush)rZdecompressorrrr�read_compressed_chunks?sz*InventoryFileReader.read_compressed_chunksccs^d}|��D]L}||7}|�d�}|dkr|d|���V||dd�}|�d�}q"qdS)Nr
rrr)r%rr)r�bufrrrrr�read_compressed_linesGs
z)InventoryFileReader.read_compressed_lines)�__name__�
__module__�__qualname__�__doc__rrr�strrrr �bytesr%r'rrrrr
sr
c@sleZdZeeeeed�dd��Zee	eeed�dd��Z
ee	eeed�dd��Zeed	d
dd�d
d��ZdS)�
InventoryFile)r�uri�joinfuncrcCsPt|�}|����}|dkr*|�|||�S|dkr@|�|||�Std|��dS)Nz# Sphinx inventory version 1z# Sphinx inventory version 2zinvalid inventory header: %s)r
r�rstrip�load_v1�load_v2�
ValueError)�clsrr/r0�readerrrrr�loadSszInventoryFile.load)rr/�joinrcCs�i}|����dd�}|����dd�}|��D]j}|���dd�\}}	}
|||
�}
|	dkrrd}	|
d|7}
nd|	}	|
d|7}
|||
df|�|	i�|<q4|S)	N���mod�	py:modulez#module-zpy:�#�-)rr1r �split�
setdefault)r5rr/r8�invdata�projname�versionr�name�type�locationrrrr2^s
zInventoryFile.load_v1cCs�i}|����dd�}|����dd�}|��}d|vrHtd|��|��D]�}t�d|���}|sjqP|��\}	}
}}}
d|
vr�qP|
dkr�|
|vr�|	||
vr�qP|�d�r�|dd�|	}|||�}||||
f|�|
i�|	<qP|S)	Nr9r!z-invalid inventory header (not compressed): %sz+(?x)(.+?)\s+(\S+)\s+(-?\d+)\s+?(\S*)\s+(.*)�:r<�$r)	rr1r4r'�re�match�groups�endswithr@)r5rr/r8rArBrCr�mrDrE�priorF�dispnamerrrr3ps0�

�zInventoryFile.load_v2r	rN)�filename�env�builderrc
Cs*ttd�dd�}ttj�|�d���}|�d||jj�||jj�f�	��t
�d�}t|j
���D]�\}}t|���D]~\}	}
}}}
}|
�|	�r�|
dt|	��d}
|�|�}|
r�|d|
7}|
|	kr�d	}
d
|	|||||
f}|�|�|�	���qvqb|�|���Wd�n1�s0YdS)N)�stringrcSst�dd|�S)Nz\s+� )rI�sub)rSrrr�escape�sz"InventoryFile.dump.<locals>.escape�wbzp# Sphinx inventory version 2
# Project: %s
# Version: %s
# The remainder of this file is compressed using zlib.
�	rHr=r>z%s %s:%s %s %s %s
)r,�open�os�pathr8�writeZconfigZprojectrC�encoder!�compressobj�sortedZdomains�itemsZget_objectsrL�lenZget_target_uri�compressr$)r5rPrQrRrV�fZ
compressorZ
domainname�domainrDrO�typZdocname�anchorrNr/�entryrrr�dump�s.

��


�

�zInventoryFile.dump)
r(r)r*�classmethodrr,rrr7r
r2r3rhrrrrr.Rs
!r.)r+rZrIr!�typingrrrrZsphinx.utilrZsphinx.util.typingrrZ	getLoggerr(�loggerZsphinx.buildersrZsphinx.environmentr	r
r.rrrr�<module>s	
8

Youez - 2016 - github.com/yon3zu
LinuXploit