Hacked By AnonymousFox

Current Path : /proc/thread-self/root/proc/self/root/opt/alt/python35/lib64/python3.5/importlib/__pycache__/
Upload File :
Current File : //proc/thread-self/root/proc/self/root/opt/alt/python35/lib64/python3.5/importlib/__pycache__/abc.cpython-35.pyc



��Yf*�"@sBdZddlmZddlmZddlmZyddlZWn=ek
r�Zzejdkrm�dZWYddZ[XnXyddl	Z	Wn+ek
r�ZzeZ	WYddZ[XnXddl
Z
dd	�ZGd
d�dde
j�Z
Gd
d�de
�Zeeejejejej�Gdd�de
�Zeeej�Gdd�dde
j�ZGdd�de�ZGdd�de�Zeeejej�Gdd�de�Zeeej�Gdd�dejee�Zeeejej�Gdd�dejee�Zeeej�dS)z(Abstract base classes related to import.�)�
_bootstrap)�_bootstrap_external)�	machinery�N�_frozen_importlibcGsxxq|D]i}|j|�tdk	rytt|j�}Wn$tk
rbtt|j�}YnX|j|�qWdS)N)�registerr�getattr�__name__�AttributeError�_frozen_importlib_external)�abstract_cls�classes�cls�
frozen_cls�r�2/opt/alt/python35/lib64/python3.5/importlib/abc.py�	_registers


rc@s.eZdZdZejddd��ZdS)�FinderaLegacy abstract base class for import finders.

    It may be subclassed for compatibility with legacy third party
    reimplementations of the import system.  Otherwise, finder
    implementations should derive from the more specific MetaPathFinder
    or PathEntryFinder ABCs.
    NcCsdS)z�An abstract method that should find a module.
        The fullname is a str and the optional path is a str or None.
        Returns a Loader object or None.
        Nr)�self�fullname�pathrrr�find_module'szFinder.find_module)r	�
__module__�__qualname__�__doc__�abc�abstractmethodrrrrrrsr�	metaclassc@s.eZdZdZdd�Zdd�ZdS)�MetaPathFinderz8Abstract base class for import finders on sys.meta_path.cCs<t|d�sdS|j||�}|dk	r8|jSdS)aNReturn a loader for the module.

        If no module is found, return None.  The fullname is a str and
        the path is a list of strings or None.

        This method is deprecated in favor of finder.find_spec(). If find_spec()
        exists then backwards-compatible functionality is provided for this
        method.

        �	find_specN)�hasattrr�loader)rrr�foundrrrr6szMetaPathFinder.find_modulecCsdS)z�An optional method for clearing the finder's cache, if any.
        This method is used by importlib.invalidate_caches().
        Nr)rrrr�invalidate_cachesFsz MetaPathFinder.invalidate_cachesN)r	rrrrr#rrrrr/src@s7eZdZdZdd�ZejZdd�ZdS)�PathEntryFinderz>Abstract base class for path entry finders used by PathFinder.cCsjt|d�sdgfS|j|�}|dk	r\|jsFg}n	|j}|j|fSdgfSdS)aCReturn (loader, namespace portion) for the path entry.

        The fullname is a str.  The namespace portion is a sequence of
        path entries contributing to part of a namespace package. The
        sequence may be empty.  If loader is not None, the portion will
        be ignored.

        The portion will be discarded if another path entry finder
        locates the module as a normal module or package.

        This method is deprecated in favor of finder.find_spec(). If find_spec()
        is provided than backwards-compatible functionality is provided.

        rN)r r�submodule_search_locationsr!)rrr"�portionsrrr�find_loaderVs
			
zPathEntryFinder.find_loadercCsdS)z�An optional method for clearing the finder's cache, if any.
        This method is used by PathFinder.invalidate_caches().
        Nr)rrrrr#ssz!PathEntryFinder.invalidate_cachesN)	r	rrrr'r�_find_module_shimrr#rrrrr$Os	r$c@s:eZdZdZdd�Zdd�Zdd�ZdS)	�Loaderz'Abstract base class for import loaders.cCsdS)z�Return a module to initialize and into which to load.

        This method should raise ImportError if anything prevents it
        from creating a new module.  It may return None to indicate
        that the spec should create the new module.
        Nr)r�specrrr�
create_moduleszLoader.create_modulecCs%t|d�st�tj||�S)a�Return the loaded module.

        The module must be added to sys.modules and have import-related
        attributes set properly.  The fullname is a str.

        ImportError is raised on failure.

        This method is deprecated in favor of loader.exec_module(). If
        exec_module() exists then it is used to provide a backwards-compatible
        functionality for this method.

        �exec_module)r �ImportErrorr�_load_module_shim)rrrrr�load_module�s
zLoader.load_modulecCs
t�dS)z�Return a module's repr.

        Used by the module type when the method does not raise
        NotImplementedError.

        This method is deprecated.

        N)�NotImplementedError)r�modulerrr�module_repr�s
