�
�Wc�
� � � 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 )� N)�Union�Iterable�ContextManager�BinaryIO�TextIO�Any� )�_commonc �H � � t j � � � fd�� }|S )Nc �l �� 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.� )�
stacklevel)�warnings�warn�__name__�DeprecationWarning)�args�kwargs�funcs ��4/usr/lib64/python3.12/importlib/resources/_legacy.py�wrapperzdeprecated.<locals>.wrapper sQ �� ��
�
��}�}�
P�
P�
P�
��
�
�
� �t�T�$�V�$�$�$� )� functools�wraps)r r s ` r �
deprecatedr s4 �� ��_�_�T��%� %� %� %� �%� �Nr c � � 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�path�split�
ValueError)r �str_path�parent� file_names r �normalize_pathr% sC � � �4�y�H����
�
�h�/��F�I�
�v��D�=�=�=�>�>��r �package�resource�returnc �l � t j | � t |� z j d� S )zDReturn a file-like object opened for binary reading of the resource.�rb�r
�filesr% �open�r&