}BFjdZddlZddlZddlmZddlmZddede dzde fd Z dd e dee defd Z dde ezdee de fd Z d Z ddZddZejdkZdS)zCompatibility tricks for Python 3. Mainly to do with unicode. This file is deprecated and will be removed in a future version. N)DEFAULT_ENCODING)Optionalsencodingreturnc@|pt}||dSNreplace)rdecoderrs EC:\PYTHON\_runtimes\venv\Lib\site-packages\IPython/utils/py3compat.pyr r !++H 88Hi ( ((uc@|pt}||dSr )rencode)rrs rrrrrcPt|trt||S|SN) isinstancebytesr r s r cast_unicoders)!U#a""" Hrc t|S#t$rYnwxYw t|S#t$rYnwxYwdS)zlunicode(e) with various fallbacks. Used for exceptions, which may not be safe to call unicode() on. zUnrecoverably corrupt evalue)str UnicodeErrorrepr)es r safe_unicodersj 1vv       Aww       * )s 1 >>c*tj|Sr) builtin_modinput)prompts rr"r"1s  V $ $$rcd}||n|}t|d5}|pt}t|||d||ddddS#1swxYwYdS)N__ipython_bottom__rbexec)opencompiler'read)fnameglobloccompiler__tracebackhide__fs rexecfiler15s,/##C eT  ;a&w XXaffhhv . .c:::;;;;;;;;;;;;;;;;;;s8AA"%A"PyPyr)r)NN)__doc__platformbuiltinsr!rrtypingrrrr rrrr"r1python_implementationPYPYrrr:s6 &&&&&&))e)sTz)S)))) ))c)Xc])E))))   C%K 8C= #    ***&%%%%;;;;&x%''61r