Your IP : 3.145.106.176


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

o

6��f_)�@s�	ddlmZmZmZmZmZmZmZmZm	Z	zddlm
Z
Wney*dZ
Ynwddlm
Z
mZmZmZddlmZddlmZddlmZddlZddlZddlZddlZddlZddlZejded	d
�dZdZd	ZdZ d
Z!dZ"dZ#dZ$dZ%dZ&dd�Z'dd�Z(dd�Z)d7dd�Z*dd�Z+dd�Z,Gdd �d �Z-Gd!d"�d"�Z.Gd#d$�d$e.ej/�Z0d7d%d&�Z1Gd'd(�d(e.e�Z2d7d)d*�Z3d+d,�Z4d-d.�Z5d7d/d0�Z6d1d2�Z7d3d4�Z8e
r�d7d5d6�Z9dSdZ9dS)8�)	�	lock_held�acquire_lock�release_lock�get_frozen_object�is_frozen_package�init_frozen�
is_builtin�	is_frozen�_fix_co_filename)�create_dynamicN)�_ERR_MSG�_exec�_load�_builtin_from_name)�SourcelessFileLoader)�	machinery)�utilz�the imp module is deprecated in favour of importlib and slated for removal in Python 3.12; see the module's documentation for alternative uses�)�
stacklevel��������	cC�	t�|�S�N)�types�
ModuleType��name�r#�*/opt/alt/python310/lib64/python3.10/imp.py�
new_module1�
r%cCs	tjSr)r�MAGIC_NUMBERr#r#r#r$�	get_magic<sr(cCs
	tjjSr)�sys�implementation�	cache_tagr#r#r#r$�get_tagDsr,cCsD	t���t�d�t�||�Wd�S1swYdS)N�ignore)�warnings�catch_warnings�simplefilterr�cache_from_source)�path�debug_overrider#r#r$r1Is



$�r1cCrr)r�source_from_cache�r2r#r#r$r4\s

r4cCs>	dd�tjD�}dd�tjD�}dd�tjD�}|||S)NcS�g|]}|dtf�qS��rb)�C_EXTENSION��.0�sr#r#r$�
<listcomp>l�z get_suffixes.<locals>.<listcomp>cSr6)�r)�	PY_SOURCEr:r#r#r$r=mr>cSr6r7)�PY_COMPILEDr:r#r#r$r=nr>)r�EXTENSION_SUFFIXES�SOURCE_SUFFIXES�BYTECODE_SUFFIXES)�
extensions�source�bytecoder#r#r$�get_suffixesjs
rHc@seZdZ	dd�Zdd�ZdS)�NullImportercCs0|dkr
tddd��tj�|�rtd|d��dS)N�zempty pathnamer5zexisting directory)�ImportError�osr2�isdir)�selfr2r#r#r$�__init__{s
�zNullImporter.__init__cCs	dSrr#)rN�fullnamer#r#r$�find_module�szNullImporter.find_moduleN)�__name__�
__module__�__qualname__rOrQr#r#r#r$rIssrIcs,eZdZ	d�fdd�	Z�fdd�Z�ZS)�_HackedGetDataNcst��||�||_dSr)�superrO�file)rNrPr2rW��	__class__r#r$rO�s
z_HackedGetData.__init__cs�	|jr>||jkr>|jjs|j}d|jvr|��|jjr&t|jd�|_}|�|��Wd�S1s7wYdSt��|�S)N�br8)	rWr2�closed�mode�close�open�readrV�get_data)rNr2rWrXr#r$r`�s
$�z_HackedGetData.get_datar)rRrSrTrOr`�
__classcell__r#r#rXr$rU�srUc@�eZdZdS)�_LoadSourceCompatibilityN�rRrSrTr#r#r#r$rc��rccCs\t|||�}tj|||d�}|tjvrt|tj|�}nt|�}t�||�|_	|j	|j
_|S�N)�loader)rcr�spec_from_file_locationr)�modulesr
rr�SourceFileLoader�
__loader__�__spec__rg�r"�pathnamerWrg�spec�moduler#r#r$�load_source�s

rqc@rb)�_LoadCompiledCompatibilityNrdr#r#r#r$rr�rerrcCs\	t|||�}tj|||d�}|tjvrt|tj|�}nt|�}t||�|_|j|j	_
|Srf)rrrrhr)rir
rrrkrlrgrmr#r#r$�
load_compiled�s

rscCs�	tj�|�r4tjdd�tjdd�}|D]}tj�|d|�}tj�|�r,|}nqtd�	|���t
j||gd�}|tj
vrIt|tj
|�St|�S)NrOz{!r} is not a package)�submodule_search_locations)rLr2rMrrCrD�join�exists�
ValueError�formatrrhr)rir
r)r"r2rE�	extensionZ	init_pathror#r#r$�load_package�s$���
rzc	Cs&	|\}}}|r|�d�rd|vrtd�|���|dur+|tthvr+d�|�}t|��|tkr5t|||�S|tkr?t|||�S|tkrntdurn|durht	|d��}t|||�Wd�S1sawYdSt|||�S|t
krwt||�S|tkrt
|�S|tkr�t|�Sd�||�}t||d��)N)r?�U�+zinvalid file open mode {!r}z.file object required for import (type code {})r8z*Don't know how to import {} (type code {})r!)�
startswithrwrxr@rArqrsr9�load_dynamicr^�
PKG_DIRECTORYrz�	C_BUILTIN�init_builtin�	PY_FROZENrrK)	r"rW�filenameZdetails�suffixr\�type_�msgZopened_filer#r#r$�load_module�s2


$�
r�cCs�	t|t�std�t|����t|td�tf�s!td�t|����|dur@t|�r1ddddtffSt	|�r=ddddt
ffStj}|D]N}t
j�||�}dtjdfD]}d|}t
j�||�}t
j�|�rqd|ddtffSqRt�D]\}}}||}	t
j�||	�}t
j�|�r�nquqBn	tt�|�|d��d}
d|vr�t|d	��}t�|j�d}
Wd�n1s�wYt|||
d
�}|||||ffS)Nz'name' must be a str, not {}z%'path' must be None or a list, not {}rJz.pyrrOr!rZr8)�encoding)�
isinstance�str�	TypeErrorrx�type�list�RuntimeErrorrr�r	r�r)r2rLrurrD�isfilerrHrKrr^�tokenize�detect_encoding�readline)r"r2�entryZpackage_directoryr�Zpackage_file_nameZ	file_pathr\r��	file_namer�rWr#r#r$rQ�sJ


����rQcCrr)�	importlib�reload)rpr#r#r$r�3r&r�cCs"	zt|�WStyYdSwr)rrKr!r#r#r$r�>s
�r�cCs2	ddl}|j�||�}|jj|||d�}t|�S)Nr)r"rg�origin)�importlib.machineryr�ExtensionFileLoader�
ModuleSpecr)r"r2rWr�rgror#r#r$r~Ks�r~r):�_imprrrrrrrr	r
rrKZimportlib._bootstraprr
rrZimportlib._bootstrap_externalrr�rrrLr)r�rr.�warn�DeprecationWarningZSEARCH_ERRORr@rAr9ZPY_RESOURCErr�r�ZPY_CODERESOURCEZIMP_HOOKr%r(r,r1r4rHrIrUrjrcrqrrrsrzr�rQr�r�r~r#r#r#r$�<module>sd,��
	


#4

?>