AlkantarClanX12

Your IP : 13.58.200.16


Current Path : /opt/alt/python310/lib64/python3.10/__pycache__/
Upload File :
Current File : //opt/alt/python310/lib64/python3.10/__pycache__/pkgutil.cpython-310.opt-2.pyc

o

6��f`�@sj	ddlmZddlmZddlZddlZddlZddlZddl	Zddl
Z
ddlmZddl
Z
gd�Zedd�Zde_d	d
�Zdd�Zd-dd�Zd.dd�Zed/dd��Zd/dd�Ze�ejje�dd�ZGdd�d�ZGdd�d�ZzddlZddlmZd/dd�Ze�ee�Wn	e y�Ynwdd �Z!d/d!d"�Z"d#d$�Z#d%d&�Z$d'd(�Z%d)d*�Z&da'd+d,�Z(dS)0�)�
namedtuple)�singledispatchN)�
ModuleType)�get_importer�iter_importers�
get_loader�find_loader�
walk_packages�iter_modules�get_data�ImpImporter�	ImpLoader�	read_code�extend_path�
ModuleInforzmodule_finder name ispkgz.A namedtuple with minimal info about a module.cCsL	z|j}W||�Sty%|�|�}|durYdStj�||�YSw�N)�	find_spec�AttributeError�find_module�	importlib�util�spec_from_loader)�finder�namer�loader�r�./opt/alt/python310/lib64/python3.10/pkgutil.py�	_get_specs�
�rcCs6ddl}|�d�}|tjjkrdS|�d�|�|�S)Nr��)�marshal�readrr�MAGIC_NUMBER�load)�streamr �magicrrrr(s


r�c	#s��	ifdd��t||�D]V}|V|jrczt|j�Wn%ty.|dur,||j�Yq
tyA|dur>||j�n�Yq
wttj|jdd�pMg}�fdd�|D�}t	||jd|�EdHq
dS)NcSs||vrdSd||<dS)NTr)�p�mrrr�seenRszwalk_packages.<locals>.seen�__path__csg|]}�|�s|�qSrr)�.0r'�r)rr�
<listcomp>isz!walk_packages.<locals>.<listcomp>�.)
r
�ispkg�
__import__r�ImportError�	Exception�getattr�sys�modulesr	)�path�prefix�onerror�inforr,rr	5s.�
�����r	ccst�	|dur
t�}nt|t�rtd��tt|�}i}|D]}t||�D]\}}||vr6d||<t|||�Vq#qdS)Nz9path must be None or list of paths to look for modules in�)r�
isinstance�str�
ValueError�mapr�iter_importer_modulesr)r6r7Z	importers�yielded�irr/rrrr
ns �	

���r
cCst|d�sgS|�|�S)Nr
)�hasattrr
)�importerr7rrrr?�s

r?c	c�"�|jdus
tj�|j�sdSi}ddl}zt�|j�}Wnty(g}Ynw|��|D]_}|�|�}|dks>||vr?q/tj�|j|�}d}|s}tj�|�r}d|vr}|}zt�|�}	Wntyig}	Ynw|	D]}|�|�}
|
dkr{d}nqlq/|r�d|vr�d||<|||fVq/dS�Nr�__init__Fr.Tr:�	r6�os�isdir�inspect�listdir�OSError�sort�
getmodulename�join)rCr7r@rJ�	filenames�fn�modnamer6r/�dircontents�subnamerrr�_iter_file_finder_modules��H��
�
���rUcCsDt���t�dt�t�d�aWd�dS1swYdS)N�ignore�imp)�warnings�catch_warnings�simplefilter�DeprecationWarningr�
import_modulerXrrrr�_import_imp�s
"�r^c@s,eZdZ	d	dd�Zd	dd�Zd
dd�ZdS)rNcCst�dt�t�||_dS�Nz[This emulation is deprecated and slated for removal in Python 3.12; use 'importlib' instead)rY�warnr\r^r6)�selfr6rrrrF�s
�
zImpImporter.__init__cCs~|�d�d}||kr|jdurdS|jdurd}ntj�|j�g}zt�||�\}}}Wn
ty7YdSwt||||�S)Nr.���)�splitr6rH�realpathrXrr1r
)ra�fullnamer6rT�file�filename�etcrrrr�s
�zImpImporter.find_moduler&c	crDrErG)rar7r@rJrPrQrRr6r/rSrTrrrr
�rVzImpImporter.iter_modulesr�r&)�__name__�
__module__�__qualname__rFrr
rrrrr�s



rc@sleZdZ	dZZdd�Zdd�Zdd�Zdd	�Zd
d�Z	dd
�Z
ddd�Zddd�Zdd�Z
ddd�ZdS)r
NcCs.t�dt�t�||_||_||_||_dSr_)rYr`r\r^rfrgrerh)rarerfrgrhrrrrFs�
zImpLoader.__init__cCsJ|��zt�||j|j|j�}W|jr|j��|S|jr$|j��wwr)�_reopenrX�load_modulerfrgrh�close)rare�modrrrrns
��zImpLoader.load_modulecCs6t|d��}|��Wd�S1swYdS)N�rb)�openr!)ra�pathnamerfrrrr's$�zImpLoader.get_datacCsb|jr+|jjr-|jd}|tjkrt|jd�|_dS|tjtjfvr/t|jd�|_dSdSdSdS)N��rrq)	rf�closedrhrX�	PY_SOURCErrrg�PY_COMPILED�C_EXTENSION)ra�mod_typerrrrm+s

