K iu ddlZddlZddlmZddlmZddlmZdZdZ dZ ejfd e d e fd Z ejfd ed e d dfd ZGddeZy)N)RawConfigParser)py39)SetuptoolsDeprecationWarningct|trtjd|S |j d}tjd|}|j d}|S#t $rY|SwxYw)NNFDutf-8) isinstancestr unicodedata normalizedecodeencode UnicodeError)paths ^/mnt/ssd/data/python-lab/Trading/venv/lib/python3.12/site-packages/setuptools/unicode_utils.py decomposer sr$$$UD11 {{7#$$UD1{{7# K   K s8A"" A/.A/ct|tr|Stjxsd}|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 sysgetfilesystemencodingrUnicodeDecodeError)rfs_enc candidatesencs rfilesys_decodersk $  & & ( 3GFJ ;;s# # "   sA  AAcD |j|S#t$rYywxYw)z/turn unicode encoding into a functional routineN)rUnicodeEncodeError)stringrs r try_encoder+s(}}S!! s  filereturnc" t|dd5}|jcdddS#1swYyxYw#t$rOtj ||t|d|5}|jcdddcYS#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 encodingNr fallback_encoding)openreadr_Utf8EncodingNeededemit)r r'fs r_read_utf8_with_fallbackr-3s $g . !668      d>O P $&7 8 A668   s;6* 6366.B$B4 BB B Bcfgc |j|dy#t$r=tj|||j |j||YywxYw)zSame idea as :func:`_read_utf8_with_fallback`, but for the :meth:`RawConfigParser.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_fallbackr1CsT3 ( 3  d>O P   123sAAAceZdZdZdZy)r*zZ `encoding="utf-8"` fails with {file!r}, trying `encoding={fallback_encoding!r}`. a Fallback behavior 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_DETAILSrr*r*SsH Hr9r*)rr configparserrcompatrwarningsrrrrLOCALE_ENCODINGr r-r1r*r8r9rr>sw (2 *;?:N:N 3 SV "8<7K7K 3  3 # 3  3 6r9