AlkantarClanX12

Your IP : 18.118.154.237


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

�

c��f_����dZd�ZdZdZdZdad�Zd�ZiZiZ	Gd�de
��ZGd�d��ZGd	�d
��Z
Gd�d��Zd
�Zd�Zd�Zdd�d�Zd�Zd�Zd�Zd�ZGd�d��Zddd�d�Zd>d�Zdd�d�Zd�Zd �Zd!�Zd"�Zd#�Zd$�Z Gd%�d&��Z!Gd'�d(��Z"Gd)�d*��Z#d+�Z$d,�Z%d?d-�Z&d.�Z'd/Z(e(d0zZ)d1�Z*e+��Z,d2�Z-d@d4�Z.dd5�d6�Z/d7�Z0dAd9�Z1d:�Z2d;�Z3d<�Z4d=�Z5dS)BaSCore implementation of import.

This module is NOT meant to be directly imported! It has been designed such
that it can be bootstrapped into Python as the implementation of import. As
such it requires the injection of specific modules and attributes in order to
work. One should use importlib as the public-facing version of this module.

c�Z�	|jS#t$rt|��jcYSwxYw�N)�__qualname__�AttributeError�type)�objs �;/opt/alt/python311/lib64/python3.11/importlib/_bootstrap.py�_object_namer	s@��&������&�&�&��C�y�y�%�%�%�%�&���s�	�*�*Nc	��dD]1}t||��rt||t||�����2|j�|j��dS)z/Simple substitute for functools.update_wrapper.)�
__module__�__name__r�__doc__N)�hasattr�setattr�getattr�__dict__�update)�new�old�replaces   r�_wrapr(s^��H�9�9���3�� � �	9��C��'�#�w�"7�"7�8�8�8���L�����%�%�%�%�%�c�<�tt��|��Sr)r�sys��names r�_new_moduler0s���4��9�9�T�?�?�rc��eZdZdS)�_DeadlockErrorN)rrr�rrrr=s�������Drrc�0�eZdZdZd�Zd�Zd�Zd�Zd�ZdS)�_ModuleLockz�A recursive lock implementation which is able to detect deadlocks
    (e.g. thread 1 trying to take locks A then B, and thread 2 trying to
    take locks B then A).
    c��t���|_t���|_||_d|_d|_d|_dS�N�)�_thread�
allocate_lock�lock�wakeupr�owner�count�waiters��selfrs  r�__init__z_ModuleLock.__init__GsH���)�)�+�+��	��+�+�-�-�����	���
���
�����rc���t���}|j}t��}	t�|��}|�dS|j}||krdS||vrdS|�|���I)NTF)r%�	get_identr)�set�_blocking_on�get�add)r-�me�tid�seenr's     r�has_deadlockz_ModuleLock.has_deadlockOs~��
�
�
�
 �
 ���j���u�u��	��#�#�C�(�(�D��|��u��*�C��b�y�y��t��d�{�{��u��H�H�S�M�M�M�	rc�0�t���}|t|<		|j5|jdks|j|kr-||_|xjdz
c_	ddd��t|=dS|���rtd|z���|j�	d��r|xj
dz
c_
ddd��n#1swxYwY|j�	��|j�����#t|=wxYw)z�
        Acquire the module lock.  If a potential deadlock is detected,
        a _DeadlockError is raised.
        Otherwise, the lock is always acquired and True is returned.
        Tr$�Nzdeadlock detected by %rF)r%r0r2r'r*r)r8rr(�acquirer+�release�r-r6s  rr;z_ModuleLock.acquireds}�����!�!�� ��S��	"�
&��Y�*�*��z�Q���$�*��*;�*;�%(��
��
�
�a��
�
�#�	*�*�*�*�*�*��S�!�!�!��(�(�*�*�O�,�-F��-M�N�N�N��{�*�*�5�1�1�*�����)���*�*�*�*�*�*�*�*�*�*�*����*�*�*�*���#�#�%�%�%���#�#�%�%�%�
&���S�!�!�!�!�!s;�D�/C
�D�1AC
�D�
C�D�C�6D�
Dc�j�t���}|j5|j|krt	d���|jdksJ�|xjdzc_|jdkr7d|_|jr)|xjdzc_|j���ddd��dS#1swxYwYdS)N�cannot release un-acquired lockr$r:)	r%r0r'r)�RuntimeErrorr*r+r(r<r=s  rr<z_ModuleLock.release}s������!�!��
�Y�		*�		*��z�S� � �"�#D�E�E�E��:��>�>�>�>��J�J�!�O�J�J��z�Q���!��
��<�*��L�L�A�%�L�L��K�'�'�)�)�)�		*�		*�		*�		*�		*�		*�		*�		*�		*�		*�		*�		*����		*�		*�		*�		*�		*�		*s�A:B(�(B,�/B,c�R�d�|jt|����S)Nz_ModuleLock({!r}) at {}��formatr�id�r-s r�__repr__z_ModuleLock.__repr__�s ��(�/�/��	�2�d�8�8�D�D�DrN)	rrrr
r.r8r;r<rFrrrr!r!Asn��������
������*"�"�"�2*�*�*�E�E�E�E�Err!c�*�eZdZdZd�Zd�Zd�Zd�ZdS)�_DummyModuleLockzVA simple _ModuleLock equivalent for Python builds without
    multi-threading support.c�"�||_d|_dSr#)rr*r,s  rr.z_DummyModuleLock.__init__�s����	���
�
�
rc�&�|xjdz
c_dS)Nr:T)r*rEs rr;z_DummyModuleLock.acquire�s���
�
�a��
�
��trc�Z�|jdkrtd���|xjdzc_dS)Nr$r?r:)r*r@rEs rr<z_DummyModuleLock.release�s/���:��?�?��@�A�A�A��
�
�a��
�
�
�
rc�R�d�|jt|����S)Nz_DummyModuleLock({!r}) at {}rBrEs rrFz_DummyModuleLock.__repr__�s ��-�4�4�T�Y��4���I�I�IrN)rrrr
r.r;r<rFrrrrHrH�s_������ � ����������
J�J�J�J�JrrHc� �eZdZd�Zd�Zd�ZdS)�_ModuleLockManagerc�"�||_d|_dSr)�_name�_lockr,s  rr.z_ModuleLockManager.__init__�s����
���
�
�
rc�j�t|j��|_|j���dSr)�_get_module_lockrPrQr;rEs r�	__enter__z_ModuleLockManager.__enter__�s-��%�d�j�1�1��
��
�������rc�8�|j���dSr)rQr<)r-�args�kwargss   r�__exit__z_ModuleLockManager.__exit__�s���
�������rN)rrrr.rTrXrrrrNrN�sA����������������rrNc��t���		t|��}n#t$rd}YnwxYw|�Nt�t|��}nt
|��}|fd�}t�||��t|<t�	��n#t�	��wxYw|S)z�Get or create the module lock for a given module name.

    Acquire/release internally the global import lock to protect
    _module_locks.Nc���t���	t�|��|urt|=t���dS#t���wxYwr)�_imp�acquire_lock�
