AlkantarClanX12

Your IP : 3.129.45.144


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

o

6��f_)�@s�dZddlmZmZmZmZmZmZmZm	Z	m
Z
zddlmZWney+dZYnwddl
mZmZmZmZddlmZddlmZddlmZddlZddlZddlZddlZddlZddlZejd	ed
d�dZdZd
Z d
Z!dZ"dZ#dZ$dZ%dZ&dZ'dd�Z(dd�Z)dd�Z*d8dd�Z+dd�Z,dd�Z-Gd d!�d!�Z.Gd"d#�d#�Z/Gd$d%�d%e/ej0�Z1d8d&d'�Z2Gd(d)�d)e/e�Z3d8d*d+�Z4d,d-�Z5d.d/�Z6d8d0d1�Z7d2d3�Z8d4d5�Z9er�d8d6d7�Z:dSdZ:dS)9z�This module provides the components needed to build your own __import__
function.  Undocumented functions are obsolete.

In most cases it is preferred you consider using the importlib module's
functionality over this module.

�)	�	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)z_**DEPRECATED**

    Create a new module.

    The module is not entered into sys.modules.

    )�types�
ModuleType��name�r"�*/opt/alt/python310/lib64/python3.10/imp.py�
new_module1�
r$cCstjS)z@**DEPRECATED**

    Return the magic number for .pyc files.
    )r�MAGIC_NUMBERr"r"r"r#�	get_magic<sr'cCstjjS)z$Return the magic tag for .pyc files.)�sys�implementation�	cache_tagr"r"r"r#�get_tagDsr+cCsBt���t�d�t�||�Wd�S1swYdS)a�**DEPRECATED**

    Given the path to a .py file, return the path to its .pyc file.

    The .py file does not need to exist; this simply returns the path to the
    .pyc file calculated as if the .py file were imported.

    If debug_override is not None, then it must be a boolean and is used in
    place of sys.flags.optimize.

    If sys.implementation.cache_tag is None then NotImplementedError is raised.

    �ignoreN)�warnings�catch_warnings�simplefilterr�cache_from_source)�path�debug_overrider"r"r#r0Is


$�r0cCr)a~**DEPRECATED**

    Given the path to a .pyc. file, return the path to its .py file.

    The .pyc file does not need to exist; this simply returns the path to
    the .py file calculated to correspond to the .pyc file.  If path does
    not conform to PEP 3147 format, ValueError will be raised. If
    sys.implementation.cache_tag is None then NotImplementedError is raised.

    )r�source_from_cache�r1r"r"r#r3\s
r3cCs<dd�tjD�}dd�tjD�}dd�tjD�}|||S)�**DEPRECATED**cS�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@s eZdZdZdd�Zdd�ZdS)�NullImporterz-**DEPRECATED**

    Null import object.

    cCs0|dkr
tddd��tj�|�rtd|d��dS)N�zempty pathnamer4zexisting directory)�ImportError�osr1�isdir)�selfr1r"r"r#�__init__{s
�zNullImporter.__init__cCsdS)zAlways returns None.Nr")rN�fullnamer"r"r#�find_module�szNullImporter.find_moduleN)�__name__�
__module__�__qualname__�__doc__rOrQr"r"r"r#rIssrIcs.eZdZdZd�fdd�	Z�fdd�Z�ZS)�_HackedGetDatazMCompatibility support for 'file' arguments of various load_*()
    functions.Ncst��||�||_dS�N)�superrO�file)rNrPr1rY��	__class__r"r#rO�s
