�
�Wc�
c s� � d dl Z d dlZd dlZd dlZd dlZd dlmZmZmZm Z m
Z
mZ ddlm
Z
eej ef ZeZd� Zd� Zededed e fd
�� Zededed efd�� Ze ddedededed e
f
d�� Ze ddedededed ef
d�� Zeded ee fd�� Zededed efd�� Zededed eej8 fd�� ZdS )i N)�Union�Iterable�ContextManager�BinaryIO�TextIO�Anyi )�_commonc sH � � t j � � � fd�� }|S )Nc sl �� t j �j � d�t d�� �| i |��S )Nz� is deprecated. Use files() instead. Refer to https://importlib-resources.readthedocs.io/en/latest/using.html#migrating-from-legacy for migration advice.i )Z
stacklevel)�warningsZwarnZ__name__ZDeprecationWarning)ZargsZkwargs�func� ��4/usr/lib64/python3.12/importlib/resources/_legacy.py�wrapperzdeprecated.<locals>.wrapper sQ �� ��
�
��}�}�
P�
P�
P�
��
�
�
� �t�T�$�V�$�$�$� )� functoolsZwraps)r r s ` r
�
deprecatedr s4 �� ��_�_�T��%� %� %� %� �%� �Nr c s� � t | � }t j j |� \ }}|rt | �d�� �|S )z�Normalize a path by ensuring it is a string.
If the resulting string contains path separators, an exception is raised.
z must be only a file name)�str�os�pathZsplitZ
ValueError)r Zstr_pathZparentZ file_name� r
�normalize_pathr sC � � �4�y�H����
�
�h�/��F�I�
�v��D�=�=�=�>�>��r �package�resourceZreturnc sl � t j | � t |� z j d� S )zDReturn a file-like object opened for binary reading of the resource.Zrb�r �filesr Zopen�r r � r
�open_binaryr + s( � �
�M�M�'�"�^�H�%=�=�C�C�D�I�Ir c sj � t j | � t |� z j � S )z+Return the binary contents of the resource.)r r r Z
read_bytesr r r
�read_binaryr 1 s&