Your IP : 3.135.208.27


Current Path : /opt/alt/python313/lib64/python3.13/importlib/__pycache__/
Upload File :
Current File : //opt/alt/python313/lib64/python3.13/importlib/__pycache__/util.cpython-313.opt-1.pyc

�

+}g�+���SrSSKJr SSKJr SSKJr SSKJr SSKJr SSKJ	r	 SSKJ
r
 SS	KJr SS
KJr SSKJ
r
 SSKJr S
SKrS
SKrS
SKrSrSrSSjrSSjr"SS5r"SS\R.5r"SS\5rg)z-Utility code for constructing importers, etc.�)�Loader)�module_from_spec)�
_resolve_name)�spec_from_loader)�
_find_spec)�MAGIC_NUMBER)�_RAW_MAGIC_NUMBER)�cache_from_source)�
decode_source)�source_from_cache)�spec_from_file_location�Nc�8�[R"[U5$)zBReturn the hash of *source_bytes* as used in hash-based pyc files.)�_imp�source_hashr	)�source_bytess �5/opt/alt/python313/lib64/python3.13/importlib/util.pyrrs�����-�|�<�<�c��URS5(dU$U(d[S[U5S35eSnUHnUS:wa O	US-
nM [XSX5$)z2Resolve a relative module name to an absolute one.�.zno package specified for z% (required for relative module names)rrN)�
startswith�ImportError�reprr)�name�package�level�	characters    r�resolve_namersv���?�?�3�����
��5�d�4�j�\�BA�A�B�	B�
�E��	�����
��
�����f��w�6�6rc���U[R;a[X5$[RUnUcgURnUc[	US35eU$![
a [	US35Sef=f)a_Return the spec for the specified module.

First, sys.modules is checked to see if the module was already imported. If
so, then sys.modules[name].__spec__ is returned. If that happens to be
set to None, then ValueError is raised. If the module is not in
sys.modules, then sys.meta_path is searched for a suitable spec with the
value of 'path' given to the finders. None is returned if no spec could
be found.

Dotted names do not have their parent packages implicitly imported. You will
most likely need to explicitly import all parent packages in the proper
order for a submodule to get the correct spec.

N�.__spec__ is None�.__spec__ is not set)�sys�modulesr�__spec__�
ValueError�AttributeError)r�path�module�specs    r�_find_spec_from_pathr*'s����3�;�;���$�%�%����T�"���>��	��?�?�D��|� �D�6�):�!;�<�<��K���	F���v�%9�:�;��E�	F�s�A�A1c���URS5(a[X5OUnU[R;aAUR	S5SnU(a[US/S9nURnOSn[X%5$[RUnUcgURnUc[US	35eU$![an[SU<SU<3US9UeSnAff=f![a [US
35Sef=f)a�Return the spec for the specified module.

First, sys.modules is checked to see if the module was already imported. If
so, then sys.modules[name].__spec__ is returned. If that happens to be
set to None, then ValueError is raised. If the module is not in
sys.modules, then sys.meta_path is searched for a suitable spec with the
value of 'path' given to the finders. None is returned if no spec could
be found.

If the name is for submodule (contains a dot), the parent module is
automatically imported.

The name and package arguments work the same as importlib.import_module().
In other words, relative module names (with leading dots) work.

rr�__path__)�fromlistz __path__ attribute not found on z while trying to find )rNr r!)rrr"r#�
rpartition�
__import__r,r&�ModuleNotFoundErrorrr$r%)	rr�fullname�parent_name�parent�parent_path�er(r)s	         r�	find_specr6Fs��"/3�o�o�c�.B�.B�|�D�*��H��s�{�{�"��)�)�#�.�q�1�����z�l�C�F�
P�$�o�o���K��(�0�0����X�&���>��	��?�?�D��|� �D�6�):�!;�<�<��K��%"�
P�)�6�{�o�F,�,4�<�9�?G�I�NO�P��
P���	F���v�%9�:�;��E�	F�s$�B0�C�0
C�:C
�
C�C/c�:�\rSrSrSrSrSrSr\S5r	Sr
g)	�+_incompatible_extension_module_restrictions�waA context manager that can temporarily skip the compatibility check.

NOTE: This function is meant to accommodate an unusual case; one
which is likely to eventually go away.  There's is a pretty good
chance this is not what you were looking for.

WARNING: Using this function to disable the check can lead to
unexpected behavior and even crashes.  It should only be used during
extension module development.

If "disable_check" is True then the compatibility check will not
happen while the context manager is active.  Otherwise the check
*will* happen.

Normally, extensions that do not support multiple interpreters
may not be imported in a subinterpreter.  That implies modules
that do not implement multi-phase init or that explicitly of out.

Likewise for modules import in a subinterpreter with its own GIL
when the extension does not support a per-interpreter GIL.  This
implies the module does not have a Py_mod_multiple_interpreters slot
set to Py_MOD_PER_INTERPRETER_GIL_SUPPORTED.

In both cases, this context manager may be used to temporarily
disable the check for compatible extension modules.