zLoader.module_reprN)r	rrrr+r/r2rrrrr){s
r)c@s+eZdZdZejdd��ZdS)�ResourceLoaderz�Abstract base class for loaders which can return data from their
    back-end storage.

    This ABC represents one of the optional protocols specified by PEP 302.

    cCs
t�dS)zwAbstract method which when implemented should return the bytes for
        the specified path.  The path must be a str.N)�IOError)rrrrr�get_data�szResourceLoader.get_dataN)r	rrrrrr5rrrrr3�sr3c@speZdZdZdd�Zdd�Zejdd��Ze	dd	d
��Z
ejj
Z
ejjZdS)�
InspectLoaderz�Abstract base class for loaders which support inspection about the
    modules they can load.

    This ABC represents one of the optional protocols specified by PEP 302.

    cCs
t�dS)z�Optional method which when implemented should return whether the
        module is a package.  The fullname is a str.  Returns a bool.

        Raises ImportError if the module cannot be found.
        N)r-)rrrrr�
is_package�szInspectLoader.is_packagecCs,|j|�}|dkrdS|j|�S)aMethod which returns the code object for the module.

        The fullname is a str.  Returns a types.CodeType if possible, else
        returns None if a code object does not make sense
        (e.g. built-in module). Raises ImportError if the module cannot be
        found.
        N)�
get_source�source_to_code)rr�sourcerrr�get_code�szInspectLoader.get_codecCs
t�dS)z�Abstract method which should return the source code for the
        module.  The fullname is a str.  Returns a str.

        Raises ImportError if the module cannot be found.
        N)r-)rrrrrr8�szInspectLoader.get_sourcez<string>cCst||ddd�S)z�Compile 'data' into a code object.

        The 'data' argument can be anything that compile() can handle. The'path'
        argument should be where the data was retrieved (when applicable).�exec�dont_inheritT)�compile)�datarrrrr9�szInspectLoader.source_to_codeN)r	rrrr7r;rrr8�staticmethodr9r�
_LoaderBasicsr,r/rrrrr6�s
	r6c@s7eZdZdZejdd��Zdd�ZdS)�ExecutionLoaderz�Abstract base class for loaders that wish to support the execution of
    modules as scripts.

    This ABC represents one of the optional protocols specified in PEP 302.

    cCs
t�dS)z�Abstract method which should return the value that __file__ is to be
        set to.

        Raises ImportError if the module cannot be found.
        N)r-)rrrrr�get_filename�szExecutionLoader.get_filenamecCsh|j|�}|dkrdSy|j|�}Wntk
rS|j|�SYnX|j||�SdS)z�Method to return the code object for fullname.

        Should return None if not applicable (e.g. built-in module).
        Raise ImportError if the module cannot be found.
        N)r8rCr-r9)rrr:rrrrr;s
zExecutionLoader.get_codeN)r	rrrrrrCr;rrrrrB�s	rBc@seZdZdZdS)�
FileLoaderz[Abstract base class partially implementing the ResourceLoader and
    ExecutionLoader ABCs.N)r	rrrrrrrrDsrDc@s:eZdZdZdd�Zdd�Zdd�ZdS)	�SourceLoadera�Abstract base class for loading source code (and optionally any
    corresponding bytecode).

    To support loading from source code, the abstractmethods inherited from
    ResourceLoader and ExecutionLoader need to be implemented. To also support
    loading from bytecode, the optional methods specified directly by this ABC
    is required.

    Inherited abstractmethods not implemented in this ABC:

        * ResourceLoader.get_data
        * ExecutionLoader.get_filename

    cCs2|jjtjkrt�t|j|�d�S)z6Return the (int) modification time for the path (str).�mtime)�
path_stats�__func__rEr4�int)rrrrr�
path_mtime.szSourceLoader.path_mtimecCs.|jjtjkrt�d|j|�iS)aReturn a metadata dict for the source pointed to by the path (str).
        Possible keys:
        - 'mtime' (mandatory) is the numeric timestamp of last source
          code modification;
        - 'size' (optional) is the size in bytes of the source code.
        rF)rJrHrEr4)rrrrrrG4szSourceLoader.path_statscCsdS)aWrite the bytes to the path (if possible).

        Accepts a str path and data as bytes.

        Any needed intermediary directories are to be created. If for some
        reason the file cannot be written because of permissions, fail
        silently.
        Nr)rrr?rrr�set_data?szSourceLoader.set_dataN)r	rrrrJrGrKrrrrrEsrE)r�rrrrr-�exc�namerrr�ABCMetarr�BuiltinImporter�FrozenImporter�
PathFinder�WindowsRegistryFinderr$�
FileFinderr)r3r6rB�ExtensionFileLoaderrD�SourceFileLoader�SourcelessFileLoaderrErrrr�<module>s@)/2"
,

Hacked By AnonymousFox1.0, Coded By AnonymousFox