Your IP : 3.128.79.193


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

�

+}g���<�SSKrSSKrSSKrSSKrSSKrSSKrSSKrSSKrSSKrSSK	r	SSK
JrJrJ
r
 SSKJrJr \\R"\4r\rSr\SS\\S\4Sjj5rS	\R"S\\4S
jr\R0S\\S\R"4Sj5r\R4S\S\R"4S
j5r\R4SSS\R"4Sj5rSrS	\R"4Sjr\R<S\R>S.Sjj5r Sr!S\S\"4Sjr#\R0S5r$\$R5\RJ5\R<S55r\R<S\RL4Sj5r'\R<S5r(Sr)g)�N)�Union�Optional�cast�)�ResourceReader�Traversablec�f^^�[5m[R"T5TT4UU4Sjj5nU$)a
Replace 'package' parameter as 'anchor' and warn about the change.

Other errors should fall through.

>>> files('a', 'b')
Traceback (most recent call last):
TypeError: files() takes from 0 to 1 positional arguments but 2 were given

Remove this compatibility in Python 3.14.
c�>�UTLa/UTLaT"X5$[R"S[SS9 T"U5$UTLaT"5$T"U5$)Nz/First parameter to files is renamed to 'anchor'�)�
stacklevel)�warnings�warn�DeprecationWarning)�anchor�package�func�	undefineds  ���B/opt/alt/python313/lib64/python3.13/importlib/resources/_common.py�wrapper�"package_to_anchor.<locals>.wrapper!sX����)�#��Y�&��F�,�,��M�M�A�"��
�
��=� �
�y�
 ��6�M��F�|��)�object�	functools�wraps)rrrs` @r�package_to_anchorrs3�����I��_�_�T�� �)�����Nrr�returnc�*�[[U55$)z+
Get a Traversable resource for an anchor.
)�from_package�resolve)rs r�filesr 3s��
����(�(rrc�t�URn[URSS5nUcgU"UR5$)z7
Return the package's loader if it's a ResourceReader.
�get_resource_readerN)�__spec__�getattr�loader�name)r�spec�readers   rr"r";s9�����D�
�T�[�[�"7��
>�F�
�~���$�)�)��r�candc�6�[[RU5$�N)r�types�
ModuleType�r)s rrrKs���� � �$�'�'rc�.�[R"U5$r+)�	importlib�
import_moduler.s r�_r2Ps���"�"�4�(�(rc�B�[[5RS5$)N�__name__)r�
_infer_caller�	f_globalsr.s rr2r2Us���=�?�,�,�Z�8�9�9rc��SnSn[R"U[R"55n[R"X5n[	U5R
$)zK
Walk the stack and find the frame of the first caller not in this module.
c�(�UR[:H$r+)�filename�__file__��
frame_infos r�is_this_file�#_infer_caller.<locals>.is_this_file_s���"�"�h�.�.rc� �URS:H$)Nr)�functionr;s r�
is_wrapper�!_infer_caller.<locals>.is_wrapperbs���"�"�i�/�/r)�	itertools�filterfalse�inspect�stack�next�frame)r=rA�
not_this_file�callerss    rr5r5ZsF��
/�0��)�)�,��
�
��H�M��#�#�J�>�G���=���rc��SSKJn U"U5nURRUR5nUR5$)z5
Return a Traversable object for the given package.

r)�	wrap_spec)�	_adaptersrLr%r"r&r )rrLr'r(s    rrrks5��%��W��D�
�[�[�
,�
,�T�Y�Y�
7�F��<�<�>�r)�
_os_removec#�t# �[R"US9up4[R"X0"55 [R"U5 A[
R"U5v� U"U5 g![R"U5 f=f![a gf=f!U"U5 f![a ff=f=f7f�N)�suffix)�tempfile�mkstemp�os�write�close�pathlib�Path�FileNotFoundError)r(rQrN�fd�raw_paths     r�	_tempfiler\xs�����#�#�6�2�L�B��	��H�H�R���"��H�H�R�L���l�l�8�$�$�	��x� ��
�H�H�R�L��!�	��	��	��x� �� �	��	�so�B8�A/�/B�&B
�.B8�/B�B�

B�B8�B�B8�B5�B%�$B5�%
B2�/B5�1B2�2B5�5B8c�>�[URURS9$rP)r\�
read_bytesr&��paths r�
_temp_filera�s���T�_�_�T�Y�Y�7�7rr`c��[R"[5 UR5sSSS5 $!,(df   g=f)z�
Some Traversables implement ``is_dir()`` to raise an
exception (i.e. ``FileNotFoundError``) when the
directory doesn't exist. This function wraps that call
to always return a boolean and only return True
if there's a dir and it exists.
NF)�
contextlib�suppressrY�is_dirr_s r�_is_present_dirrf�s+��
�	�	�.�	/��{�{�}�
0�	/�	/��s	�5�
Ac�N�[U5(a[U5$[U5$)zi
Given a Traversable object, return that object as a
path on the local file system in a context manager.
)rf�	_temp_dirrar_s r�as_fileri�s"��.�d�3�3�9�T�?�I��D�9I�Irc#�# �Uv� g7f)z/
Degenerate behavior for pathlib.Path objects.
N�r_s rr2r2�s����J�s��dirc#�t# �Un[R"U5v� SSS5 g!,(df   g=f7f)z<
Wrap tempfile.TemporyDirectory to return a pathlib object.
N)rWrX)rl�results  r�
_temp_pathro�s$���


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

���s�8�'�	8�
5�8c#��# �UR5(de[[R"55n[	X5v� SSS5 g!,(df   g=f7f)zh
Given a traversable dir, recursively replicate the whole tree
to the file system in a context manager.
N)rerorR�TemporaryDirectory�_write_contents)r`�temp_dirs  rrhrh�s@����;�;�=�=��=�	�H�/�/�1�	2�h��h�-�-�
3�	2�	2�s�6A �A�	A �
A�A c��URUR5nUR5(a4UR5 UR	5Hn[X#5 M U$UR
UR55 U$r+)�joinpathr&re�mkdir�iterdirrr�write_bytesr^)�target�source�child�items    rrrrr�sf���O�O�F�K�K�(�E�
�}�}���
���
��N�N�$�D��E�(�%��L�	���&�+�+�-�.��Lrr+)�)*rTrWrRrrcr,r0rEr
rC�typingrrr�abcrrr-�str�Package�Anchorrr r"�singledispatchr�registerr2r5r�contextmanager�remover\ra�boolrfrirXrqrorhrrrkrr�<module>r�s��	����������(�(�,�
�� � �#�%�
&��	���@�)�(�6�"�)�k�)��)�
��!1�!1�
�h�~�6N�
� ���(�(�6�"�(�u�'7�'7�(��(�	���)�C�)�E�$�$�)��)�	���:�D�:�U�%�%�:��:��"
�%�*�*�
�������y�y�
���48�
�+�
�$�
����J��J�	���'�,�,������� �����#�H�/�/�#��#����.��.�r

?>