
Â�Â­Â�Â­Â�Â­Â�Â­Â�Â­Â�Â­Â�Â­Â�Â­Â�Â­Â�Â­Â�Â­Â�Â­Â�Â­Â�Â­Â�Â­Â�Â­Â�Â­Â�Â­
<!DOCTYPE html>
<html>
U
    ¡ê,a()  ã                   @   sÊ  d Z ddlmZmZmZmZmZmZmZm	Z	m
Z
 zddlmZ W n ek
rX   dZY nX ddlmZmZmZmZ ddlmZ ddlmZ ddlmZ ddlZddlZddlZddlZddlZddlZejd	ed
d� dZdZd
Z dZ!dZ"dZ#dZ$dZ%dZ&dZ'dd„ Z(dd„ Z)dd„ Z*d8dd„Z+dd„ Z,dd„ Z-G d d!„ d!ƒZ.G d"d#„ d#ƒZ/G d$d%„ d%e/ej0ƒZ1d9d&d'„Z2G d(d)„ d)e/eƒZ3d:d*d+„Z4d,d-„ Z5d.d/„ Z6d;d0d1„Z7d2d3„ Z8d4d5„ Z9e�rÂd<d6d7„Z:ndZ:dS )=zâ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)Úutilzhthe imp module is deprecated in favour of importlib; see the module's documentation for alternative usesé   )Ú
stacklevelé   é   é   é   é   é   é   é	   c                 C   s
   t  | ¡S )z_**DEPRECATED**

    Create a new module.

    The module is not entered into sys.modules.

    )ÚtypesÚ
ModuleType©Úname© r!   ú(/opt/alt/python38/lib64/python3.8/imp.pyÚ
new_module0   s    r#   c                   C   s   t jS )z@**DEPRECATED**

    Return the magic number for .pyc files.
    )r   ÚMAGIC_NUMBERr!   r!   r!   r"   Ú	get_magic;   s    r%   c                   C   s   t jjS )z$Return the magic tag for .pyc files.)ÚsysÚimplementationÚ	cache_tagr!   r!   r!   r"   Úget_tagC   s    r)   c              
   C   s6   t  ¡ �$ t  d¡ t | |¡W  5 Q R £ S Q R X dS )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"   r.   H   s    

r.   c                 C   s
   t  | ¡S )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©r/   r!   r!   r"   r1   [   s    r1   c                  C   s<   dd„ t jD ƒ} dd„ t jD ƒ}dd„ t jD ƒ}| | | S )ú**DEPRECATED**c                 S   s   g | ]}|d t f‘qS ©Úrb)ÚC_EXTENSION©Ú.0Úsr!   r!   r"   Ú
<listcomp>k   s     z get_suffixes.<locals>.<listcomp>c                 S   s   g | ]}|d t f‘qS )Úr)Ú	PY_SOURCEr7   r!   r!   r"   r:   l   s     c                 S   s   g | ]}|d t f‘qS r4   )ÚPY_COMPILEDr7   r!   r!   r"   r:   m   s     )r   ÚEXTENSION_SUFFIXESÚSOURCE_SUFFIXESÚBYTECODE_SUFFIXES)Ú
extensionsÚsourceÚbytecoder!   r!   r"   Úget_suffixesi   s    rD   c                   @   s    e Zd ZdZdd„ Zdd„ ZdS )ÚNullImporterz-**DEPRECATED**

    Null import object.

    c                 C   s2   |dkrt ddd�‚ntj |¡r.t d|d�‚d S )NÚ zempty pathnamer2   zexisting directory)ÚImportErrorÚosr/   Úisdir)Úselfr/   r!   r!   r"   Ú__init__z   s    zNullImporter.__init__c                 C   s   dS )zAlways returns None.Nr!   )rJ   Úfullnamer!   r!   r"   Úfind_module€   s    zNullImporter.find_moduleN)Ú__name__Ú
__module__Ú__qualname__Ú__doc__rK   rM   r!   r!   r!   r"   rE   r   s   rE   c                       s.   e Zd ZdZd‡ fdd„	Z‡ fdd„Z‡  ZS )Ú_HackedGetDatazMCompatibility support for 'file' arguments of various load_*()
    functions.Nc                    s   t ƒ  ||¡ || _d S )N)ÚsuperrK   Úfile)rJ   rL   r/   rT   ©Ú	__class__r!   r"   rK   Š   s    z_HackedGetData.__init__c              
      s|   | j rl|| jkrl| j js0| j }d|jkr0| ¡  | j jrJt| jdƒ | _ }|� | ¡ W  5 Q R £ S Q R X ntƒ  |¡S dS )z;Gross hack to contort loader to deal w/ load_*()'s bad API.Úbr5   N)	rT   r/   ÚclosedÚmodeÚcloseÚopenÚreadrS   Úget_data)rJ   r/   rT   rU   r!   r"   r]   Ž   s    
z_HackedGetData.get_data)N)rN   rO   rP   rQ   rK   r]   Ú__classcell__r!   r!   rU   r"   rR   …   s   rR   c                   @   s   e Zd ZdZdS )Ú_LoadSourceCompatibilityz5Compatibility support for implementing load_source().N©rN   rO   rP   rQ   r!   r!   r!   r"   r_       s   r_   c                 C   s\   t | ||ƒ}tj| ||d�}| tjkr8t|tj|  ƒ}nt|ƒ}t | |¡|_	|j	|j
_|S )N©Úloader)r_   r   Úspec_from_file_locationr&   Úmodulesr   r   r   ÚSourceFileLoaderÚ
__loader__Ú__spec__rb   ©r    ÚpathnamerT   rb   ÚspecÚmoduler!   r!   r"   Úload_source¥   s    

