Your IP : 18.226.88.18


Current Path : /opt/alt/python311/lib64/python3.11/importlib/__pycache__/
Upload File :
Current File : //opt/alt/python311/lib64/python3.11/importlib/__pycache__/abc.cpython-311.opt-1.pyc

�

c��f�*���dZddlmZddlmZ	ddlZn #e$rZejdkr�dZYdZ[ndZ[wwxYw	ddlZn
#e$reZYnwxYwddl	m
Z
ddlZddlZddl
mZmZmZgd	�Zd
�ZGd�dej�
��ZGd�dej�
��Zeeejejejej��Gd�dej�
��Zeeej��Gd�de
��ZGd�de
��Zeeejejej��Gd�de��Zeeej ��Gd�dej!ee��Z!ee!ej"ej#��Gd�dej$ee��Z$ee$ej"��dS)z(Abstract base classes related to import.�)�_bootstrap_external)�	machinery�N�_frozen_importlib)�Loader)�ResourceReader�Traversable�TraversableResources)r�Finder�MetaPathFinder�PathEntryFinder�ResourceLoader�
InspectLoader�ExecutionLoader�
FileLoader�SourceLoaderrr	r
c��|D]y}|�|��t�[	tt|j��}n*#t$rtt
|j��}YnwxYw|�|���zdS�N)�registerr�getattr�__name__�AttributeError�_frozen_importlib_external)�abstract_cls�classes�cls�
frozen_clss    �4/opt/alt/python311/lib64/python3.11/importlib/abc.py�	_registerr s����.�.�����c�"�"�"��(�
O�$�%6���E�E�
�
��!�
O�
O�
O�$�%?���N�N�
�
�
�
O�����!�!�*�-�-�-��.�.s�=�$A$�#A$c�:�eZdZdZd�Zejdd���ZdS)ra<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
    c�:�tjdt��dS)Nzqthe Finder ABC is deprecated and slated for removal in Python 3.12; use MetaPathFinder or PathEntryFinder instead��warnings�warn�DeprecationWarning��selfs r�__init__zFinder.__init__7s*���
�4�*�	+�	+�	+�	+�	+�Nc�:�tjdt��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.
        z�importlib.abc.Finder along with its find_module() method are deprecated and slated for removal in Python 3.12; use MetaPathFinder.find_spec() or PathEntryFinder.find_spec() insteadNr")r'�fullname�paths   r�find_modulezFinder.find_module=s,��	�
�=�
*�	+�	+�	+�	+�	+r)r)r�
__module__�__qualname__�__doc__r(�abc�abstractmethodr-�r)rrr+sQ��������+�+�+�	��
+�
+�
+���
+�
+�
+r)r)�	metaclassc��eZdZdZd�Zd�ZdS)rz8Abstract base class for import finders on sys.meta_path.c��tjdtd���t|d��sdS|�||��}|�|jndS)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.

        z�MetaPathFinder.find_module() is deprecated since Python 3.4 in favor of MetaPathFinder.find_spec() and is slated for removal in Python 3.12���
stacklevel�	find_specN)r#r$r%�hasattrr:�loader)r'r+r,�founds    rr-zMetaPathFinder.find_moduleRsg��	�
�:�)�!"�		$�	$�	$�	$�
�t�[�)�)�	��4����x��.�.��$�0�u�|�|�d�:r)c��dS)z�An optional method for clearing the finder's cache, if any.
        This method is used by importlib.invalidate_caches().
        Nr3r&s r�invalidate_cachesz MetaPathFinder.invalidate_cachesg����r)N)rr.r/r0r-r?r3r)rrrKs8������B�B�
;�;�;�*����r)rc�,�eZdZdZd�ZejZd�ZdS)r
z>Abstract base class for path entry finders used by PathFinder.c���tjdtd���t|d��sdgfS|�|��}|�|jsg}n|j}|j|fSdgfS)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)r7r8r:N)r#r$r%r;r:�submodule_search_locationsr<)r'r+r=�portionss    r�find_loaderzPathEntryFinder.find_loaderws���	�
�.�)�!"�		$�	$�	$�	$�
�t�[�)�)�	���8�O����x�(�(�����3�
<���� �;���<��)�)���8�Or)c��dS)z�An optional method for clearing the finder's cache, if any.
        This method is used by PathFinder.invalidate_caches().
        Nr3r&s rr?z!PathEntryFinder.invalidate_caches�r@r)N)	rr.r/r0rEr�_find_module_shimr-r?r3r)rr
