ok

Mini Shell

Direktori : /proc/self/root/opt/alt/python37/lib64/python3.7/importlib/__pycache__/
Upload File :
Current File : //proc/self/root/opt/alt/python37/lib64/python3.7/importlib/__pycache__/util.cpython-37.opt-2.pyc

B

0��c7,�@s(ddlmZddlmZddlmZddlmZddlmZddlmZddlm	Z	ddlm
Z
dd	lmZdd
lmZddlm
Z
dd
lmZddlZddlZddlZddlZddlZdd�Zdd�Zd#dd�Zd$dd�Zedd��Zdd�Zdd�Zdd�ZGdd �d ej�ZGd!d"�d"ej�Z dS)%�)�abc)�module_from_spec)�
_resolve_name)�spec_from_loader)�
_find_spec)�MAGIC_NUMBER)�_RAW_MAGIC_NUMBER)�cache_from_source)�
decode_source)�source_from_cache)�spec_from_file_location�)�contextmanagerNcCst�t|�S)N)�_imp�source_hashr)�source_bytes�r�3/opt/alt/python37/lib64/python3.7/importlib/util.pyrsrcCs^|�d�s|S|s&tdt|��d���d}x|D]}|dkr>P|d7}q0Wt||d�||�S)N�.zno package specified for z% (required for relative module names)r
r)�
startswith�
ValueError�reprr)�name�package�level�	characterrrr�resolve_names

rcCsx|tjkrt||�Stj|}|dkr*dSy
|j}Wn$tk
rXtd�|��d�YnX|dkrptd�|���|SdS)Nz{}.__spec__ is not setz{}.__spec__ is None)�sys�modulesr�__spec__�AttributeErrorr�format)r�path�module�specrrr�_find_spec_from_path*s



r%c	
Cs�|�d�rt||�n|}|tjkr�|�d�d}|r�t|dgd�}y
|j}Wq�tk
r�}ztd|�d|��|d�|�Wdd}~XYq�Xnd}t	||�Stj|}|dkr�dSy
|j
}Wn$tk
r�td�|��d�YnX|dkr�td	�|���|SdS)
Nrr
�__path__)�fromlistz __path__ attribute not found on z while trying to find )rz{}.__spec__ is not setz{}.__spec__ is None)
rrrr�
rpartition�
__import__r&r �ModuleNotFoundErrorrrrr!)	rr�fullname�parent_name�parent�parent_path�er#r$rrr�	find_specIs.




r0ccs�|tjk}tj�|�}|s6tt�|�}d|_|tj|<zJy
|VWn:tk
r||sxytj|=Wntk
rvYnXYnXWdd|_XdS)NTF)rr�get�type�__initializing__�	Exception�KeyError)r�	is_reloadr#rrr�_module_to_loadvs


r7cst����fdd��}|S)NcsRtjdtdd��||�}t|dd�dkrN|j|_t|d�sN|j�d�d|_|S)Nz7The import system now takes care of this automatically.�)�
stacklevel�__package__r&rr
)�warnings�warn�DeprecationWarning�getattr�__name__r:�hasattrr()�args�kwargsr#)�fxnrr�set_package_wrapper�s


z(set_package.<locals>.set_package_wrapper)�	functools�wraps)rCrDr)rCr�set_package�s
rGcst����fdd��}|S)Ncs:tjdtdd��|f|�|�}t|dd�dkr6||_|S)Nz7The import system now takes care of this automatically.r8)r9�
__loader__)r;r<r=r>rH)�selfrArBr#)rCrr�set_loader_wrapper�s
z&set_loader.<locals>.set_loader_wrapper)rErF)rCrJr)rCr�
set_loader�srKcs*tjdtdd�t����fdd��}|S)Nz7The import system now takes care of this automatically.r8)r9c
spt|��^}||_y|�|�}Wnttfk
r6YnX|rD||_n|�d�d|_�||f|�|�SQRXdS)Nrr
)r7rH�
is_package�ImportErrorr r:r()rIr+rArBr#rL)rCrr�module_for_loader_wrapper�s
z4module_for_loader.<locals>.module_for_loader_wrapper)r;r<r=rErF)rCrNr)rCr�module_for_loader�s
rOc@seZdZdd�Zdd�ZdS)�_LazyModulec	Cs�tj|_|jj}|jjd}|jjd}|j}i}xF|��D]:\}}||krV|||<q<t||�t||�kr<|||<q<W|jj	�
|�|tjkr�t|�ttj|�kr�t
d|�d���|j�|�t||�S)N�__dict__�	__class__zmodule object for z. substituted in sys.modules during a lazy load)�types�
ModuleTyperRrr�loader_staterQ�items�id�loader�exec_modulerrr�updater>)	rI�attr�
original_name�
attrs_then�
original_type�	attrs_now�
attrs_updated�key�valuerrr�__getattribute__�s"

z_LazyModule.__getattribute__cCs|�|�t||�dS)N)rc�delattr)rIr[rrr�__delattr__s
z_LazyModule.__delattr__N)r?�
__module__�__qualname__rcrerrrrrP�s#rPc@s<eZdZedd��Zedd��Zdd�Zdd�Zd	d
�Z	dS)�
LazyLoadercCst|d�std��dS)NrYz loader must define exec_module())r@�	TypeError)rXrrr�__check_eager_loaders
zLazyLoader.__check_eager_loadercs������fdd�S)Ncs��||��S)Nr)rArB)�clsrXrr�<lambda>�z$LazyLoader.factory.<locals>.<lambda>)�_LazyLoader__check_eager_loader)rkrXr)rkrXr�factorys
zLazyLoader.factorycCs|�|�||_dS)N)rnrX)rIrXrrr�__init__s
zLazyLoader.__init__cCs|j�|�S)N)rX�
create_module)rIr$rrrrqszLazyLoader.create_modulecCs@|j|j_|j|_i}|j��|d<|j|d<||j_t|_dS)NrQrR)rXrrHrQ�copyrRrUrP)rIr#rUrrrrY s

zLazyLoader.exec_moduleN)
r?rfrg�staticmethodrn�classmethodrorprqrYrrrrrh
s
rh)N)N)!�r�
_bootstraprrrr�_bootstrap_externalrrr	r
rr�
contextlibrrrErrSr;rrr%r0r7rGrKrOrTrP�Loaderrhrrrr�<module>s4

-'/

Zerion Mini Shell 1.0