�zImpLoader._reopencCs2|dur	|j}|S||jkrtd|j|f��|S)Nz,Loader for module %s cannot handle module %s)rer1�rarerrr�	_fix_name3s
��zImpLoader._fix_namecCs|�|�}|jdtjkS�Nrt)r|rhrX�
PKG_DIRECTORYr{rrr�
is_package;s
zImpLoader.is_packagecCs�|�|�}|jdurO|jd}|tjkr$|�|�}t||jd�|_|jS|tjkrC|�	�zt
|j�|_W|j��|jS|j��w|tj
krO|����|_|jS)Nrt�exec)r|�coderhrXrw�
get_source�compilergrxrmrrfror~�
_get_delegate�get_code)rarerz�sourcerrrr�?s"




	
�
�
zImpLoader.get_codecCs�|�|�}|jdurn|jd}|tjkr.|��z|j��|_W|j��|jS|j��w|tj	krbt
j�|j
dd��r_t|j
dd�d��}|��|_Wd�|jS1sZwY|jS|tjkrn|����|_|jS)Nrtrbru)r|r�rhrXrwrmrfr!rorxrHr6�existsrgrrr~r�r�)rarerz�frrrr�Ps*




�

��
�zImpLoader.get_sourcecCst|j�}t|d�}|jS)NrF)rrgrr)rar�specrrrr�bs

zImpLoader._get_delegatecCsH|�|�}|jd}|tjkr|����S|tjtjtjfvr"|j	SdSr})
r|rhrXr~r��get_filenamerwrxryrg)rarerzrrrr�gs


zImpLoader.get_filenamer)rjrkrlr�r�rFrnrrmr|rr�r�r�r�rrrrr

s