_module_locksr3�release_lock)�refrs  r�cbz_get_module_lock.<locals>.cb�sl���!�!�#�#�#�(�%�(�(��.�.�#�5�5�)�$�/��%�%�'�'�'�'�'��D�%�%�'�'�'�'���s�$A�A5)
r[r\r]�KeyErrorr%rHr!�_weakrefr_r^)rr'r`s   rrSrS�s���	�������	� ��&�(�(�D�D���	�	�	��D�D�D�	�����<���'��-�-���"�4�(�(��!�	
(�	
(�	
(�	
(�#+�,�,�t�R�"8�"8�M�$���������������������Ks%�1�B-�A�B-�A�AB-�-Cc��t|��}	|���|���dS#t$rYdSwxYw)z�Acquires then releases the module lock for a given module name.

    This is used to ensure a module is completely initialized, in the
    event it is being imported by another thread.
    N)rSr;r<r)rr's  r�_lock_unlock_modulerd�s\���D�!�!�D��������	
����������
�
�
�	
���
���s�;�
A	�A	c��||i|��S)a.remove_importlib_frames in import.c will always remove sequences
    of importlib frames that end with a call to this function

    Use it instead of a normal call in places where including the importlib
    frames introduces unwanted noise into the traceback (e.g. when executing
    module code)
    r)�frV�kwdss   r�_call_with_frames_removedrh�s��
�1�d��d���rr:)�	verbosityc��tjj|kr?|�d��sd|z}t	|j|�tj���dSdS)z=Print the message to stderr if -v/PYTHONVERBOSE is turned on.)�#zimport z# )�fileN)r�flags�verbose�
startswith�printrC�stderr)�messagerirVs   r�_verbose_messagers�s^��
�y��I�%�%��!�!�"2�3�3�	%��W�n�G�
�n�g�n�d�#�#�*�5�5�5�5�5�5�&�%rc�2���fd�}t|���|S)z1Decorator to verify the named module is built-in.c���|tjvr$td�|��|�����||��S)N�{!r} is not a built-in moduler)r�builtin_module_names�ImportErrorrC�r-�fullname�fxns  �r�_requires_builtin_wrapperz4_requires_builtin.<locals>._requires_builtin_wrapper�sN����3�3�3�3��=�D�D�X�N�N�#+�-�-�-�
-��s�4��"�"�"r�r)r{r|s` r�_requires_builtinr~�s5���#�#�#�#�#�

�
#�S�)�)�)�$�$rc�2���fd�}t|���|S)z/Decorator to verify the named module is frozen.c���t�|��s$td�|��|�����||��S)Nz{!r} is not a frozen moduler)r[�	is_frozenrxrCrys  �r�_requires_frozen_wrapperz2_requires_frozen.<locals>._requires_frozen_wrapper	sT����~�~�h�'�'�	-��;�B�B�8�L�L�#+�-�-�-�
-��s�4��"�"�"rr})r{r�s` r�_requires_frozenr�s5���#�#�#�#�#�

�
"�C�(�(�(�#�#rc��d}t�|t��t||��}|tjvr4tj|}t
||��tj|St|��S)z�Load the specified module into sys.modules and return it.

    This method is deprecated.  Use loader.exec_module() instead.

    zgthe load_module() method is deprecated and slated for removal in Python 3.12; use exec_module() instead)�	_warnings�warn�DeprecationWarning�spec_from_loaderr�modules�_exec�_load)r-rz�msg�spec�modules     r�_load_module_shimr�so��3�C�
�N�N�3�*�+�+�+��H�d�+�+�D��3�;�����X�&��
�d�F�����{�8�$�$��T�{�{�rc���t|dd��}t|dd��x}rt|��St|d��r&	|�|��S#t$rYnwxYw	|j}n#t$rd}YnwxYw	|j}d�||��S#t$r2|�d�|��cYSd�||��cYSwxYw)	z,The implementation of ModuleType.__repr__().�
__loader__N�__spec__�module_repr�?�<module {!r} from {!r}>�
<module {!r}>�<module {!r} ({!r})>)	r�_module_repr_from_specrr��	Exceptionrr�__file__rC)r��loaderr�r�filenames     r�_module_reprr�&s4��
�V�\�4�
0�
0�F��v�z�4�0�0�0�t��%�d�+�+�+�	���	'�	'��	��%�%�f�-�-�-���	�	�	��D�	����������������������@��?��)�/�/��h�?�?�?��
�?�?�?��>�"�)�)�$�/�/�/�/�/�)�0�0��v�>�>�>�>�>�	?���s<�A�
A'�&A'�+A3�3B�B�B#�#!C�C�Cc��eZdZdZdddd�d�Zd�Zd�Zed���Zej	d���Zed	���Z
ed
���Zej	d���ZdS)�
ModuleSpeca�The specification for a module, used for loading.

    A module's spec is the source for information about the module.  For
    data associated with the module, including source, use the spec's
    loader.

    `name` is the absolute name of the module.  `loader` is the loader
    to use when loading the module.  `parent` is the name of the
    package the module is in.  The parent is derived from the name.

    `is_package` determines if the module is considered a package or
    not.  On modules this is reflected by the `__path__` attribute.

    `origin` is the specific location used by the loader from which to
    load the module, if that information is available.  When filename is
    set, origin will match.

    `has_location` indicates that a spec's "origin" reflects a location.
    When this is True, `__file__` attribute of the module is set.

    `cached` is the location of the cached bytecode file, if any.  It
    corresponds to the `__cached__` attribute.

    `submodule_search_locations` is the sequence of path entries to
    search when importing submodules.  If set, is_package should be
    True--and False otherwise.

    Packages are simply modules that (may) have submodules.  If a spec
    has a non-None value in `submodule_search_locations`, the import
    system will consider modules loaded from the spec as packages.

    Only finders (see importlib.abc.MetaPathFinder and
    importlib.abc.PathEntryFinder) should modify ModuleSpec instances.

    N)�origin�loader_state�
