Hacked By AnonymousFox

Current Path : /opt/alt/python312/lib64/python3.12/importlib/__pycache__/
Upload File :
Current File : //opt/alt/python312/lib64/python3.12/importlib/__pycache__/abc.cpython-312.pyc

�

�Q�f���4�dZddlmZddlmZ	ddlZ	ddlZddl	m
Z
ddlZddlZddl
mZgd	�Zd
�Zd�ZGd�d
ej$��Zeeej(ej*ej,ej.�Gd�dej$��Zeeej2�Gd�de
�ZGd�de
�Zeeej(ej*ej8�Gd�de�Zeeej<�Gd�dej>ee�Zeeej@ejB�Gd�dejDee�Z"ee"ej@�y#e$rZejdk7r�dZYdZ[��pdZ[wwxYw#e$reZY��}wxYw)z(Abstract base classes related to import.�)�_bootstrap_external)�	machinery�N�_frozen_importlib)�Loader)�abc)r�MetaPathFinder�PathEntryFinder�ResourceLoader�
InspectLoader�ExecutionLoader�
FileLoader�SourceLoaderc���|tjvr?tt|�}tjt
�d|��d��|t
�|<|Stdt
�d|����)z{
    For backwards compatibility, continue to make names
    from _resources_abc available through this module. #93963
    �.)��)�removezmodule z has no attribute )�_resources_abc�__all__�getattr�warnings�_deprecated�__name__�globals�AttributeError)�name�objs  �4/opt/alt/python312/lib64/python3.12/importlib/abc.py�__getattr__r sb��
�~�%�%�%��n�d�+������z��4�&�1�'�B���	�$���
�
�7�8�,�.@���I�
J�J�c���|D]F}|j|�t��	tt|j�}|j|��Hy#t$rtt
|j�}Y�9wxYw)N)�registerrrrr�_frozen_importlib_external)�abstract_cls�classes�cls�
frozen_clss    r�	_registerr))sk�������c�"��(�
O�$�%6����E�
�
�!�!�*�-���
"�
O�$�%?����N�
�
O�s�A
�
#A3�2A3c��eZdZdZd�Zy)r	z8Abstract base class for import finders on sys.meta_path.c��y)z�An optional method for clearing the finder's cache, if any.
        This method is used by importlib.invalidate_caches().
        N���selfs r�invalidate_cachesz MetaPathFinder.invalidate_caches;��r!N�r�
__module__�__qualname__�__doc__r/r,r!rr	r	4s
��B�
r!r	)�	metaclassc��eZdZdZd�Zy)r
z>Abstract base class for path entry finders used by PathFinder.c��y)z�An optional method for clearing the finder's cache, if any.
        This method is used by PathFinder.invalidate_caches().
        Nr,r-s rr/z!PathEntryFinder.invalidate_cachesHr0r!Nr1r,r!rr
r
Ds
��H�r!r
c�4�eZdZdZej
d��Zy)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.�paths  r�get_datazResourceLoader.get_dataYs	���
r!N)rr2r3r4r�abstractmethodr=r,r!rrrPs!���	�����r!rc��eZdZdZd�Zd�Zejd��Ze	dd��Z
ejjZ
ejjZy)rz�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.�fullnames  r�
is_packagezInspectLoader.is_packageis
���r!c�L�|j|�}|�y|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)r.rD�sources   r�get_codezInspectLoader.get_codeqs+������*���>���"�"�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.
        rArCs  rrGzInspectLoader.get_source~�
���r!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  rrHzInspectLoader.source_to_code�s���t�T�6��=�=r!N)z<string>)rr2r3r4rErJrr>rG�staticmethodrHr�
_LoaderBasics�exec_module�load_moduler,r!rrr`sc����+�	�������>��>�&�3�3�?�?�K�%�3�3�?�?�Kr!rc�:�eZdZdZej
d��Zd�Zy)r
z�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.
        rArCs  r�get_filenamezExecutionLoader.get_filename�rLr!c��|j|�}|�y	|j|�}|j||�S#t$r|j|�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)rGrXrHrB)r.rDrIr<s    rrJzExecutionLoader.get_code�sf������*���>��	5��$�$�X�.�D��&�&�v�t�4�4���	/��&�&�v�.�.�	/�s�9�A�AN)rr2r3r4rr>rXrJr,r!rr
r
�s&���	������5r!r
c��eZdZdZy)rz[Abstract base class partially implementing the ResourceLoader and
    ExecutionLoader ABCs.N)rr2r3r4r,r!rrr�s��r!rc�"�eZdZdZd�Zd�Zd�Zy)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	|j|�d�S)z6Return the (int) modification time for the path (str).�mtime)�
path_stats�__func__rr:�intr;s  r�
path_mtimezSourceLoader.path_mtime�s8���?�?�#�#�|�'>�'>�>��M��4�?�?�4�(��1�2�2r!c��|jjtjurt�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.
        r])rar_rr:r;s  rr^zSourceLoader.path_stats�s5���?�?�#�#�|�'>�'>�>��M������.�/�/r!c��y)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,)r.r<rQs   r�set_datazSourceLoader.set_data�r0r!N)rr2r3r4rar^rdr,r!rrr�s��
�3�	0�r!r)#r4�rrrrB�excrr$�_abcrrr�	resourcesrrr r)�ABCMetar	�BuiltinImporter�FrozenImporter�
PathFinder�WindowsRegistryFinderr
�
FileFinderrr�NamespaceLoaderr
�ExtensionFileLoaderr�SourceFileLoader�SourcelessFileLoaderrr,r!r�<module>rss���.�!����
5�%��
��,���
K�.�
�s�{�{�
�
�.�)�3�3�Y�5M�5M�
�
�
�	� ?� ?�A������
�/�9�/�/�0�
�V�
� 0@�F�0@�d
�-��2�2�I�4L�4L�i�Ng�Ng�h� 5�m� 5�D
�/�9�8�8�9��$�/�/����

�*�i�0�0��*�*�,�*�&�3�3�^�_�*�X
�,�	�2�2�3��S��
�x�x�&�&�
�������5�!4��5�s(�E'�F�'F	�,F�F	�F�F

Hacked By AnonymousFox1.0, Coded By AnonymousFox