yL iUdZddlZddlZddlZddlZddlmZmZddlm Z m Z m Z m Z m Z mZmZmZmZmZmZej(dk(ej(dk(ej*dk(dZd ed e fd ZeseZd e efd Zeed < eed< eed< ej:Z eddZede d efdZdee dfd eefdZeddZ ede d e!fdZ dee d ee!fdZ eddZ"ede d e!fdZ"dee d ee!fdZ"y)aCUtilities to help provide compatibility with Python 3. This module exists for historical reasons. Code outside GitPython may make use of public members of this module, but is unlikely to benefit from doing so. GitPython continues to use some of these utilities, in some cases for compatibility across different platforms. N) force_bytes force_text) AnyAnyStrDictIOListOptional TYPE_CHECKINGTupleTypeUnionoverloadntposixdarwin)is_winis_posix is_darwinnamereturnc t|}t j td|dt d|S#t$rtdtd|dwxYw)Nzmodule z has no attribute .zt and other is_ aliases are deprecated. Write the desired os.name or sys.platform check explicitly instead.) stacklevel)_deprecated_platform_aliasesKeyErrorAttributeError__name__warningswarnDeprecationWarning)rvalues P/mnt/ssd/data/python-lab/Trading/venv/lib/python3.12/site-packages/git/compat.py_getattrr%.ssY,T2 MM *AdVN N  L Ywxl2DTHMNTXXYs 3 Ac&gttSN)globalsrr$__dir__r+As 6WY 65 66r*rrrscyr'r)r,s r$ safe_decoder/m"%r*cyr'r)r.s r$r/r/qs#&r*ct|tr|St|tr|jtdS|yt d|)z)Safely decode a binary string to Unicode.surrogateescapeN Expected bytes or text, but got ) isinstancestrbytesdecodedefenc TypeErrorr.s r$r/r/usC!S Au xx 122 CDDr*cyr'r)r.s r$ safe_encoder<r0r*cyr'r)r.s r$r<r<s%(r*ct|tr|jtSt|tr|S|yt d|)z)Safely encode a binary string to Unicode.Nr4)r5r6encoder9r7r:r.s r$r<r<s@!Sxx Au  CDDr*cyr'r)r.s r$ win_encoderAs!$r*cyr'r)r.s r$rArAs$'r*ct|tr$|jtjdSt|t r|S|t d|y)z8Encode Unicode strings for process arguments on Windows.FNr4)r5r6r?localegetpreferredencodingr7r:r.s r$rArAsK!Sxx33E:;; Au  CDD r*)r,NrN)#__doc__rDossysr gitdb.utils.encodingrrtypingrrrrr r r r r rrrplatformrr6r% __getattr__r+bool__annotations__getfilesystemencodingr9r/r<r7rAr)r*r$rPs  8    $ggo7")  3 3 K7c7      # " " $G % % &6&c& & E5& E8C= E % % (6(e( ( E8F# E E $ $ '&'U' '(6"xr*