
    ^hB                         S r SSKrSSKrSSKJr  SS jrSS jrSS jrS r	SS	 jr
SS
 jr\R                  " 5       S:H  rSS jr\=rrg)zCompatibility tricks for Python 3. Mainly to do with unicode.

This file is deprecated and will be removed in a future version.
    N   )DEFAULT_ENCODINGc                 D    U=(       d    [         nU R                  US5      $ Nreplace)r   decodesencodings     Q/home/james-whalen/.local/lib/python3.13/site-packages/IPython/utils/py3compat.pyr   r          ++H88Hi((    c                 D    U=(       d    [         nU R                  US5      $ r   )r   encode)ur   s     r   r   r      r   r   c                 F    [        U [        5      (       a  [        X5      $ U $ N)
isinstancebytesr   r	   s     r   cast_unicoder      s    !Ua""Hr   c                 r     [        U 5      $ ! [         a     Of = f [        U 5      $ ! [         a     gf = f)zdunicode(e) with various fallbacks. Used for exceptions, which may not be
safe to call unicode() on.
zUnrecoverably corrupt evalue)strUnicodeErrorrepr)es    r   safe_unicoder      sE    1v Aw )s   
 

) 
66c                 .    [         R                  " U 5      $ r   )builtin_modinput)prompts    r   r   r   /   s    V$$r   c                     Ub  UOUn[        U S5       nU=(       d    [        n[        U" UR                  5       U S5      X5        S S S 5        g ! , (       d  f       g = f)Nrbexec)opencompiler#   read)fnameglobloccompilerfs        r   execfiler,   3   sH    /#C	eT	a&wXaffhv.: 
		s   2A
APyPyc                     U $ r    )xr   s     r   no_coder1   @   s    Hr   r   ) )NN)__doc__platformbuiltinsr   r   r   r   r   r   r   r   r,   python_implementationPYPYr1   unicode_to_strcast_bytes_py2r/   r   r   <module>r:      sY      &)
)
*&%; %%'61 #* )r   