is_packagec�~�||_||_||_||_|rgnd|_g|_d|_d|_dS�NF)rr�r�r��submodule_search_locations�_uninitialized_submodules�
_set_fileattr�_cached)r-rr�r�r�r�s      rr.zModuleSpec.__init__esM����	�������(���0:�*D�"�"���'�)+��&�#�������rc��d�|j��d�|j��g}|j�-|�d�|j����|j�-|�d�|j����d�|jjd�|����S)Nz	name={!r}zloader={!r}zorigin={!r}zsubmodule_search_locations={}z{}({})z, )	rCrr�r��appendr��	__class__r�join)r-rVs  rrFzModuleSpec.__repr__rs����"�"�4�9�-�-��$�$�T�[�1�1�3���;�"��K�K�
�,�,�T�[�9�9�:�:�:��*�6��K�K�7���� ?�@�@�
B�
B�
B����t�~�6��	�	�$���H�H�Hrc��|j}	|j|jkoJ|j|jko:|j|jko*||jko|j|jko|j|jkS#t$r
tcYSwxYwr)r�rr�r��cached�has_locationr�NotImplemented)r-�other�smsls   r�__eq__zModuleSpec.__eq__|s����.��	"��I���+�<��K�5�<�/�<��K�5�<�/�<��E�<�<�<��K�5�<�/�	<�
�%��);�;�
=���	"�	"�	"�!�!�!�!�	"���s�AA$�$A8�7A8c��|j�@|j�9|jr2t�t�t�|j��|_|jSr)r�r�r��_bootstrap_external�NotImplementedError�_get_cachedrEs rr�zModuleSpec.cached�sE���<���{�&�4�+=�&�&�.�-�-�2�>�>�t�{�K�K����|�rc��||_dSr)r�)r-r�s  rr�zModuleSpec.cached�s
������rc�^�|j� |j�d��dS|jS)z The name of the module's parent.N�.r$)r�r�
rpartitionrEs r�parentzModuleSpec.parent�s0���*�2��9�'�'��,�,�Q�/�/��9�rc��|jSr)r�rEs rr�zModuleSpec.has_location�s���!�!rc�.�t|��|_dSr)�boolr�)r-�values  rr�zModuleSpec.has_location�s��!�%�[�[����r)rrrr
r.rFr��propertyr��setterr�r�rrrr�r�@s�������"�"�H04�$� ������I�I�I�
"�
"�
"�����X���]����]������X���"�"��X�"���)�)���)�)�)rr��r�r�c�f�|�t|dd��}|sMt|d��r=t�t�tj}|�
|||���S|rgnd}||||���S|�;t|d��r)	|�|��}n#t$rd}YnwxYwd}t||||���S)	z5Return a module spec based on various loader methods.N�_ORIGIN�get_filename)r�)r�r�r�Fr�)rrr�r��spec_from_file_locationr�rxr�)rr�r�r�r��searchs      rr�r��s
��
�~����D�1�1���	J�g�f�n�5�5�	J��&�%�%�"5�"M����*�*�4��?�?�?�?�!�+���t��&�&�t�F�BH�J�J�J�	J����6�<�(�(�	�
"�#�.�.�t�4�4�
�
���
"�
"�
"�!�
�
�
�
"�����J��d�F�6�j�I�I�I�Is�6B�B�Bc���	|j}|�|Sn#t$rYnwxYw|j}|�	|j}n#t$rYnwxYw	|j}n#t$rd}YnwxYw|�|�t|dd��}|s|�|}	|j}n#t$rd}YnwxYw	t|j��}n#t$rd}YnwxYwt|||���}|�dn||k|_
||_||_|S)Nr��r�F)
r�rrr�r�r�
__cached__�list�__path__r�r�r�r�)r�r�r�r�r�locationr�r�s        r�_spec_from_moduler��s����������K����
�
�
���
�����?�D�
�~�	��&�F�F���	�	�	��D�	������?����������������
�~����V�Y��5�5�F��	�(�.��F���"����������������*�%)�&�/�%:�%:�"�"���*�*�*�%)�"�"�"�*�����d�F�6�2�2�2�D�"*�"2����8�9K�D���D�K�&@�D�#��KsN��
��0�
=�=�A	�	A�A�7A?�?B�
B�B'�'B6�5B6F��overridec�V�|st|dd���	|j|_n#t$rYnwxYw|st|dd���r|j}|�P|j�It�t�tj}|�	|��}|j|_
||_d|_	||_n#t$rYnwxYw|st|dd���	|j
|_n#t$rYnwxYw	||_n#t$rYnwxYw|st|dd���%|j�	|j|_n#t$rYnwxYw|jri|st|dd���	|j|_n#t$rYnwxYw|st|dd���%|j�	|j|_n#t$rYnwxYw|S)Nrr��__package__r�r�r�)rrrrr�r�r�r��NamespaceLoader�__new__�_pathr�r�r�r�r�r�r�r�r�r�)r�r�r�r�r�s     r�_init_module_attrsr��sn��	��G�F�J��5�5�=�	�"�i�F�O�O���	�	�	��D�	������7�6�<��6�6�>�����>��.�:�&�.�-�-�"5�"E��(�0�0��A�A��#�>���$���#'���	� &�F�����	�	�	��D�	������7�6�=�$�7�7�?�	�!%��F�����	�	�	��D�	����
�������
�
�
���
������7�6�:�t�4�4�<��*�6�
�"&�"A�����!�
�
�
���
��������	�w�v�z�4�8�8�@�
�"&�+�����!�
�
�
���
�����	�w�v�|�T�:�:�B��{�&��(,��F�%�%��%�����D������Msx�"�
/�/�B'�'
B4�3B4�C�
C%�$C%�)C1�1
C>�=C>�D)�)
D6�5D6�E!�!
E.�-E.�F�
F&�%F&c��d}t|jd��r|j�|��}n$t|jd��rtd���|�t	|j��}t
||��|S)z+Create a module based on the provided spec.N�
create_module�exec_modulezBloaders that define exec_module() must also define create_module())rr�r�rxrrr��r�r�s  r�module_from_specr�6s����F��t�{�O�,�,�>���*�*�4�0�0���	���m�	,�	,�>��=�>�>�	>�
�~��T�Y�'�'���t�V�$�$�$��Mrc�"�|j�dn|j}|j�7|j�d�|��Sd�||j��S|jrd�||j��Sd�|j|j��S)z&Return the repr to use for the module.Nr�r�r�r��<module {!r} ({})>)rr�r�rCr�)r�rs  rr�r�Gs����)�#�3�3���D��{���;��"�)�)�$�/�/�/�)�0�0��t�{�C�C�C���	G�,�3�3�D�$�+�F�F�F�'�.�.�t�y�$�+�F�F�Frc�t�|j}t|��5tj�|��|ur&d�|��}t
||����	|j�0|j�t
d|j����t||d���n�t||d���t|jd��sRt|j���d�}t�
|t��|j�|��n|j�|��tj�|j��}|tj|j<n=#tj�|j��}|tj|j<wxYw	ddd��n#1swxYwY|S)	zFExecute the spec's specified module in an existing module's namespace.zmodule {!r} not in sys.modulesrN�missing loaderTr�r��7.exec_module() not found; falling back to load_module())rrNrr�r3rCrxr�r�r�rr	r�r��
ImportWarning�load_moduler��pop)r�r�rr�s    rr�r�Xs����9�D�	�D�	!�	!�,�,��;�?�?�4� � ��.�.�2�9�9�$�?�?�C��c��-�-�-�-�	,��{�"��2�:�%�&6�T�Y�G�G�G�G�"�4��$�?�?�?�?�?�"�4��$�?�?�?�?��t�{�M�:�:�4�*�4�;�7�7�;�;�;�C��N�N�3�
�6�6�6��K�+�+�D�1�1�1�1��K�+�+�F�3�3�3��[�_�_�T�Y�/�/�F�%+�C�K��	�"�"���[�_�_�T�Y�/�/�F�%+�C�K��	�"�+�+�+�+�"�/,�,�,�,�,�,�,�,�,�,�,����,�,�,�,�0�Ms+�AF-� C
E#�*9F-�#:F�F-�-F1�4F1c���	|j�|j��nQ#|jtjvr8tj�|j��}|tj|j<�xYwtj�|j��}|tj|j<t
|dd���	|j|_n#t$rYnwxYwt
|dd���S	|j	|_
t|d��s%|j�d��d|_
n#t$rYnwxYwt
|dd���	||_
n#t$rYnwxYw|S)Nr�r�r�r�r$r�)r�r�rrr�r�rr�rrr�rr�r�r�s  r�_load_backward_compatibler�vs���������	�*�*�*�*����9���#�#��[�_�_�T�Y�/�/�F�%+�C�K��	�"�
�����[�_�_�T�Y�
'�
'�F�#�C�K��	���v�|�T�*�*�2�	� $��F�����	�	�	��D�	�����v�}�d�+�+�3�	�"(��F���6�:�.�.�
B�%)�Y�%9�%9�#�%>�%>�q�%A��"����	�	�	��D�	�����v�z�4�(�(�0�	�"�F�O�O���	�	�	��D�	�����MsA�"�AA0�=C
�

C�C�,AD.�.
D;�:D;�E�
E%�$E%c���|j�[t|jd��sFt|j���d�}t�|t
��t
|��St|��}d|_	|tj
|j<	|j�|j�td|j����n|j�|��n*#	tj
|j=n#t$rYnwxYw�xYwtj
�|j��}|tj
|j<t#d|j|j��d|_n#d|_wxYw|S)Nr�r�Tr�rzimport {!r} # {!r}F)r�rr	r�r�r�r�r��
_initializingrr�rr�rxr�rar�rs)r�r�r�s   r�_load_unlockedr��sr���{���t�{�M�2�2�	3�"�4�;�/�/�4�4�4�C��N�N�3�
�.�.�.�,�T�2�2�2�
�d�
#�
#�F�
�D��#�!'���D�I��	��{�"��2�:�%�&6�T�Y�G�G�G�G�;���'�'��/�/�/���	�
��K��	�*�*���
�
�
���
��������
������+�+��!'���D�I���-�t�y�$�+�F�F�F�"�����U���"�"�"�"��MsI�:E�?C�E�C6�C%�$C6�%
C2�/C6�1C2�2C6�6AE�	Ec�|�t|j��5t|��cddd��S#1swxYwYdS)z�Return a new module object, loaded by the spec's loader.

    The module is not added to its parent.

    If a module is already in sys.modules, that existing module gets
    clobbered.

    N)rNrr��r�s rr�r��s���
�D�I�	&�	&�$�$��d�#�#�$�$�$�$�$�$�$�$�$�$�$�$����$�$�$�$�$�$s�1�5�5c��eZdZdZdZed���Zedd���Zed
d���Z	ed���Z
ed���Zeed	�����Z
eed
�����Zeed�����Zee��ZdS)�BuiltinImporterz�Meta path import for built-in modules.

    All methods are either class or static methods to avoid the need to
    instantiate the class.

    zbuilt-inc�r�t�dt��d|j�dtj�d�S)�sReturn repr for the module.

        The method is deprecated.  The import machinery does the job itself.

        zQBuiltinImporter.module_repr() is deprecated and slated for removal in Python 3.12z<module z (z)>)r�r�r�rr�r��r�s rr�zBuiltinImporter.module_repr�sC��	���;�<N�	P�	P�	P�J�&�/�J�J��/F�J�J�J�JrNc�h�t�|��rt|||j���SdS)Nr�)r[�
is_builtinr�r�)�clsrz�path�targets    r�	find_speczBuiltinImporter.find_spec�s2���?�?�8�$�$�	�#�H�c�#�+�F�F�F�F��4rc��t�dt��|�||��}|�|jndS)z�Find the built-in module.

        If 'path' is ever specified then the search is considered a failure.

        This method is deprecated.  Use find_spec() instead.

        zjBuiltinImporter.find_module() is deprecated and slated for removal in Python 3.12; use find_spec() insteadN)r�r�r�r�r�)r�rzr�r�s    r�find_modulezBuiltinImporter.find_module�sI��	���T�)�	+�	+�	+��}�}�X�t�,�,��"�.�t�{�{�D�8rc��|jtjvr.td�|j��|j����ttj|��S)zCreate a built-in modulervr)rrrwrxrCrhr[�create_builtinr�s rr�zBuiltinImporter.create_modulesV���9�C�4�4�4��=�D�D�T�Y�O�O�#'�9�.�.�.�
.�(��)<�d�C�C�Crc�:�ttj|��dS)zExec a built-in moduleN)rhr[�exec_builtinr�s rr�zBuiltinImporter.exec_module
s��	"�$�"3�V�<�<�<�<�<rc��dS)z9Return None as built-in modules do not have code objects.Nr�r�rzs  r�get_codezBuiltinImporter.get_code�	���trc��dS)z8Return None as built-in modules do not have source code.Nrr�s  r�
get_sourcezBuiltinImporter.get_sourcerrc��dS)z4Return False as built-in modules are never packages.Frr�s  rr�zBuiltinImporter.is_packages	���ur�NNr)rrrr
r��staticmethodr��classmethodr�r�r�r�r~r�rr�r�r�rrrr�r��s8���������G��K�K��\�K������[���9�9�9��[�9��D�D��\�D��=�=��\�=��������[���������[���������[���+�/�0�0�K�K�Krr�c�>�eZdZdZdZed���Zed���Zedd���Z	edd���Z
edd	���Zed
���Zed���Z
ed���Zeed
�����Zeed�����Zeed�����ZdS)�FrozenImporterz�Meta path import for frozen modules.

    All methods are either class or static methods to avoid the need to
    instantiate the class.

    �frozenc��t�dt��d�|jt
j��S)r�zPFrozenImporter.module_repr() is deprecated and slated for removal in Python 3.12r�)r�r�r�rCrrr�)�ms rr�zFrozenImporter.module_repr/s@��	���;�<N�	P�	P�	P�#�*�*�1�:�~�7M�N�N�Nrc��|j}|j}|��tt|���dd��}|s
Jd���t	|d��}t
�|j��|ks
J|���|�||j	|��\}}ttj��||���|_|j
}|r.|gks
J|���|r|j
�d|��n|�
J|���t	|d��rJ|j���|r	||_n#t $rYnwxYw|r?|j|kr4|jgksJ|j���|j�|���nu|j
}|du}t't|����ddgks
J|���|jrk|�|j|j	|��\}	}|j|	ksJ|j|	f���|r||gksJ||f���nA||rgndks
J|���n,d}	|j�J|j���||rgndks
J|���|	r/t	|d��sJ�|j|	ksJ|j|	f���nt	|d��rJ|j���|r/t	|d��sJ�|j|ksJ|j|f���nt	|d��rJ|j���|jrJ�dS)	N�__origname__z'see PyImport_ImportFrozenModuleObject()r��r��orignamer$r�r�r)r�r��varsr�rr[�is_frozen_packager�_resolve_filenamerrr�implementationr��insertr�rr��extend�sortedrr�r�)
r�r�r��stater�ispkgr��pkgdirr�r�s
          r�_fix_up_modulezFrozenImporter._fix_up_module:s�������!���=��F�|�|�'�'���=�=�H��F�F�F�F�F�8��F�J�/�/�E��)�)�&�/�:�:�e�C�C�C�U�C�C�C�"�4�4�X�t�y�%�P�P��H�f� 8��S�%7� 8� 8�!�!�!�!�!�D���6�H��
