����JFIF���������
1#@!#!123s
D7net
Home
Console
Upload
information
Create File
Create Folder
About
Tools
:
/
opt
/
alt
/
python37
/
lib64
/
python3.7
/
importlib
/
__pycache__
/
Filename :
abc.cpython-37.opt-1.pyc
back
Copy
B ����� fI2��������������� ���@���s���d�Z�ddlmZ�ddlmZ�ddlmZ�yddlZW�n2�ek rf�Z�zejdkrR��dZW�ddZ[X�Y�nX�yddl Z W�n&�ek r��Z�zeZ W�ddZ[X�Y�nX�ddl Z ddlZdd ��ZG�d d��de j d�ZG�d d��de�Zeeejejejej��G�dd��de�Zeeej��G�dd��de j d�ZG�dd��de�ZG�dd��de�Zeeejej��G�dd��de�Zeeej��G�dd��dejee�Zeeejej��G�dd��dejee�Zeeej��G�dd��de j d�Zeeej��dS�)z(Abstract base classes related to import.����)� _bootstrap)�_bootstrap_external)� machinery�����N�_frozen_importlibc���������� ���G���s`���xZ|D�]R}|���|��td�k rytt|j�}W�n �tk rL���tt|j�}Y�nX�|���|��qW�d�S�)N)�registerr����getattr�__name__�AttributeError�_frozen_importlib_external)�abstract_cls�classes�cls� frozen_cls��r����2/opt/alt/python37/lib64/python3.7/importlib/abc.py� _register���s���� r���c���������������@���s ���e�Zd�ZdZejddd��ZdS�)�Findera<��Legacy 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. Deprecated since Python 3.3 Nc�������������C���s���dS�)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�pathr���r���r����find_module*���s����zFinder.find_module)N)r ���� __module__�__qualname__�__doc__�abc�abstractmethodr���r���r���r���r���r������s��� r���)� metaclassc���������������@���s ���e�Zd�ZdZdd��Zdd��ZdS�)�MetaPathFinderz8Abstract base class for import finders on sys.meta_path.c�������������C���s<���t�jdtdd��t|�d�sdS�|��||�}|dk r8|jS�dS�)a_��Return 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 since Python 3.4 in favor of finder.find_spec(). If find_spec() exists then backwards-compatible functionality is provided for this method. zxMetaPathFinder.find_module() is deprecated since Python 3.4 in favor of MetaPathFinder.find_spec() (available since 3.4)����)� stacklevel� find_specN)�warnings�warn�DeprecationWarning�hasattrr!����loader)r���r���r����foundr���r���r���r���9���s���� zMetaPathFinder.find_modulec�������������C���s���dS�)z�An optional method for clearing the finder's cache, if any. This method is used by importlib.invalidate_caches(). Nr���)r���r���r���r����invalidate_cachesN���s����z MetaPathFinder.invalidate_cachesN)r ���r���r���r���r���r(���r���r���r���r���r���2���s���r���c���������������@���s&���e�Zd�ZdZdd��ZejZdd��ZdS�)�PathEntryFinderz>Abstract base class for path entry finders used by PathFinder.c�������������C���s\���t�jdtdd��t|�d�s"dg�fS�|��|�}|dk rP|js@g�}n|j}|j|fS�dg�fS�dS�)a[��Return (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 since Python 3.4 in favor of finder.find_spec(). If find_spec() is provided than backwards-compatible functionality is provided. zzPathEntryFinder.find_loader() is deprecated since Python 3.4 in favor of PathEntryFinder.find_spec() (available since 3.4)r���)r ���r!���N)r"���r#���r$���r%���r!����submodule_search_locationsr&���)r���r���r'����portionsr���r���r����find_loader^���s���� zPathEntryFinder.find_loaderc�������������C���s���dS�)z�An optional method for clearing the finder's cache, if any. This method is used by PathFinder.invalidate_caches(). Nr���)r���r���r���r���r(�������s����z!PathEntryFinder.invalidate_cachesN) r ���r���r���r���r,���r����_find_module_shimr���r(���r���r���r���r���r)���W���s��� r)���c���������������@���s(���e�Zd�ZdZdd��Zdd��Zdd��ZdS�) �Loaderz'Abstract base class for import loaders.c�������������C���s���dS�)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����specr���r���r���� create_module����s����zLoader.create_modulec�������������C���s���t�|�d�st�t�|�|�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)r���r���r���r���r����load_module����s���� zLoader.load_modulec�������������C���s���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����moduler���r���r����module_repr����s���� zLoader.module_reprN)r ���r���r���r���r0���r4���r7���r���r���r���r���r.�������s��� r.���c���������������@���s���e�Zd�ZdZejdd���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. c�������������C���s���t��dS�)zwAbstract method which when implemented should return the bytes for the specified path. The path must be a str.N)�OSError)r���r���r���r���r����get_data����s����zResourceLoader.get_dataN)r ���r���r���r���r���r���r:���r���r���r���r���r8�������s���r8���c���������������@���sL���e�Zd�ZdZdd��Zdd��Zejdd���Ze dd d ��Z ejj Z ejjZdS�) � 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. c�������������C���s���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)r2���)r���r���r���r���r���� is_package����s����zInspectLoader.is_packagec�������������C���s ���|���|�}|dkrdS�|��|�S�)a��Method 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)r���r����sourcer���r���r����get_code����s���� zInspectLoader.get_codec�������������C���s���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)r2���)r���r���r���r���r���r=�������s����zInspectLoader.get_source�<string>c�������������C���s���t�|�|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).�execT)�dont_inherit)�compile)�datar���r���r���r���r>�������s����zInspectLoader.source_to_codeN)rA���)r ���r���r���r���r<���r@���r���r���r=����staticmethodr>���r���� _LoaderBasicsr1���r4���r���r���r���r���r;�������s��� r;���c���������������@���s&���e�Zd�ZdZejdd���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. c�������������C���s���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)r2���)r���r���r���r���r����get_filename��s����zExecutionLoader.get_filenamec�������������C���sP���|���|�}|dkrdS�y|��|�}W�n�tk r>���|��|�S�X�|��||�S�dS�)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)r=���rI���r2���r>���)r���r���r?���r���r���r���r���r@�����s���� zExecutionLoader.get_codeN)r ���r���r���r���r���r���rI���r@���r���r���r���r���rH�������s��� rH���c���������������@���s���e�Zd�ZdZdS�)� FileLoaderz[Abstract base class partially implementing the ResourceLoader and ExecutionLoader ABCs.N)r ���r���r���r���r���r���r���r���rJ���!��s���rJ���c���������������@���s(���e�Zd�ZdZdd��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 c�������������C���s$���|�j�jtj�krt�t|���|�d��S�)z6Return the (int) modification time for the path (str).�mtime)� path_stats�__func__rK���r9����int)r���r���r���r���r���� path_mtime;��s����zSourceLoader.path_mtimec�������������C���s ���|�j�jtj�krt�d|���|�iS�)a��Return 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. rL���)rP���rN���rK���r9���)r���r���r���r���r���rM���A��s����zSourceLoader.path_statsc�������������C���s���dS�)a��Write 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���)r���r���rE���r���r���r����set_dataL��s����zSourceLoader.set_dataN)r ���r���r���r���rP���rM���rQ���r���r���r���r���rK���*��s���rK���c���������������@���sH���e�Zd�ZdZejdd���Zejdd���Zejdd���Zejdd ���Z d S�)�ResourceReaderz�Abstract base class to provide resource-reading support. Loaders that support resource reading are expected to implement the ``get_resource_reader(fullname)`` method and have it either return None or an object compatible with this ABC. c�������������C���s���t��dS�)a��Return an opened, file-like object for binary reading. The 'resource' argument is expected to represent only a file name and thus not contain any subdirectory components. If the resource cannot be found, FileNotFoundError is raised. N)�FileNotFoundError)r����resourcer���r���r���� open_resourceb��s���� zResourceReader.open_resourcec�������������C���s���t��dS�)a!��Return the file system path to the specified resource. The 'resource' argument is expected to represent only a file name and thus not contain any subdirectory components. If the resource does not exist on the file system, raise FileNotFoundError. N)rS���)r���rT���r���r���r���� resource_pathm��s���� zResourceReader.resource_pathc�������������C���s���t��dS�)z7Return True if the named 'name' is consider a resource.N)rS���)r����namer���r���r����is_resourcey��s����zResourceReader.is_resourcec�������������C���s���g�S�)z?Return an iterable of strings over the contents of the package.r���)r���r���r���r����contents~��s����zResourceReader.contentsN) r ���r���r���r���r���r���rU���rV���rX���rY���r���r���r���r���rR���Y��s ���rR���) r�����r���r���r���r���r2����excrW���r���r���r"���r����ABCMetar���r����BuiltinImporter�FrozenImporter� PathFinder�WindowsRegistryFinderr)���� FileFinderr.���r8���r;���rH����ExtensionFileLoaderrJ����SourceFileLoader�SourcelessFileLoaderrK���rR���r���r���r���r����<module>���sF��� !./2",+