+
    ^|i                       a  0 t $ R t^ RIHt ^ RIt^ RIt^ RIt^ RIHtH	t	 R
R R llt
]! 4       tR]R&   ]3R R	 llt]! 4       tR# )z+
Utilities for dealing with text encodings
)annotationsN)AnyLiteralc               $    V ^8  d   QhRRRRRR/# )   streamr   defaultz
str | Nonereturn )formats   "8/usr/lib/python3/dist-packages/IPython/utils/encoding.py__annotate__r      s!      3  z     c                f    \        V R4      '       d   V P                  '       g   V# V P                  # )a  Return the given stream's encoding or a default.

There are cases where ``sys.std*`` might not actually be a stream, so
check for the encoding attribute prior to returning it, and return
a default if it doesn't exist or evaluates as False. ``default``
is None if not provided.
encoding)hasattrr   )r   r   s   &&r   get_stream_encr      s(     6:&&fooor   object	_sentinelc                    V ^8  d   QhRRRR/# )r   prefer_streamzobject | boolr	   strr
   )r   s   "r   r   r   .   s     + +m +C +r   c                   V \         Jd    \        P                  ! R\        ^R7       Rp RpV '       d   \	        \
        P                  4      pV'       d   VR8X  d    \        P                  ! 4       pT;'       g    \
        P                  ! 4       pVR8X  d   \        P                  ! R\        4       R# V#   \         d     LRi ; i)	a  Return IPython's guess for the default encoding for bytes as text.

If prefer_stream is True (default), asks for stdin.encoding first,
to match the calling Terminal, but that is often None for subprocesses.

Then fall back on locale.getpreferredencoding(),
which should be a sensible platform default (that respects LANG environment),
and finally to sys.getdefaultencoding() which is the most conservative option,
and usually UTF8 as of Python 3.
zgetpreferredencoding(prefer_stream=) argument is deprecated since IPython 9.0, getdefaultencoding() will take no argument in the future. If you rely on `prefer_stream`, please open an issue on the IPython repo.)
stacklevelTNasciicp0zInvalid code page cp0 detected - using cp1252 instead.If cp1252 is incorrect please ensure a valid code page is defined for the process.cp1252)r   warningswarnDeprecationWarningr   sysstdinlocalegetpreferredencoding	ExceptiongetdefaultencodingRuntimeWarning)r   encs   & r   r%   r%   .   s     I%  	
 CSYY'#.	 --/C 
)
)'')C e|* 		
 J  		s   B7 7CC)N)__conditional_annotations____doc__
__future__r   r    r"   r   typingr   r   r   r   r   __annotations__r%   DEFAULT_ENCODING)r(   s   @r   <module>r.      sH    #     H	6  7@ +\ &' r   