2��2�~�~�~�x�~�~�~��F��3�:�:�1�f�E�E�E���'�'��'�'�'��v�z�2�2�C�C�F�O�C�C�2��
��&.�F�O�O��%�����D������
5��?�h�.�.�!�?�b�0�0�0�&�/�0�0�0��O�*�*�8�4�4�4���6�H��D�(�E��$�u�+�+�&�&�:�z�*B�B�B�B�E�B�B�B��~�
E��*�*�5�>�4�9�e�L�L���6��~��1�1�1�E�N�H�3M�1�1�1��I�#��x�/�/�/�(�F�1C�/�/�/�/�#�e�(=����>�>�>��>�>�>�>����~�-�-�u�~�-�-�-��%�$9�B�B�T�:�:�:�H�:�:�:��
H��v�z�2�2�2�2�2���(�2�2�2�V�_�h�4O�2�2�2�2�"�6�:�6�6�G�G���G�G�6��
H��v�z�2�2�2�2�2���(�2�2�2�V�_�h�4O�2�2�2�2�"�6�:�6�6�G�G���G�G�6��$�$�$�$�$�$s�+D3�3
E�?ENFc��|rttdd��sdS	|j}n+#t$rtjdkrdndx}|_YnwxYw||kr)|�d��r|dd�}|s|�d�}nd	}|�d
|��}|rtj�|�|��}|�|�d�}nd}tj�|�|�d�}||fS)
N�_stdlib_dirr�win32�\�/�<r:z	.__init__Fr�z__init__.pyz.py)rr�_SEPr�platformrorr)r�rz�aliasr�sep�relfilerr�s        rrz FrozenImporter._resolve_filenames/���	�w�s�M�4�@�@�	��:�	F��(�C�C���	F�	F�	F�%(�\�W�%<�%<�T�T�#�E�C�#�(�(�(�	F�����u����"�"�3�'�'�
�#�A�B�B�<���6�"*�5�5�5�H�����"�"�3��,�,���	=���7��7�g�7�7�F� �2�#�2�2�2�H�H��F��/�<�3�<��<�<�<�H����s�$�%A�Ac�>�ttj|��}|�dS|\}}}t|||j|���}|�|||��\}	}
t
tj��|	|���|_	|
r|j
�d|
��|S)Nr�rr$)rhr[�find_frozenr�r�rrrrr�r�r)r�rzr�r��info�_rrr�r�rs           rr�zFrozenImporter.find_spec�s���(��)9�8�D�D���<��4�"���5�(���#�'*�{�+0�2�2�2���0�0��8�U�K�K���&�4�D��!3�4�4���
�
�
����	>��+�2�2�1�f�=�=�=��rc�~�t�dt��t�|��r|ndS)z]Find a frozen module.

        This method is deprecated.  Use find_spec() instead.

        ziFrozenImporter.find_module() is deprecated and slated for removal in Python 3.12; use find_spec() insteadN)r�r�r�r[r�)r�rzr�s   rr�zFrozenImporter.find_module�s@��	���T�)�	+�	+�	+��n�n�X�.�.�8�s�s�D�8rc�|�t|j��}	|jj}|r||_n#t
