Hacked By AnonymousFox

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

�

�Q�fS��2�ddlZddlZddlZddlZddlZddlZddlZddlZddlZddl	Z	ddl
mZmZm
Z
ddlmZmZddlmZeej&efZeZd�Zeddeedefd	��Zd
ej&deefd�Zej4deedej&fd
��Zej8dedej&fd��Zej8dddej&fd��Zd�Zd
ej&fd�Zej@	dejBd�d��Z"d�Z#dede$fd�Z%ej4d��Z&e&j9ejN�ej@d���Zej@dejPfd��Z)ej@d��Z*d�Z+y)�N)�Union�Optional�cast�)�ResourceReader�Traversable)�	wrap_specc�b���	t��tj����f��fd�	�}|S)Nc���|�ur1|�ur	�||�Stjdtd���|�S|�ur��S�|�S)Nz/First parameter to files is renamed to 'anchor'�)�
stacklevel)�warnings�warn�DeprecationWarning)�anchor�package�func�	undefineds  ���B/opt/alt/python312/lib64/python3.12/importlib/resources/_common.py�wrapperz"package_to_anchor.<locals>.wrapper!sZ����)�#��Y�&��F�G�,�,��M�M�A�"��
�
��=� �
�y�
 ��6�M��F�|��)�object�	functools�wraps)rrrs` @r�package_to_anchorrs8������I��_�_�T�� �)�����Nrr�returnc�,�	tt|��S�N)�from_package�resolve)rs r�filesr!3s�������(�(rrc�t�	|j}t|jdd�}|�y||j�S)N�get_resource_reader)�__spec__�getattr�loader�name�r�spec�readers   rr#r#;s>������D�
�T�[�[�"7��
>�F�
�~���$�)�)��r�candc�6�ttj|�Sr)r�types�
ModuleType�r+s rr r Ks���� � �$�'�'rc�,�tj|�Sr)�	importlib�
import_moduler/s r�_r3Ps���"�"�4�(�(rc�B�tt�jd�S)N�__name__)r �
_infer_caller�	f_globalsr/s rr3r3Us���=�?�,�,�Z�8�9�9rc��	d�}d�}tj|tj��}tj||�}t	|�j
S)Nc�(�|jtk(Sr)�filename�__file__��
frame_infos r�is_this_filez#_infer_caller.<locals>.is_this_file_s���"�"�h�.�.rc� �|jdk(S)Nr)�functionr<s r�
is_wrapperz!_infer_caller.<locals>.is_wrapperbs���"�"�i�/�/r)�	itertools�filterfalse�inspect�stack�next�frame)r>rA�
not_this_file�callerss    rr6r6ZsM���/�0��)�)�,��
�
��H�M��#�#�J�
�>�G���=���rc��	t|�}|jj|j�}|j	�Sr)r	r&r#r'r!r(s   rrrks7����W��D�
�[�[�
,�
,�T�Y�Y�
7�F��<�<�>�r)�
_os_removec#�pK�tj|��\}}		tj||��tj|�~tj|���	||�y#tj|�wxYw#t$rYywxYw#	||�w#t$rYwwxYwxYw�w�N)�suffix)�tempfile�mkstemp�os�write�close�pathlib�Path�FileNotFoundError)r*rNrK�fd�raw_paths     r�	_tempfilerYus������#�#�6�2�L�B���	��H�H�R���"��H�H�R�L���l�l�8�$�$�	��x� ��
�H�H�R�L��!�	��	��	��x� �� �	��	�so�B6�A0�-B�'B
�/B6�0B�B�
	B�B6�B�B6�B3�B$�#B3�$	B0�-B3�/B0�0B3�3B6c�D�t|j|j��SrM)rY�
read_bytesr'��paths r�
_temp_filer^�s���T�_�_�T�Y�Y�7�7rr]c��	tjt�5|j�cddd�S#1swYyxYw)NF)�
contextlib�suppressrV�is_dirr\s r�_is_present_dirrc�s2���
�	�	�.�	/��{�{�}���	/��s�5�>c�F�	t|�rt|�St|�Sr)rc�	_temp_dirr^r\s r�as_filerf�s$���.�d�3�9�T�?�I��D�9I�Irc#�K�	|��y�wr�r\s rr3r3�s������J�s�	�dirc#�jK�	|5}tj|���ddd�y#1swYyxYw�wr)rTrU)ri�results  r�
_temp_pathrl�s*�����

���l�l�6�"�"�

���s�3�'�	3�0�3c#�K�	ttj��5}t||���ddd�y#1swYyxYw�wr)rlrO�TemporaryDirectory�_write_contents)r]�temp_dirs  rrere�s8�����

�H�/�/�1�	2�h��h��-�-�
3�	2�	2�s�A�9�	A�A�Ac��|j|j�}|j�r3|j�|j	�D]}t||��|S|j
|j��|Sr)�joinpathr'rb�mkdir�iterdirro�write_bytesr[)�target�source�child�items    rroro�sf���O�O�F�K�K�(�E�
�}�}��
���
��N�N�$�D��E�4�(�%��L�	���&�+�+�-�.��Lrr)�),rQrTrOrr`r-r1rDrrB�typingrrr�abcrr�	_adaptersr	r.�str�Package�Anchorrr!r#�singledispatchr �registerr3r6r�contextmanager�removerYr^�boolrcrfrUrnrlrerorhrr�<module>r�s��	����������(�(�,� �
�� � �#�%�
&��	���<�)�(�6�"�)�k�)��)�
��!1�!1�
�h�~�6N�
� ���(�(�6�"�(�u�'7�'7�(��(�	���)�C�)�E�$�$�)��)�	���:�D�:�U�%�%�:��:��"�%�*�*��������y�y�
���48�
�+�
�$�
����J��J�	���'�,�,������� �����#�H�/�/�#��#����.��.�r

Hacked By AnonymousFox1.0, Coded By AnonymousFox