z_HackedGetData.__init__cs�|jr=||jkr=|jjs|j}d|jvr|��|jjr%t|jd�|_}|�|��Wd�S1s6wYdSt��|�S)z;Gross hack to contort loader to deal w/ load_*()'s bad API.�br8N)	rYr1�closed�mode�close�open�readrX�get_data)rNr1rYrZr"r#rb�s
$�z_HackedGetData.get_datarW)rRrSrTrUrOrb�
__classcell__r"r"rZr#rV�srVc@�eZdZdZdS)�_LoadSourceCompatibilityz5Compatibility support for implementing load_source().N�rRrSrTrUr"r"r"r#re��recCs\t|||�}tj|||d�}|tjvrt|tj|�}nt|�}t�||�|_	|j	|j
_|S)N��loader)rer�spec_from_file_locationr(�modulesr
rr�SourceFileLoader�
__loader__�__spec__ri�r!�pathnamerYri�spec�moduler"r"r#�load_source�s

rsc@rd)�_LoadCompiledCompatibilityz7Compatibility support for implementing load_compiled().Nrfr"r"r"r#rt�rgrtcCsZt|||�}tj|||d�}|tjvrt|tj|�}nt|�}t||�|_|j|j	_
|S)r5rh)rtrrjr(rkr
rrrmrnriror"r"r#�
load_compiled�s

rucCs�tj�|�r3tjdd�tjdd�}|D]}tj�|d|�}tj�|�r+|}nqtd�	|���t
j||gd�}|tj
vrHt|tj
|�St|�S)r5NrOz{!r} is not a package)�submodule_search_locations)rLr1rMrrCrD�join�exists�
ValueError�formatrrjr(rkr
r)r!r1rE�	extensionZ	init_pathrqr"r"r#�load_package�s"���
r|c	Cs$|\}}}|r|�d�rd|vrtd�|���|dur*|tthvr*d�|�}t|��|tkr4t|||�S|tkr>t|||�S|tkrmtdurm|durgt	|d��}t|||�Wd�S1s`wYdSt|||�S|t
krvt||�S|tkr~t
|�S|tkr�t|�Sd�||�}t||d��)	z�**DEPRECATED**

    Load a module, given information returned by find_module().

    The module name must include the full package name, if any.

    )r?�U�+zinvalid file open mode {!r}Nz.file object required for import (type code {})r8z*Don't know how to import {} (type code {})r )�
startswithryrzr@rArsrur9�load_dynamicr`�
PKG_DIRECTORYr|�	C_BUILTIN�init_builtin�	PY_FROZENrrK)	r!rY�filenameZdetails�suffixr^�type_�msgZopened_filer"r"r#�load_module�s0


$�
r�cCs�t|t�std�t|����t|td�tf�s td�t|����|dur?t|�r0ddddtffSt	|�r<ddddt
ffStj}|D]N}t
j�||�}dtjdfD]}d|}t
j�||�}t
j�|�rpd|ddtffSqQt�D]\}}}||}	t
j�||	�}t
j�|�r�nqtqAn	tt�|�|d��d}
d	|vr�t|d
��}t�|j�d}
Wd�n1s�wYt|||
d�}|||||ffS)a,**DEPRECATED**

    Search for a module.

    If path is omitted or None, search for a built-in, frozen or special
    module and continue search in sys.path. The module name cannot
    contain '.'; to search for a submodule of a package, pass the
    submodule name and the package's __path__.

    z'name' must be a str, not {}Nz%'path' must be None or a list, not {}rJz.pyrrOr r\r8)�encoding)�
isinstance�str�	TypeErrorrz�type�list�RuntimeErrorrr�r	r�r(r1rLrwrrD�isfiler�rHrKrr`�tokenize�detect_encoding�readline)r!r1�entryZpackage_directoryr�Zpackage_file_nameZ	file_pathr^r��	file_namer�rYr"r"r#rQ�sH

����rQcCr)zw**DEPRECATED**

    Reload the module and return it.

    The module must have been successfully imported before.

    )�	importlib�reload)rrr"r"r#r�3r%r�cCs zt|�WStyYdSw)zl**DEPRECATED**

    Load and return a built-in module by name, or None is such module doesn't
    exist
    N)rrKr r"r"r#r�>s

�r�cCs0ddl}|j�||�}|jj|||d�}t|�S)z:**DEPRECATED**

        Load an extension module.
        rN)r!ri�origin)�importlib.machineryr�ExtensionFileLoader�
ModuleSpecr)r!r1rYr�rirqr"r"r#r�Ks�r�rW);rU�_imprrrrrrrr	r
rrKZimportlib._bootstraprr
rrZimportlib._bootstrap_externalrr�rrrLr(r�rr-�warn�DeprecationWarningZSEARCH_ERRORr@rAr9ZPY_RESOURCEr�r�r�ZPY_CODERESOURCEZIMP_HOOKr$r'r+r0r3rHrIrVrlrersrtrur|r�rQr�r�r�r"r"r"r#�<module>sd,��
	


#4