$rYnwxYw|S)zSet __file__, if able.)rrr�r�r�r)r�r�r�s   rr�zFrozenImporter.create_module�s^���T�Y�'�'��	+��(�1�H��
+�"*�����	�	�	�	��D�	����
�
s�,�
9�9c��|j}|j}ttj|��}t||j��dSr)r�rrhr[�get_frozen_object�execr)r�r�r�codes    rr�zFrozenImporter.exec_module�s:������y��(��)?��F�F���T�6�?�#�#�#�#�#rc��t||��}t�|��}|�J�|\}}}||_t	|���dd��|rg|_|�|��|S)z_Load a frozen module.

        This method is deprecated.  Use exec_module() instead.

        Nr�)r�r[r'r
rr�r�r)r�rzr�r(r)rrs       rr�zFrozenImporter.load_module�s���#�3��1�1������)�)������!���5�(�&����V������T�*�*�*��	!� �F�O����6�"�"�"��
rc�6�t�|��S)z-Return the code object for the frozen module.)r[r-r�s  rr�zFrozenImporter.get_code�����%�%�h�/�/�/rc��dS)z6Return None as frozen modules do not have source code.Nrr�s  rrzFrozenImporter.get_source�rrc�6�t�|��S)z.Return True if the frozen module is a package.)r[rr�s  rr�zFrozenImporter.is_package�r2rr�rr)rrrr
r�rr�rrrr�r�r�r�r�r�r�rr�rrrrr$s����������G��O�O��\�O��B%�B%��[�B%�H� � � ��[� �0�����[��:�	9�	9�	9��[�	9��
�
��\�
��$�$��\�$�����[��$��0�0����[�0��������[����0�0����[�0�0�0rrc��eZdZdZd�Zd�ZdS)�_ImportLockContextz$Context manager for the import lock.c�8�t���dS)zAcquire the import lock.N)r[r\rEs rrTz_ImportLockContext.__enter__����������rc�8�t���dS)z<Release the import lock regardless of any raised exceptions.N)r[r^)r-�exc_type�	exc_value�
exc_tracebacks    rrXz_ImportLockContext.__exit__r8rN)rrrr
rTrXrrrr6r6�s8������.�.��������rr6c��|�d|dz
��}t|��|krtd���|d}|rd�||��n|S)z2Resolve a relative module name to an absolute one.r�r:z2attempted relative import beyond top-level packager$�{}.{})�rsplit�lenrxrC)r�package�level�bits�bases     r�
_resolve_namerEs`���>�>�#�u�q�y�)�)�D�
�4�y�y�5����N�O�O�O���7�D�)-�7�7�>�>�$��%�%�%�4�7rc��t|���d�}t�|t��|�||��}|�dSt||��S)Nz5.find_spec() not found; falling back to find_module())r	r�r�r�r�r�)�finderrr�r�r�s     r�_find_spec_legacyrHsa���6�"�"�;�;�;�C�
�N�N�3�
�&�&�&�
�
�
��d�
+�
+�F�
�~��t��D�&�)�)�)rc��tj}|�td���|s t�dt
��|tjv}|D]�}t��5	|j}||||��}n0#t$r#t|||��}|�
Yddd���QYnwxYwddd��n#1swxYwY|�L|sF|tjvr8tj|}	|j}	|	�|cS|	cS#t$r|cYcSwxYw|cS��dS)zFind a module's spec.Nz5sys.meta_path is None, Python is likely shutting downzsys.meta_path is empty)r�	meta_pathrxr�r�r�r�r6r�rrHr�)
rr�r�rJ�	is_reloadrGr�r�r�r�s
          r�
_find_specrLs����
�I����*�+�+�	+��@����/��?�?�?�
���#�I�����
�
!�
!�	5�	5�
5�"�,�	�!�y��t�V�4�4����"�
�
�
�(���t�<�<���<��
	5�	5�	5�	5�	5�	5�	5�
 �<�
����	5�	5�	5�	5�	5�	5�	5�	5�	5�	5�	5����	5�	5�	5�	5����
����!4�!4���T�*��(�%��H� �'�#����'�����&� � � � �K�K�K�K�K�	 ��������#�&�tsN� B3�"A7�)B3�7B$�B3�!B3�#B$�$B3�3B7	�:B7	�#C4�4D�Dc�`�t|t��s/td�t	|�������|dkrtd���|dkr5t|t��std���|st
d���|s|dkrtd���dSdS)zVerify arguments are "sane".zmodule name must be str, not {}r$zlevel must be >= 0z__package__ not set to a stringz6attempted relative import with no known parent packagezEmpty module nameN)�
isinstance�str�	TypeErrorrCr�
ValueErrorrx�rrArBs   r�
_sanity_checkrSMs����d�C� � �N��9�@�@��d���L�L�M�M�M��q�y�y��-�.�.�.��q�y�y��'�3�'�'�	)��=�>�>�>��	)��(�)�)�
)��.�E�Q�J�J��,�-�-�-�.�.�J�JrzNo module named z{!r}c��d}|�d��d}d}|r�|tjvrt||��|tjvrtj|Stj|}	|j}n>#t
$r1tdz�||��}t||���d�wxYw|j	}|�d��d}t||��}|�)tt�|��|����|r|j�|��	t|��}	|r|j���n!#|r|j���wwxYw|r]tj|}	t|||	��n8#t
$r+d|�d|��}t �|t$��YnwxYw|	S)Nr�r$z; {!r} is not a packager�zCannot set an attribute on z for child module )r�rr�rhr�r�_ERR_MSGrC�ModuleNotFoundErrorr�rLr�r�r�r�rr�r�r�)
r�import_r�r��parent_spec�
parent_moduler��childr�r�s
          r�_find_and_load_unlockedr\`s���D�
�_�_�S�
!�
!�!�
$�F��K�
�
(����$�$�%�g�v�6�6�6��3�;����;�t�$�$���F�+�
�	@� �)�D�D���	@�	@�	@��7�7�?�?��f�M�M�C�%�c��5�5�5�4�?�	@����$�,������$�$�Q�'���d�D�!�!�D��|�!�(�/�/�$�"7�"7�d�C�C�C�C��	@�
�1�8�8��?�?�?�	<�#�D�)�)�F��
<��5�9�9�;�;�;����
<��5�9�9�;�;�;�;�
<����
�/���F�+�
�	/��M�5�&�1�1�1�1���	/�	/�	/�U��U�U�E�U�U�C��N�N�3�
�.�.�.�.�.�	/�����Ms*�3A;�;;B6�3E�E<�F&�&2G�Gc���tj�|t��}|tus t	t	|dd��dd��r�t|��5tj�|t��}|turt
||��cddd��S	ddd��n#1swxYwYt|��|�&d�|��}t||����|S)zFind and load the module.r�Nr�Fz(import of {} halted; None in sys.modulesr)
rr�r3�_NEEDS_LOADINGrrNr\rdrCrW)rrXr�rrs    r�_find_and_loadr_�sA��
�[�_�_�T�>�
2�
2�F��.� � ����
�D�1�1�?�E�J�J�	!�
��
%�
%�	>�	>��[�_�_�T�>�:�:�F���'�'�.�t�W�=�=�	>�	>�	>�	>�	>�	>�	>�	>�'�	>�	>�	>�	>�	>�	>�	>�	>�	>�	>�	>����	>�	>�	>�	>�	�D�!�!�!�
�~�)�)/�����	�!�'��5�5�5�5��Ms�>B6�6B:�=B:r$c�|�t|||��|dkrt|||��}t|t��S)a2Import and return the module based on its name, the package the call is
    being made from, and the level adjustment.

    This function represents the greatest common denominator of functionality
    between import_module and __import__. This includes setting __package__ if
    the loader did not.

    r$)rSrEr_�_gcd_importrRs   rrara�s@���$���'�'�'��q�y�y��T�7�E�2�2���$��,�,�,r��	recursivec	��|D�]}t|t��s6|r|jdz}nd}td|�dt	|��j�����|dkr+|s(t|d��rt
||j|d����t||��sud	�|j|��}	t||����#t$r;}|j|kr*tj
�|t���Yd
}~���d
}~wwxYw��|S)z�Figure out what __import__ should return.

    The import_ parameter is a callable which takes the name of module to
    import. It is required to decouple the function from assuming importlib's
    import implementation is desired.

    z.__all__z
``from list''zItem in z must be str, not �*�__all__Trbr>N)rNrOrrPrr�_handle_fromlistrfrCrhrWrrr�r3r^)r��fromlistrXrc�x�where�	from_name�excs        rrgrg�s[�������!�S�!�!�	��
(���*�4���'���6�u�6�6�#'��7�7�#3�6�6�7�7�
7�
�#�X�X��
1����!;�!;�
1� �����+/�1�1�1�1�����#�#�	����v���:�:�I�	
�)�'�9�=�=�=�=��&�
�
�
��H�	�)�)��K�O�O�I�~�>�>�J��H�H�H�H������
����		��Ms�.B?�?
D�	0C?�>C?�?Dc�|�|�d��}|�d��}|�=|�9||jkr.t�d|�d|j�d�td���|S|�|jSt�d	td���|d
}d|vr|�d��d
}|S)z�Calculate what __package__ should be.

    __package__ is not guaranteed to be defined or could be set to None
    to represent that its proper value is unknown.

    r�r�Nz __package__ != __spec__.parent (z != �)�)�
stacklevelzYcan't resolve package from __spec__ or __package__, falling back on __name__ and __path__rr�r�r$)r3r�r�r�r�r�)�globalsrAr�s   r�_calc___package__rr�s����k�k�-�(�(�G��;�;�z�"�"�D������4�;� 6� 6��N�N�?�&�?�?�.2�k�?�?�?�(�Q�
�
8�
8�
8���	
�	��{�����?�$��	�	4�	4�	4��*�%���W�$�$��(�(��-�-�a�0�G��Nrrc�
�|dkrt|��}n&|�|ni}t|��}t|||��}|s�|dkr(t|�d��d��S|s|St|��t|�d��d��z
}tj|jdt|j��|z
�St|d��rt||t��S|S)a�Import a module.

    The 'globals' argument is used to infer where the import is occurring from
    to handle relative imports. The 'locals' argument is ignored. The
    'fromlist' argument specifies what should exist as attributes on the module
    being imported (e.g. ``from module import <fromlist>``).  The 'level'
    argument represents the package location to import from in a relative
    import (e.g. ``from ..pkg import mod`` would have a 'level' of 2).

    r$Nr�r�)	rarr�	partitionr@rr�rrrg)	rrq�localsrhrBr��globals_rA�cut_offs	         r�
__import__rx�s��
��z�z��T�"�"���%�1�7�7�r��#�H�-�-���T�7�E�2�2�����A�:�:��t�~�~�c�2�2�1�5�6�6�6��	O��M��$�i�i�#�d�n�n�S�&9�&9�!�&<�"=�"=�=�G��;�v��/L��F�O�0D�0D�W�0L�/L�M�N�N�	���	$�	$�����+�>�>�>��
rc�|�t�|��}|�td|z���t|��S)Nzno built-in module named )r�r�rxr�)rr�s  r�_builtin_from_namerzs<���$�$�T�*�*�D��|��5��<�=�=�=��$���rc�F�|a|att��}tj���D]�\}}t||��rw|tjvrt}n#t�|��rt}n�Nt||��}t||��|tur|�|����tjt}dD]C}|tjvrt|��}	ntj|}	t|||	���DdS)z�Setup importlib by importing needed built-in modules and injecting them
    into the global namespace.

    As sys is needed for sys.modules access and _imp is needed to load built-in
    modules, those two modules must be explicitly passed in.

    )r%r�rbN)r[rrr��itemsrNrwr�r�rr�r�rrrzr)
�
sys_module�_imp_module�module_typerr�r�r��self_module�builtin_name�builtin_modules
          r�_setupr�#s$���D�
�C��s�)�)�K���)�)�+�+�.�.���f��f�k�*�*�
	.��s�/�/�/�(�������%�%�
�'����$�V�V�4�4�D��t�V�,�,�,���'�'��%�%�f�-�-�-���+�h�'�K�<�;�;���s�{�*�*�/��=�=�N�N� �[��6�N���\�>�:�:�:�:�;�;rc��t||��tj�t��tj�t
��dS)z0Install importers for builtin and frozen modulesN)r�rrJr�r�r)r}r~s  r�_installr�HsD��
�:�{�#�#�#��M����)�)�)��M����(�(�(�(�(rc�f�ddl}|a|�tjt
��dS)z9Install importers that require external filesystem accessr$N)�_frozen_importlib_externalr�r�rr�r)r�s r�_install_external_importersr�Ps7��&�%�%�%�4���'�'���H�(=�>�>�>�>�>rrrr#)NNrr$)6r
r	r%r�rbr�rrr]r2r@rr!rHrNrSrdrhrsr~r�r�r�r�r�r�r�r�r�r�r�r�r�r�rr6rErHrLrS�_ERR_MSG_PREFIXrVr\�objectr^r_rargrrrxrzr�r�r�rrr�<module>r�s=����,&�&�&����	�����&�&�&�����
���	�	�	�	�	�\�	�	�	�JE�JE�JE�JE�JE�JE�JE�JE�ZJ�J�J�J�J�J�J�J�*�������� "�"�"�J���"���01�6�6�6�6�6�%�%�%�$�$�$����&@�@�@�4c)�c)�c)�c)�c)�c)�c)�c)�L.2�d�J�J�J�J�J�:'�'�'�'�T27�F�F�F�F�F�R���"
G�
G�
G�"���<"�"�"�H)�)�)�Z
$�
$�
$�K1�K1�K1�K1�K1�K1�K1�K1�\U0�U0�U0�U0�U0�U0�U0�U0�t
�
�
�
�
�
�
�
�8�8�8�*�*�*�,�,�,�,�^
.�
.�
.� %���V�#��'�'�'�T��������6-�-�-�-�>C�"�"�"�"�"�J���6"�"�"�"�J � � �";�";�";�J)�)�)�?�?�?�?�?r