rl   c                   @   s   e Zd ZdZdS )Ú_LoadCompiledCompatibilityz7Compatibility support for implementing load_compiled().Nr`   r!   r!   r!   r"   rm   ³   s   rm   c                 C   sZ   t | ||ƒ}tj| ||d�}| tjkr8t|tj|  ƒ}nt|ƒ}t| |ƒ|_|j|j	_
|S )r3   ra   )rm   r   rc   r&   rd   r   r   r   rf   rg   rb   rh   r!   r!   r"   Úload_compiled¸   s    

rn   c                 C   sœ   t j |¡rftjdd… tjdd…  }|D ]*}t j |d| ¡}t j |¡r,|} qfq,td 	|¡ƒ‚t
j| |g d�}| tjkr�t|tj|  ƒS t|ƒS dS )r3   NrK   z{!r} is not a package)Úsubmodule_search_locations)rH   r/   rI   r   r?   r@   ÚjoinÚexistsÚ
ValueErrorÚformatr   rc   r&   rd   r   r   )r    r/   rA   Ú	extensionZ	init_pathrj   r!   r!   r"   Úload_packageÇ   s     ÿÿ
ru   c           	   
   C   s$  |\}}}|r0|  d¡r d|kr0td |¡ƒ‚nð|dkrX|tthkrXd |¡}t|ƒ‚nÈ|tkrlt| ||ƒS |tkr€t| ||ƒS |tkrÒtdk	rÒ|dkrÄt	|dƒ�}t| ||ƒW  5 Q R £ S Q R X nt| ||ƒS nN|t
krät| |ƒS |tk� röt| ƒS |tk�rt| ƒS d | |¡}t|| d�‚dS )	z–**DEPRECATED**

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

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

    )r;   ÚUú+zinvalid file open mode {!r}Nz.file object required for import (type code {})r5   z*Don't know how to import {} (type code {})r   )Ú
startswithrr   rs   r<   r=   rl   rn   r6   Úload_dynamicr[   ÚPKG_DIRECTORYru   Ú	C_BUILTINÚinit_builtinÚ	PY_FROZENr   rG   )	r    rT   ÚfilenameZdetailsÚsuffixrY   Útype_ÚmsgZopened_filer!   r!   r"   Úload_moduleÛ   s.    


 


r‚   c              	   C   sŒ  t | tƒstd t| ƒ¡ƒ‚n$t |tdƒtfƒsBtd t|ƒ¡ƒ‚|dkr€t| ƒrbddddtffS t	| ƒrzddddt
ffS tj}|D ]¢}tj || ¡}dtjd fD ]>}d| }tj ||¡}tj |¡r¤d|ddtff    S q¤tƒ D ]2\}}}| | }	tj ||	¡}tj |¡rê �q qêq„ �q:q„tt | ¡| d�‚d}
d	|k�rnt|d
ƒ�}t |j¡d }
W 5 Q R X t|||
d�}|||||ffS )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 {}rF   z.pyr   rK   r   rW   r5   )Úencoding)Ú
isinstanceÚstrÚ	TypeErrorrs   ÚtypeÚlistÚRuntimeErrorr   r{   r	   r}   r&   r/   rH   rp   r   r@   Úisfilerz   rD   rG   r   r[   ÚtokenizeÚdetect_encodingÚreadline)r    r/   ÚentryZpackage_directoryr   Zpackage_file_nameZ	file_pathrY   r€   Ú	file_namerƒ   rT   r!   r!   r"   rM   þ   sB    
ÿ
rM   c                 C   s
   t  | ¡S )zw**DEPRECATED**

    Reload the module and return it.

    The module must have been successfully imported before.

    )Ú	importlibÚreload)rk   r!   r!   r"   r‘   2  s    r‘   c                 C   s&   z
t | ƒW S  tk
r    Y dS X dS )zl**DEPRECATED**

    Load and return a built-in module by name, or None is such module doesn't
    exist
    N)r   rG   r   r!   r!   r"   r|   =  s    
r|   c                 C   s0   ddl }|j | |¡}|jj| ||d�}t|ƒS )z:**DEPRECATED**

        Load an extension module.
        r   N)r    rb   Úorigin)Úimportlib.machineryr   ÚExtensionFileLoaderÚ
ModuleSpecr   )r    r/   rT   r�   rb   rj   r!   r!   r"   ry   J  s      ÿry   )N)N)N)N)N);rQ   Ú_impr   r   r   r   r   r   r   r	   r
   r   rG   Zimportlib._bootstrapr   r   r   r   Zimportlib._bootstrap_externalr   r�   r   r   rH   r&   r‹   r   r+   ÚwarnÚDeprecationWarningZSEARCH_ERRORr<   r=   r6   ZPY_RESOURCErz   r{   r}   ZPY_CODERESOURCEZIMP_HOOKr#   r%   r)   r.   r1   rD   rE   rR   re   r_   rl   rm   rn   ru   r‚   rM   r‘   r|   ry   r!   r!   r!   r"   Ú<module>   sb   ,
 þ
	

#
4