r
psC������H�H�
���@&�7�K�����r)r
c�2�eZdZdZejd���ZdS)rz�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��t�)zwAbstract method which when implemented should return the bytes for
        the specified path.  The path must be a str.)�OSError�r'r,s  r�get_datazResourceLoader.get_data�s	���
r)N)rr.r/r0r1r2rLr3r)rrr�s=��������	��������r)rc��eZdZdZd�Zd�Zejd���Ze	dd���Z
ejj
Z
ejjZdS)	rz�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��t�)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.
        ��ImportError�r'r+s  r�
is_packagezInspectLoader.is_package�s
���r)c�^�|�|��}|�dS|�|��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)r'r+�sources   r�get_codezInspectLoader.get_code�s3������*�*���>��4��"�"�6�*�*�*r)c��t�)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.
        rOrQs  rrTzInspectLoader.get_source��
���r)�<string>c�(�t||dd���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,s  rrUzInspectLoader.source_to_code�s���t�T�6��=�=�=�=r)N)rZ)rr.r/r0rRrWr1r2rT�staticmethodrUr�
_LoaderBasics�exec_module�load_moduler3r)rrr�s������������+�+�+�	��������>�>�>��\�>�&�3�?�K�%�3�?�K�K�Kr)rc�8�eZdZdZejd���Zd�ZdS)rz�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��t�)z�Abstract method which should return the value that __file__ is to be
        set to.

        Raises ImportError if the module cannot be found.
        rOrQs  r�get_filenamezExecutionLoader.get_filename�rYr)c���|�|��}|�dS	|�|��}|�||��S#t$r|�|��cYSwxYw)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)rTrfrUrP)r'r+rVr,s    rrWzExecutionLoader.get_code�s�������*�*���>��4�	5��$�$�X�.�.�D��&�&�v�t�4�4�4���	/�	/�	/��&�&�v�.�.�.�.�.�	/���s�A�A(�'A(N)rr.r/r0r1r2rfrWr3r)rrr�sL��������	�������5�5�5�5�5r)rc��eZdZdZdS)rz[Abstract base class partially implementing the ResourceLoader and
    ExecutionLoader ABCs.N)rr.r/r0r3r)rrrs���������r)rc�$�eZdZdZd�Zd�Zd�ZdS)ra�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��|jjtjurt�t	|�|��d��S)z6Return the (int) modification time for the path (str).�mtime)�
path_stats�__func__rrJ�intrKs  r�
path_mtimezSourceLoader.path_mtime%s9���?�#�|�'>�>�>��M��4�?�?�4�(�(��1�2�2�2r)c�n�|jjtjurt�d|�|��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.
        rk)rormrrJrKs  rrlzSourceLoader.path_stats+s3���?�#�|�'>�>�>��M������.�.�/�/r)c��dS)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.
        Nr3)r'r,r_s   r�set_datazSourceLoader.set_data6r@r)N)rr.r/r0rorlrrr3r)rrrsK������
�
�3�3�3�	0�	0�	0�����r)r)%r0�rrrrP�exc�namer�_abcrr1r#�
resources.abcrr	r
�__all__r�ABCMetarr�BuiltinImporter�FrozenImporter�
PathFinder�WindowsRegistryFinderr
�
FileFinderrr�NamespaceLoaderr�ExtensionFileLoaderr�SourceFileLoader�SourcelessFileLoaderrr3r)r�<module>r�sj��.�.�!�!�!�!�!�!������������������
�x�&�&�&�
����������������5�%�%�%�%�%���5�5�5�!4����5����������
�
�
�
�����M�L�L�L�L�L�L�L�L�L�����.�.�.�+�+�+�+�+�s�{�+�+�+�+�@�����s�{�����B
�	�.�)�3�Y�5M�
�
�	� ?�A�A�A�,�,�,�,�,���,�,�,�,�\
�	�/�9�/�0�0�0�
�
�
�
�
�V�
�
�
� 0@�0@�0@�0@�0@�F�0@�0@�0@�d
�	�-��2�I�4L�i�Ng�h�h�h� 5� 5� 5� 5� 5�m� 5� 5� 5�D
�	�/�9�8�9�9�9������$�/������

�	�*�i�0��*�,�,�,�*�*�*�*�*�&�3�^�_�*�*�*�X
�	�,�	�2�3�3�3�3�3s��2�-�2�;�A�A

?>