Team Ai
Datasetpublic

codekingpro/portable-devtools

sourceHugging Faceupdated 5mo agoView on Hugging Face
1likes15kdownloads
unicode_utils.cpython-313.pyc44 linesDownload Raw Back to __pycache__
1�

2��ju���SSKrSSKrSSKJr SSKJr SSKJr SrSr	Sr3\R4S	\S4\4Sjjr
\R4S\S	\S5S4S
jjr"SS\5rg)�N)�RawConfigParser�)�py39)�SetuptoolsDeprecationWarningc���[U[5(a[R"SU5$UR	S5n[R"SU5nURS5nU$![a U$f=f)N�NFD�utf-8)�6isinstance�str�unicodedata�	normalize�decode�encode�UnicodeError)�paths �^D:\code\apps\devtools\python\user_packages\Python313\site-packages\setuptools/unicode_utils.py�	decomposer7su���$�����$�$�U�D�1�1�
��{�{�7�#���$�$�U�D�1���{�{�7�#���K���
���K�
�s�9A)�)8A7�6A7c���[U[5(aU$[R"5=(d SnUS4nUHnUR	U5s $ g![9a M'f=f)zQ10Ensure that the given path is decoded,11``None`` when no expected encoding works12r	N)r13r�sys�getfilesystemencodingr�UnicodeDecodeError)r�fs_enc�14candidates�encs    r�filesys_decodersi���$������
�
&�
&�
(�
3�G�F����J���	��;�;�s�#�#����"�	��	�s�A�15A$�#A$c�F�URU5$![a gf=f)z/turn unicode encoding into a functional routineN)r�UnicodeEncodeError)�stringrs  r�16try_encoder+s(����}�}�S�!�!������s��17 � �file�returnc�$�[USSS9nUR5sSSS5 $!,(df   g=f![aM [R	XS9 [USUS9nUR5sSSS5 s$!,(df   g=ff=f)z�18First try to read the file with UTF-8, if there is an error fallback to a19different encoding ("locale" by default). Returns the content of the file.20Also useful when reading files that might have been produced by an older version of21setuptools.22�rr	��encodingN�r �fallback_encoding)�open�readr�_Utf8EncodingNeeded�emit)r r'�fs   r�_read_utf8_with_fallbackr-3sp���
�$��g�
.�!��6�6�8�/�
.�
.����� � �d� �P�
�$��&7�
8�A��6�6�8�9�
8�
8�
8���s;�8�'�	8�235�8�8�(B� A<�024B�<25B	�B�B�cfgc��URUSS9 g![a5 [RXS9 UR	5 URXS9 gf=f)z�Same idea as :func:`_read_utf8_with_fallback`, but for the26:meth:`RawConfigParser.read` method.27 28This method may call ``cfg.clear()``.29r	r$r&N)r)rr*r+�clear)r.r r's   r�_cfg_read_utf8_with_fallbackr1CsN��3�������(���3�� � �d� �P��	�	�������2�3�s��<A�Ac��\rSrSrSrSrSrg)r*�SzZ30    `encoding="utf-8"` fails with {file!r}, trying `encoding={fallback_encoding!r}`.31    a�32    Fallback behavior for UTF-8 is considered **deprecated** and future versions of33    `setuptools` may not implement it.34 35    Please encode {file!r} with "utf-8" to ensure future builds will succeed.36 37    If this file was produced by `setuptools` itself, cleaning up the cached files38    and re-building/re-installing the package with a newer version of `setuptools`39    (e.g. by updating `build-system.requires` in its `pyproject.toml`)40    might solve the problem.41    �N)�__name__�42__module__�__qualname__�__firstlineno__�_SUMMARY�_DETAILS�__static_attributes__r4�rr*r*Ss���H�43�Hr<r*)rr�configparserr�compatr�warningsrrrr�LOCALE_ENCODINGrr-r1r*r4r<r�<module>rAsw��44��(��2�	��*�;?�:N�:N�
�3�
�SV�
�"8<�7K�7K�
3�	�
3� #�
3�	�
3� �6�r<
codekingpro/portable-devtools · Team Ai