Your IP : 216.73.216.178


Current Path : /usr/lib/python3.12/site-packages/setuptools/__pycache__/
Upload File :
Current File : //usr/lib/python3.12/site-packages/setuptools/__pycache__/unicode_utils.cpython-312.pyc

�

�������ddlZddlZddlmZddlmZddlmZd�Zd�Z	d�Z
ejfd	ed
efd�Z
ejfded	ed
dfd
�ZGd�de�Zy)�N)�ConfigParser�)�py39)�SetuptoolsDeprecationWarningc���t|t�rtjd|�S	|j	d�}tjd|�}|jd�}|S#t$rY|SwxYw)N�NFD�utf-8)�
isinstance�str�unicodedata�	normalize�decode�encode�UnicodeError)�paths �=/usr/lib/python3.12/site-packages/setuptools/unicode_utils.py�	decomposer
sr���$����$�$�U�D�1�1�
��{�{�7�#���$�$�U�D�1���{�{�7�#���K���
���K�
�s�8A"�"	A/�.A/c��t|t�r|Stj�xsd}|df}|D]}	|j	|�cSy#t
$rY�$wxYw)z]
    Ensure that the given path is decoded,
    ``None`` when no expected encoding works
    r	N)r
r�sys�getfilesystemencodingr�UnicodeDecodeError)r�fs_enc�
candidates�encs    r�filesys_decodersk���$�����
�
&�
&�
(�
3�G�F����J����	��;�;�s�#�#����"�	��	�s�A
�
	A�Ac�D�	|j|�S#t$rYywxYw)z/turn unicode encoding into a functional routineN)r�UnicodeEncodeError)�stringrs  r�
try_encoder+s(����}�}�S�!�!������s��	��file�returnc�"�	t|dd��5}|j�cddd�S#1swYyxYw#t$rOtj	||��t|d|��5}|j�cddd�cYS#1swYYyxYwwxYw)a

    First try to read the file with UTF-8, if there is an error fallback to a
    different encoding ("locale" by default). Returns the content of the file.
    Also useful when reading files that might have been produced by an older version of
    setuptools.
    �rr	��encodingN�r �fallback_encoding)�open�readr�_Utf8EncodingNeeded�emit)r r'�fs   r�_read_utf8_with_fallbackr-3s����
�$��g�
.�	�!��6�6�8�	�	�	����� � �d�>O� �P�
�$��&7�
8�	�A��6�6�8�	�	�	���s;�6�*�	6�3�6�6�.B�$B�4
B�B
	�B�
B�cfgc��	|j|d��y#t$r=tj||��|j	�|j||��YywxYw)z�Same idea as :func:`_read_utf8_with_fallback`, but for the
    :meth:`ConfigParser.read` method.

    This method may call ``cfg.clear()``.
    r	r$r&N)r)rr*r+�clear)r.r r's   r�_cfg_read_utf8_with_fallbackr1CsT��3�������(���3�� � �d�>O� �P��	�	������ 1��2�3�s��AA�Ac��eZdZdZdZy)r*zZ
    `encoding="utf-8"` fails with {file!r}, trying `encoding={fallback_encoding!r}`.
    a�
    Fallback behaviour for UTF-8 is considered **deprecated** and future versions of
    `setuptools` may not implement it.

    Please encode {file!r} with "utf-8" to ensure future builds will succeed.

    If this file was produced by `setuptools` itself, cleaning up the cached files
    and re-building/re-installing the package with a newer version of `setuptools`
    (e.g. by updating `build-system.requires` in its `pyproject.toml`)
    might solve the problem.
    N)�__name__�
__module__�__qualname__�_SUMMARY�_DETAILS��rr*r*Ss���H�
�Hr9r*)rr�configparserr�compatr�warningsrrrr�LOCALE_ENCODINGrr-r1r*r8r9r�<module>r>sw���
�%��2�	��*�;?�:N�:N�
�3�
�SV�
�"59�4H�4H�
3�	�
3� �
3�	�
3� �6�r9