r
)�zipimporterc	cs��ttj|j�}|j}t|�}i}ddl}|D]\}|�|�s q||d��t	j
�}t|�dkrL|d�d�rL|d|vrLd||d<||ddfVt|�dkrSq|�|d�}|dkr_q|rtd|vrt||vrtd||<||dfVqdS)	Nrrtr:z__init__.pyTrFr.F)�sorted�	zipimport�_zip_directory_cache�archiver7�lenrJ�
startswithrcrH�seprN)	rCr7Zdirlist�_prefixZplenr@rJrQrRrrr�iter_zipimport_modulesus0�
��r�cCsj	ztj|}W|Sty4tjD]}z||�}tj�||�WY|Sty.Yqwd}Y|Swr)r4�path_importer_cache�KeyError�
path_hooks�
setdefaultr1)Z	path_itemrC�	path_hookrrrr�s"�
���rccs��	|�d�rd�|�}t|��d|vr-|�d�d}t�|�}t|dd�}|dur,dSn	tjEdHtj	}|D]}t
|�Vq8dS)Nr.�'Relative module name {!r} not supportedrr*)r��formatr1�
rpartitionrr]r3r4�	meta_pathr6r)re�msgZpkg_name�pkgr6�itemrrrr�s"�


��rcCsv	|tjvrtj|}|durdSt|t�r5|}t|dd�}|dur$|St|dd�dur.dS|j}t|�S|}t|�S)N�
__loader__�__spec__)r4r5r;rr3rjr)Zmodule_or_name�modulerrerrrr�s 


�rcCs~	|�d�rd�|�}t|��ztj�|�}Wnttttfy5}zd}t|�|t	|�|��|�d}~ww|dur=|j
SdS)Nr.r�z,Error while finding loader for {!r} ({}: {}))r�r�r1rrrr�	TypeErrorr=�typer)rer�r�Zexrrrr�s

��rcCs�	t|t�s|S|d}|dd�}|�d�\}}}|r2ztj|j}Wnttfy1|YSwtj}|D]�}t|t	�s?q7t
|�}|durwg}	t|d�r]|�|�}
|
dur\|
j
p[g}	nt|d�ri|�|�\}}	|	D]}||vrv|�|�qktj�||�}tj�|�r�zt|�}
Wnty�}ztj�d||f�WYd}~q7d}~ww|
�|
D]}|�d�}|r�|�d�r�q�|�|�q�Wd�n1s�wYq7|S)Nz.pkgr.rrzCan't open %s: %s
�
�#)r;�listr�r4r5r*r�rr6r<rrBr�submodule_search_locationsr�appendrHrO�isfilerrrL�stderr�write�rstripr�)r6rZ	sname_pkgZparent_package�_Z
final_nameZsearch_path�dirr�portionsr�ZportionZpkgfiler�r��linerrrr�sd
 �



�

����
���rcCs�	tj�|�}|dur
dS|j}|dust|d�sdStj�|�p&tj�	|�}|dus0t|d�s2dS|�
d�}|�dtj
�|j��tj
j|�}|�|�S)Nr�__file__�/r)rrrrrBr4r5�get�
_bootstrap�_loadrc�insertrHr6�dirnamer�rOr)�packageZresourcer�rrp�partsZ
resource_namerrrrWs 
�

rcCs	tdurddl}d}|�d|�d|�d�|j�at�|�}|s'td|����|��}|�d�rFt�	|d�}|�d	�}|rC|�
d
�ng}n6|�
d
�}|�d�}t�	|�}|r||d}|�d
|��}	zt�	|	�}|�d�|	}Wn	tyyYnw|sW|}
|D]}t
|
|�}
q�|
S)Nrz(?!\d)(\w+)(\.(?!\d)(\w+))*z	^(?P<pkg>z)(?P<cln>:(?P<obj>z)?)?$zinvalid format: Zclnr��objr.)�
_NAME_PATTERN�rer��UNICODE�matchr=�	groupdictr�rr]rc�popr1r3)rr�Zdotted_wordsr(Zgdrpr�rRr'�s�resultrrr�resolve_name�sF ��







��r�)Nr&N)Nr&ri))�collectionsr�	functoolsrZ
simplegenericr�importlib.util�importlib.machineryrHZos.pathr4�typesrrY�__all__r�__doc__rrr	r
r?rU�register�	machinery�
FileFinderr^rr
r�r�r�r1rrrrrrr�r�rrrr�<module>sV


9
(�Kd
�
^+