You can get the same effect as this function by implementing the
basic interface of multi-phase init (PEP 489) and lying about
support for multiple interpreters (or per-interpreter GIL).
c�$�[U5Ulg�N)�bool�
disable_check)�selfr=s  r�__init__�4_incompatible_extension_module_restrictions.__init__�s��!�-�0��rc�P�[R"UR5UlU$r;)r�'_override_multi_interp_extensions_check�override�old�r>s r�	__enter__�5_incompatible_extension_module_restrictions.__enter__�s���?�?��
�
�N����rc�L�URnU?[R"U5 gr;)rDrrB)r>�argsrDs   r�__exit__�4_incompatible_extension_module_restrictions.__exit__�s���h�h���H��4�4�S�9rc�,�UR(aS$S$)N���r)r=rEs rrC�4_incompatible_extension_module_restrictions.override�s���'�'�r�.�Q�.r)r=rDN)�__name__�
__module__�__qualname__�__firstlineno__�__doc__r?rFrJ�propertyrC�__static_attributes__�rrr8r8ws*���>1��:�
�/��/rr8c�$�\rSrSrSrSrSrSrg)�_LazyModule�zKA subclass of the module type which triggers loading upon attribute access.c�V�[RUS5nURnUS [RUS5[LGa@USnUS(aURX5sSSS5 $SUS'URUS5nURnUSnUn0n	UR5H2up�X�;aX�U
'M[
X�5[
Xz5:wdM.X�U
'M4 URRU5 U[R;a9[
U5[
[RU5:wa[SU<S	35eURU	5 [U[5(a[RUSU5 SSS5 [X5$!,(df   N=f)
z8Trigger the load of the module and return the attribute.r$�lock�	__class__�
is_loadingNT�__dict__zmodule object for z. substituted in sys.modules during a lazy load)�object�__getattribute__�loader_staterXr�items�id�loader�exec_moduler"r#r%�update�
isinstance�__setattr__�getattr)r>�attrr$rar\r^�
original_name�
attrs_then�	attrs_now�
attrs_updated�key�values            rr`�_LazyModule.__getattribute__�s����*�*�4��<���,�,��
�&�
!��&�&�t�[�9�[�H�(��5�	� ��-�$�5�5�d�A�"�
!�.2��\�*�$�5�5�d�J�G��!)�
�
�
�*�*�5�
�$�	� "�
�"+�/�/�"3�J�C��,�-2�c�*��I�N�+�r�*�/�/B�B�-2�c�*�
#4����+�+�D�1�!�C�K�K�/��$�x�2�c�k�k�-�&@�#A�A�(�+=�m�=N�O1�*1�2�2�
���
�.��d�K�0�0��&�&�t�[�)�D�_"�b�t�"�"�c"�
!�s�>F�0A&F�B-F�
F(c�<�URU5 [X5 g)z/Trigger the load and then perform the deletion.N)r`�delattr)r>rjs  r�__delattr__�_LazyModule.__delattr__�s��	
���d�#���rrVN)rOrPrQrRrSr`rtrUrVrrrXrX�s��U�5#�nrrXc�J�\rSrSrSr\S5r\S5rSr	Sr
SrSrg	)
�
LazyLoader��zKA loader that creates a module which defers loading until attribute access.c�<�[US5(d[S5eg)Nrez loader must define exec_module())�hasattr�	TypeError�rds r�__check_eager_loader�LazyLoader.__check_eager_loader�s ���v�}�-�-��>�?�?�.rc�6^^�TRT5 UU4Sj$)z>Construct a callable which returns the eager loader made lazy.c� >�T"T"U0UD65$r;rV)rI�kwargs�clsrds  ��r�<lambda>�$LazyLoader.factory.<locals>.<lambda>�s���s�6�4�+B�6�+B�'Cr)�_LazyLoader__check_eager_loader)r�rds``r�factory�LazyLoader.factory�s���	� � ��(�C�Crc�2�URU5 Xlgr;)r�rd)r>rds  rr?�LazyLoader.__init__�s���!�!�&�)��rc�8�URRU5$r;)rd�
create_module)r>r)s  rr��LazyLoader.create_module�s���{�{�(�(��.�.rc�&�SSKnURURlURUl0nURR5US'URUS'UR5US'SUS'X1Rl[Ulg)zMake the module load lazily.rNr^r\r[Fr])
�	threadingrdr$�
__loader__r^�copyr\�RLockrarX)r>r(r�ras    rre�LazyLoader.exec_modules~��	�!%������� �K�K���
��#)�?�?�#7�#7�#9��Z� �$*�$4�$4��[�!�(���0��V��%*��\�"�'3���$�&��rr|N)
rOrPrQrRrS�staticmethodr��classmethodr�r?r�rerUrVrrrwrw�s>��U��@��@��D��D�
�/�'rrwr;)rS�_abcr�
_bootstraprrrr�_bootstrap_externalrr	r
rrr
rr"�typesrrr*r6r8�
ModuleTyperXrwrVrr�<module>r�ss��3��(�%�(�"�-�2�2�.�2�8��
��=�
7��>*�b./�./�b@�%�"�"�@�F''��''r

?>