AlkantarClanX12

Your IP : 3.139.72.152


Current Path : /opt/alt/python312/lib64/python3.12/__pycache__/
Upload File :
Current File : //opt/alt/python312/lib64/python3.12/__pycache__/_pyio.cpython-312.opt-2.pyc

�

�Q�f�m��n�	ddlZddlZddlZddlZddlZddlZddlmZejdvrddl
mZndZddl
Z
ddl
mZmZmZmZhd�Zeed�r6ej)ej*�ej)ej,�dZeZeed	�xsej2j4ZeZd-d
�Ze		d.d��Zd�Z 	e
jBZ!	e
jFZ#Gd�dejL��Z'e
jNjQe'�Gd�de'�Z)e
jRjQe)�ddl*m+Z+e)jQe+�Gd�de'�Z,e
jXjQe,�Gd�de,�Z-Gd�de,�Z.Gd�de-�Z/Gd�de-�Z0Gd�d e,�Z1Gd!�d"e0e/�Z2Gd#�d$e)�Z+Gd%�d&e'�Z3e
jfjQe3�Gd'�d(ejh�Z5Gd)�d*e3�Z6Gd+�d,e6�Z7y#e"$re Z!Y��KwxYw#e"$rGd
�de$e%�Z#Y��VwxYw)/�N)�
allocate_lock>�win32�cygwin)�setmode)�__all__�SEEK_SET�SEEK_CUR�SEEK_END>r���	SEEK_HOLEi �gettotalrefcountc��	|�Wtjjrd}nd}tjjrddl}|jdt|dz�|S)N�utf-8�localerz"'encoding' argument not specified.r)�sys�flags�	utf8_mode�warn_default_encoding�warnings�warn�EncodingWarning)�encoding�
stacklevelrs   �,/opt/alt/python312/lib64/python3.12/_pyio.py�
text_encodingr+sS��
����9�9����H��H��9�9�*�*���M�M�>�)�:��>�
;��O�c� �	t|t�stj|�}t|tt
tf�st
d|z��t|t�st
d|z��t|t�st
d|z��|�t|t�st
d|z��|�t|t�st
d|z��t|�}|td�z
st|�t|�kDrtd|z��d|v}	d|v}
d	|v}d
|v}d|v}
d|v}d
|v}|r
|rtd��|	|
z|z|zdkDrtd��|	s|
s|s
|std��|r
|�td��|r
|�td��|r
|�td��|r |dk(rddl
}|jdtd�t||	xrdxsd|
xrdxsdz|xrd	xsdz|xrd
xsdz|
xrdxsdz||��}|}	d}|dk(s|dkr|j�rd}d}|dkr<t}	tj |j#��j$}|dkDr|}	|dkrtd��|dk(r|r|Std��|
r
t+||�}n0|	s|s|r
t-||�}n|
r
t/||�}ntd|z��|}|r|St1|�}t3|||||�}|}||_|S#t&t(f$rY��wxYw#|j7��xYw) Nzinvalid file: %rzinvalid mode: %rzinvalid buffering: %r�invalid encoding: %r�invalid errors: %rzaxrwb+t�x�r�w�a�+�t�bz'can't have text and binary mode at oncerz)can't have read/write/append mode at oncez/must have exactly one of read/write/append modez-binary mode doesn't take an encoding argumentz+binary mode doesn't take an errors argumentz+binary mode doesn't take a newline argumentrzaline buffering (buffering=1) isn't supported in binary mode, the default buffer size will be usedr�)�openerF���Tzinvalid buffering sizezcan't have unbuffered text I/Ozunknown mode: %r)�
isinstance�int�os�fspath�str�bytes�	TypeError�set�len�
ValueErrorrr�RuntimeWarning�FileIO�isatty�DEFAULT_BUFFER_SIZE�fstat�fileno�
st_blksize�OSError�AttributeError�BufferedRandom�BufferedWriter�BufferedReaderr�
TextIOWrapper�mode�close)�filerB�	bufferingr�errors�newline�closefdr)�modes�creating�reading�writing�	appending�updating�text�binaryr�raw�result�line_buffering�bs�buffers                      r�openrVLs���r�f�d�C� ��y�y�����d�S�%��-�.��*�T�1�2�2��d�C� ��*�T�1�2�2��i��%��/�)�;�<�<���J�x��$=��.��9�:�:�
��*�V�S�"9��,�v�5�6�6���I�E��s�9�~���T��S��Z�!7��+�d�2�3�3��e�|�H��U�l�G��U�l�G��u��I��e�|�H��%�<�D�
�E�\�F����B�C�C��'��G�#�i�/�!�3��D�E�E���7�i��J�K�K�
�(�&��H�I�I�
�&�$��F�G�G�
�'�%��F�G�G�
�)�q�.���
�
�C�$�a�	)����"�s�(�b��/�c�'�R�)��/�c�'�R�)��#��)�r�+��"�s�(�b�	*�
��
)�C��F�&�����>�Y��]�s�z�z�|��I�!�N��q�=�+�I�
#��X�X�c�j�j�l�+�6�6����6� "�I��q�=��5�6�6���>���
��=�>�>��#�C��3�F�
��I�#�C��3�F�
�#�C��3�F��/�$�6�7�7�����M� ��*���V�X�v�w��O������	��
��5�^�,�
��
��6�����
�s=�6+K:�"-K%� K:�0AK:�$K:�%K7�4K:�6K7�7K:�:L
c�R�	ddl}|jdtd�t|d�S)Nrz(_pyio.open_code() may not be using hooksr�rb)rrr5rV)�pathrs  r�_open_code_with_warningrZs-��	���M�M�<� �!�%���d��rc��eZdZy)�UnsupportedOperationN)�__name__�
__module__�__qualname__�rrr\r\7s��rr\c��eZdZ	d�Zdd�Zd�Zdd�Zd�ZdZd�Z	d	�Z
d
�Zdd�Zd�Z
dd
�Zd�Zdd�Zed��Zdd�Zd�Zd�Zd�Zd�Zdd�Zd�Zd�Zdd�Zd�Zy)�IOBasec�N�	t|jj�d|�d���)N�.z() not supported)r\�	__class__r])�self�names  r�_unsupportedzIOBase._unsupported]s)��N�"�$(�N�N�$;�$;�T�$C�D�	Drc�(�	|jd�y)N�seek�rh�rf�pos�whences   rrjzIOBase.seekds��	�	
���&�!rc�(�	|jdd�S�Nrr)rj�rfs r�tellzIOBase.tellts��C��y�y��A��rNc�(�	|jd�y�N�truncaterk�rfrms  rruzIOBase.truncatex���	�
	
���*�%rc�&�	|j�y�N��_checkClosedrqs r�flushzIOBase.flush�s��	�	
���rFc�h�	|js	|j�d|_yy#d|_wxYw)NT)�_IOBase__closedr|rqs rrCzIOBase.close�s5��	��}�}�
%��
�
�� $��
�	��!%��
�s�(�	1c��		|j}|rytr|j�y	|j�y#t$rYywxYw#YyxYwry)�closedr=�_IOBASE_EMITS_UNRAISABLErC)rfr�s  r�__del__zIOBase.__del__�sT��)�	��[�[�F���#��J�J�L�
��
�
���#�	�
�	��$
��s�;�A
�	A�A�
Ac��	y�NFr`rqs r�seekablezIOBase.seekable�s��	�
rc�L�	|j�st|�d��|��y)NzFile or stream is not seekable.)r�r\�rf�msgs  r�_checkSeekablezIOBase._checkSeekable��>��	��}�}��&�*-�+�(I�@�
@�;>�@�
@�rc��	yr�r`rqs r�readablezIOBase.readable����	�rc�L�	|j�st|�d��|��y)NzFile or stream is not readable.)r�r\r�s  r�_checkReadablezIOBase._checkReadable�r�rc��	yr�r`rqs r�writablezIOBase.writable�r�rc�L�	|j�st|�d��|��y)NzFile or stream is not writable.)r�r\r�s  r�_checkWritablezIOBase._checkWritable�r�rc��	|jSry)r~rqs rr�z
IOBase.closed�s��	��}�}�rc�D�	|jrt|�d��|��y�N�I/O operation on closed file.�r�r4r�s  rr{zIOBase._checkClosed�s7��	��;�;�� #��=�6�
6�14�6�
6�rc�(�	|j�|Sryrzrqs r�	__enter__zIOBase.__enter__�s��Q������rc�&�	|j�yry)rC)rf�argss  r�__exit__zIOBase.__exit__�s��9��
�
�rc�(�	|jd�y)Nr:rkrqs rr:z
IOBase.fileno�s��	�	
���(�#rc�&�	|j�yr�rzrqs rr7z
IOBase.isattys��	�	
����rc����	t�d�r��fd�}nd�}��d�n	�j}|��t	�}�dkst|��kr[�j
|��}|s	t|�S||z
}|jd�r	t|�S�dkr�Lt|��kr�[t|�S#t$rt��d���wxYw)N�peekc����jd�}|sy|jd�dzxst|�}�dk\rt|��}|S)Nr�
r)r��findr3�min)�	readahead�nrf�sizes  ��r�
nreadaheadz#IOBase.readline.<locals>.nreadaheadsI��� �I�I�a�L�	� ���^�^�E�*�Q�.�A�3�y�>���1�9��A�t��A��rc��y�Nrr`r`rrr�z#IOBase.readline.<locals>.nreadahead!s��rr*� is not an integerrr�)	�hasattr�	__index__r=r1�	bytearrayr3�read�endswithr0)rfr�r��
size_index�resr's``    r�readlinezIOBase.readlines����	��4�� �
�
��<��D�
$�!�^�^�
�"�|���k���Q�h�#�c�(�T�/��	�	�*�,�'�A����S�z��
�1�H�C��|�|�E�"���S�z���Q�h�#�c�(�T�/��S�z���"�
?��4�(�*<� =�>�>�
?�s�B6�6Cc�&�|j�|Sryrzrqs r�__iter__zIOBase.__iter__6s�������rc�6�|j�}|st�|Sry)r��
StopIteration�rf�lines  r�__next__zIOBase.__next__:s���}�}�������rc��	|�|dkrt|�Sd}g}|D])}|j|�|t|�z
}||k\s�(|S|S�Nr)�list�appendr3)rf�hintr��linesr�s     r�	readlineszIOBase.readlines@sa��	��<�4�1�9���:��
�����D��L�L���
��T��N�A��D�y�����
�rc�V�	|j�|D]}|j|��yry)r{�write)rfr�r�s   r�
writelineszIOBase.writelinesRs+��	�
	
�����D��J�J�t��r�rry�r*)r]r^r_rhrjrrrur|r~rCr�r�r�r�r�r�r��propertyr�r{r�r�r:r7r�r�r�r�r�r`rrrbrb;s����@D�"� �&���H�	%��6�@��@��@�����6��
�$��(�T���$rrb)�	metaclassc�(�eZdZ	dd�Zd�Zd�Zd�Zy)�	RawIOBasec��	|�d}|dkr|j�St|j��}|j|�}|�y||d�=t	|�S)Nr*r)�readallr�r��readintor0)rfr�r'r�s    rr�zRawIOBase.readms_��	�
�<��D��!�8��<�<�>�!��d�n�n�&�'���M�M�!����9��
�a�b�E��Q�x�rc��	t�}|jt�x}r||z
}|jt�x}r�|rt|�S|Sry)r�r�r8r0)rfr��datas   rr�zRawIOBase.readall~sU��9��k���i�i� 3�4�4�d�4��4�K�C��i�i� 3�4�4�d�4����:���Krc�(�	|jd�y)Nr�rk�rfr's  rr�zRawIOBase.readinto�rwrc�(�	|jd�y�Nr�rkr�s  rr�zRawIOBase.write�s��	�
	
���'�"rNr�)r]r^r_r�r�r�r�r`rrr�r�_s��(��"	�&�#rr�)r6c�<�eZdZ	d	d�Zd	d�Zd�Zd�Zd�Zd�Zd�Z	y)
�BufferedIOBasec�(�	|jd�y�Nr�rk�rfr�s  rr�zBufferedIOBase.read�s��	�"	
���&�!rc�(�	|jd�y)N�read1rkr�s  rr�zBufferedIOBase.read1�s��	�	
���'�"rc�*�	|j|d��S)NF�r���	_readintor�s  rr�zBufferedIOBase.readinto�s��		��~�~�a�u�~�-�-rc�*�	|j|d��S)NTr�r�r�s  r�	readinto1zBufferedIOBase.readinto1�s��	��~�~�a�t�~�,�,rc���t|t�st|�}|jd�}|r|jt	|��}n|jt	|��}t	|�}||d||S�N�B)r+�
memoryview�castr�r3r�)rfr'r�r�r�s     rr�zBufferedIOBase._readinto�sb���!�Z�(��1�
�A�
�F�F�3�K����:�:�c�!�f�%�D��9�9�S��V�$�D���I����"�1���rc�(�	|jd�yr�rkr�s  rr�zBufferedIOBase.write�s��	�	
���'�"rc�(�	|jd�y�N�detachrkrqs rr�zBufferedIOBase.detach����	�	
���(�#rNr�)
r]r^r_r�r�r�r�r�r�r�r`rrr�r��s*��
�"�(#�.�	-�
�	#�$rr�c��eZdZ	d�Zdd�Zd�Zdd�Zd�Zd�Zd�Z	d	�Z
ed
��Zed��Z
ed��Zed
��Zd�Zd�Zd�Zd�Zy)�_BufferedIOMixinc��||_yry��_raw�rfrQs  r�__init__z_BufferedIOMixin.__init__s	����	rc�^�|jj||�}|dkrtd��|S)Nrz#seek() returned an invalid position)rQrjr<)rfrmrn�new_positions    rrjz_BufferedIOMixin.seeks0���x�x�}�}�S�&�1���!���?�@�@��rc�Z�|jj�}|dkrtd��|S)Nrz#tell() returned an invalid position)rQrrr<rvs  rrrz_BufferedIOMixin.tells)���h�h�m�m�o����7��?�@�@��
rNc��|j�|j�|j�|�|j�}|jj|�Sry)r{r�r|rrrQrurvs  rruz_BufferedIOMixin.truncate"sL����������
	
�
�
���;��)�)�+�C��x�x� � ��%�%rc�f�|jrtd��|jj�y)N�flush on closed file)r�r4rQr|rqs rr|z_BufferedIOMixin.flush3s#���;�;��3�4�4������rc���|j�9|js,	|j�|jj�yyy#|jj�wxYwry)rQr�r|rCrqs rrCz_BufferedIOMixin.close8sH���8�8�����
!��
�
������� �)4���
����� ���A�A#c�z�|j�td��|j�|j}d|_|S)Nzraw stream already detached)rQr4r|r�r�s  rr�z_BufferedIOMixin.detach@s6���8�8���:�;�;��
�
���i�i����	��
rc�6�|jj�Sry)rQr�rqs rr�z_BufferedIOMixin.seekableJ����x�x� � �"�"rc��|jSryr�rqs rrQz_BufferedIOMixin.rawMs���y�y�rc�.�|jjSry)rQr�rqs rr�z_BufferedIOMixin.closedQs���x�x���rc�.�|jjSry)rQrgrqs rrgz_BufferedIOMixin.nameU����x�x�}�}�rc�.�|jjSry)rQrBrqs rrBz_BufferedIOMixin.modeYrrc�H�td|jj�d����Nzcannot pickle z object�r1rer]rqs r�__getstate__z_BufferedIOMixin.__getstate__]�!���.����)@�)@�(C�7�K�L�Lrc���|jj}|jj}	|j}dj	|||�S#t
$rdj	||�cYSwxYw)Nz<{}.{} name={!r}>z<{}.{}>)rer^r_rg�formatr=)rf�modname�clsnamergs    r�__repr__z_BufferedIOMixin.__repr__`sj���.�.�+�+���.�.�-�-��	F��9�9�D�'�-�-�g�w��E�E���	6��#�#�G�W�5�5�	6�s�A
�
A+�*A+c�6�|jj�Sry)rQr:rqs rr:z_BufferedIOMixin.filenol����x�x��� � rc�6�|jj�Sry)rQr7rqs rr7z_BufferedIOMixin.isattyorrr�ry)r]r^r_r�rjrrrur|rCr�r�r�rQr�rgrBrrr:r7r`rrr�r�s�����
��
&�"�
!��#�����������������M�F�!�!rr�c�|��eZdZ	dZdd�Zd�Zd�Zd�Z�fd�Zdd�Z	dd�Z
d	�Zdd
�Zd�Z
dd�Zd
�Zd�Zd�Z�xZS)�BytesIONc�B�t�}|�||z
}||_d|_yr�)r��_buffer�_pos)rf�
initial_bytes�bufs   rr�zBytesIO.__init__{s'���k���$��=� �C������	rc�d�|jrtd��|jj�S)Nz__getstate__ on closed file)r�r4�__dict__�copyrqs rrzBytesIO.__getstate__�s(���;�;��:�;�;��}�}�!�!�#�#rc�\�	|jrtd��t|j�S)Nzgetvalue on closed file)r�r4r0rrqs r�getvaluezBytesIO.getvalue�s)��	��;�;��6�7�7��T�\�\�"�"rc�\�	|jrtd��t|j�S)Nzgetbuffer on closed file)r�r4r�rrqs r�	getbufferzBytesIO.getbuffer�s)��	��;�;��7�8�8��$�,�,�'�'rc�n��|j�|jj�t�|�
�yry)r�clear�superrC�rfres �rrCz
BytesIO.close�s&����<�<�#��L�L��� �
��
�rc��|jrtd��|�d}n	|j}|�}|dkrt|j�}t|j�|jkrytt|j�|j|z�}|j|j|}||_t|�S#t$rt	|�d���wxYw)N�read from closed filer*r�rr)
r�r4r�r=r1r3rrr�r0)rfr�r��newposr's     rr�zBytesIO.read�s����;�;��4�5�5��<��D�
$�!�^�^�
�"�|���!�8��t�|�|�$�D��t�|�|���	�	�)���S����&��	�	�D�(8�9���L�L����V�,����	��Q�x���"�
?��4�(�*<� =�>�>�
?�s�C�Cc�&�	|j|�Sry)r�r�s  rr�z
BytesIO.read1�s��	��y�y���rc���|jrtd��t|t�rt	d��t|�5}|j}ddd�dk(ry|j}|t|j�kDr0d|t|j�z
z}|xj|z
c_	||j|||z|xj|z
c_|S#1swY��xYw)N�write to closed file� can't write str to binary streamr�)
r�r4r+r/r1r��nbytesrr3r)rfr'�viewr�rm�paddings      rr�z
BytesIO.write�s����;�;��3�4�4��a����>�?�?�
��]�d����A����6���i�i����T�\�\�"�"���s�4�<�<�'8�!8�9�G��L�L�G�#�L�$%����S��q��!��	�	�Q��	����]�s�
C�Cc���|jrtd��	|j}|�}|dk(r&|dkrtd|����||_|j
S|dk(r*t
d|j
|z�|_|j
S|dk(r3t
dt|j�|z�|_|j
Std��#t$rt	|�d���wxYw)Nzseek on closed filer�r�negative seek position rrzunsupported whence value)	r�r4r�r=r1r�maxr3r)rfrmrn�	pos_indexs    rrjzBytesIO.seek�s����;�;��2�3�3�	��
�
�I��+�C��Q�;��Q�w� ��!E�F�F��D�I��y�y��
�q�[��A�t�y�y�3��/�D�I�
�y�y��	�q�[��A�s�4�<�<�0�3�6�7�D�I��y�y���7�8�8���	:��s�g�%7�8�9�9�	:�s�C	�	C!c�H�|jrtd��|jS)N�tell on closed file)r�r4rrqs rrrzBytesIO.tell�s���;�;��2�3�3��y�y�rc���|jrtd��|�
|j}n'	|j}|�}|dkrtd|����|j|d�=|S#t$rt|�d���wxYw)Nztruncate on closed filer�rznegative truncate position )r�r4rr�r=r1r)rfrmr0s   rruzBytesIO.truncate�s����;�;��6�7�7��;��)�)�C�
"��M�M�	� �k���Q�w� �C�!I�J�J��L�L�����
��"�
>��3�'�);� <�=�=�
>�s�A�A7c�2�|jrtd��y�Nr�Tr�rqs rr�zBytesIO.readable�����;�;��<�=�=�rc�2�|jrtd��yr5r�rqs rr�zBytesIO.writable�r6rc�2�|jrtd��yr5r�rqs rr�zBytesIO.seekable�r6rryr�r�)r]r^r_rr�rrrrCr�r�r�rjrrrur�r�r��
__classcell__�res@rrrssS���F��G��$�
#�(��
�*�
�&�*�
�"�
�
rrc�`�eZdZ	efd�Zd�Zd�Zd
d�Zd
d�Zdd�Z	dd�Z
dd	�Zd
�Zd�Z
dd�Zy)r@c���	|j�std��tj||�|dkrt	d��||_|j
�t�|_y)Nz "raw" argument must be readable.r�invalid buffer size)	r�r<r�r�r4�buffer_size�_reset_read_buf�Lock�
_read_lock�rfrQr>s   rr�zBufferedReader.__init__
s]��	��|�|�~��<�=�=��!�!�$��,��!���2�3�3�&��������&��rc�6�|jj�Sry)rQr�rqs rr�zBufferedReader.readabler�rc� �d|_d|_y)Nrr)�	_read_buf�	_read_posrqs rr?zBufferedReader._reset_read_bufs�������rNc��	|�|dkrtd��|j5|j|�cddd�S#1swYyxYw)Nr*zinvalid number of bytes to read)r4rA�_read_unlockedr�s  rr�zBufferedReader.read!sE��	����r�	��>�?�?�
�_�_��&�&�t�,�	-�	-�_�_�s	�;�Ac�J�d}d}|j}|j}|�|dk(r�|j�t|jd�r-|jj�}|�	||dxsdS||d|zS||dg}d}	|jj
�}||vr|}n |t|�z
}|j|��Adj|�xs|St|�|z
}	||	kr|xj|z
c_||||zS||dg}t|j|�}
|	|krG|jj
|
�}||vr|}n%|	t|�z
}	|j|�|	|kr�Gt||	�}dj|�}||d|_d|_|r|d|S|S)Nr)rNr*r�r)
rErFr?r�rQr�r�r3r��joinr/r>r�)rfr��
nodata_val�empty_valuesrrm�chunk�chunks�current_size�avail�wanted�outs            rrHzBufferedReader._read_unlocked.s����
�"���n�n���n�n��
�9��R��� � �"��t�x�x��+����(�(�*���=��s�t�9�,��,��s�t�9�u�,�,��#�$�i�[�F��L�����
�
����L�(�!&�J����E�
�*���
�
�e�$���8�8�F�#�1�z�1��C��3�����:��N�N�a��N��s�3�q�5�>�!��c�d�)����T�%�%�q�)���a�i��H�H�M�M�&�)�E���$�"�
���S��Z��E��M�M�%� �
�a�i�
��5�M���h�h�v����Q�R��������s�2�A�w�-�:�-rc��	|jd�|j5|j|�cddd�S#1swYyxYw)Nzpeek of closed file)r{rA�_peek_unlockedr�s  rr�zBufferedReader.peekbs<��	�	
���/�0�
�_�_��&�&�t�,�	-�	-�_�_�s	�:�Ac�`�t||j�}t|j�|jz
}||ks|dkrT|j|z
}|j
j
|�}|r(|j|jd|z|_d|_|j|jdSr�)r�r>r3rErFrQr�)rfr��want�have�to_read�currents      rrTzBufferedReader._peek_unlockedms����1�d�&�&�'���4�>�>�"�T�^�^�3���$�;�$�!�)��&�&��-�G��h�h�m�m�G�,�G��!%�������!@�7�!J���!"����~�~�d�n�n�o�.�.rc	�0�	|jd�|dkr|j}|dk(ry|j5|jd�|j	t|t
|j�|jz
��cddd�S#1swYyxYw)Nzread of closed filerrr)	r{r>rArTrHr�r3rErFr�s  rr�zBufferedReader.read1xs���J�	
���/�0��!�8��#�#�D��1�9��
�_�_�����"��&�&��D�#�d�n�n�-����>�?�A�	A�	A�_�_�s�AB�Bc��	|jd�t|t�st|�}|jdk(ry|j	d�}d}|j
5|t
|�kr�tt
|j�|jz
t
|��}|rU|j|j|j|z||||z|xj|z
c_	||z
}|t
|�k(rnlt
|�|z
|jkDr'|jj||d�}|sn0||z
}n|r|s|jd�sn|r|rn|t
|�kr��ddd�|S#1swY|SxYw)Nzreadinto of closed filerr�r)r{r+r�r*r�rAr3r�rErFr>rQr�rT)rfrr��writtenrPr�s      rr�zBufferedReader._readinto�s`��@����3�4�
�#�z�*��S�/�C��:�:��?���h�h�s�m����
�_�_��C��H�$��C����/�$�.�.�@�#�c�(�K������t�~�~�d�n�n�U�6J�K�����
�.��N�N�e�+�N��u�$�G��#�c�(�*���s�8�g�%��(8�(8�8����)�)�#�g�h�-�8�A����q�L�G� �G��.�.�q�1���W��9�C��H�$��>��?�>��s
�DE.�.E8c��ttj|�t|j�z
|j
zd�Sr�)r/r�rrr3rErFrqs rrrzBufferedReader.tell�s3���#�(�(��.��T�^�^�1D�D�t�~�~�U�WX�Y�Yrc�4�|tvrtd��|jd�|j5|dk(r%|t	|j
�|jz
z}tj|||�}|j�|cddd�S#1swYyxYw)N�invalid whence valuezseek of closed filer)
�valid_seek_flagsr4r{rAr3rErFr�rjr?rls   rrjzBufferedReader.seek�s����)�)��3�4�4����/�0�
�_�_���{��s�4�>�>�*�T�^�^�;�;��"�'�'��c�6�:�C�� � �"��	�	�_�_�s�AB�Bryr�r�)r]r^r_r8r�r�r?r�rHr�rTr�r�rrrjr`rrr@r@sG���)<�!�#��-�2.�h	-�	/�A�&.�`Z�	rr@c�L�eZdZ	efd�Zd�Zd�Zdd�Zd�Zd�Z	d�Z
dd	�Zd
�Zy)
r?c���|j�std��tj||�|dkrt	d��||_t
�|_t�|_	y)Nz "raw" argument must be writable.rr=)
r�r<r�r�r4r>r��
_write_bufr@�_write_lockrBs   rr�zBufferedWriter.__init__�sV���|�|�~��<�=�=��!�!�$��,��!���2�3�3�&���#�+����6��rc�6�|jj�Sry)rQr�rqs rr�zBufferedWriter.writable�r�rc�D�t|t�rtd��|j5|jrtd��t
|j�|jkDr|j�t
|j�}|jj|�t
|j�|z
}t
|j�|jkDr	|j�|cddd�S#t$r�}t
|j�|jkDrft
|j�|jz
}||z}|jd|j|_t|j|j|��Yd}~��d}~wwxYw#1swYyxYw)Nr(r')r+r/r1rdr�r4r3rcr>�_flush_unlocked�extend�BlockingIOError�errno�strerror)rfr'�beforer\�e�overages      rr�zBufferedWriter.write�sT���a����>�?�?�
�
�
��{�{� �!7�8�8��4�?�?�#�d�&6�&6�6��$�$�&�����)�F��O�O�"�"�1�%��$�/�/�*�V�3�G��4�?�?�#�d�&6�&6�6�	L��(�(�*��/	�	��'�L��4�?�?�+�d�.>�.>�>�#&�d�o�o�"6��9I�9I�"I���7�*��*.�/�/�:K�4�;K�;K�*L���-�a�g�g�q�z�z�7�K�K�
?��L���
�s7�B4F�C8�-F�8	F�BF�	F�F�F�FNc���|j5|j�|�|jj�}|jj	|�cddd�S#1swYyxYwry)rdrgrQrrrurvs  rruzBufferedWriter.truncate�sN��
�
�
�� � �"��{��h�h�m�m�o���8�8�$�$�S�)�		*�	*�
�
�s�AA�A'c�f�|j5|j�ddd�y#1swYyxYwry)rdrgrqs rr|zBufferedWriter.flushs#��
�
�
�� � �"��
�
�s�'�0c��|jrtd��|jr�	|jj	|j�}|�ttjdd��|t|j�kDs|dkrtd��|jd|�=|jr��yy#t
$rt
d��wxYw)Nr�zHself.raw should implement RawIOBase: it should not raise BlockingIOErrorz)write could not complete without blockingrz*write() returned incorrect number of bytes)r�r4rcrQr�ri�RuntimeErrorrj�EAGAINr3r<�rfr�s  rrgzBufferedWriter._flush_unlockeds����;�;��3�4�4��o�o�
G��H�H�N�N�4�?�?�3���y�%��L�L�?��D�D��3�t���'�'�1�q�5��J�K�K�������#��o�o��#�
G�"�$F�G�G�
G�s�%B-�-Cc�X�tj|�t|j�zSry)r�rrr3rcrqs rrrzBufferedWriter.tells!���$�$�T�*�S����-A�A�Arc��|tvrtd��|j5|j�tj|||�cddd�S#1swYyxYw)Nr_)r`r4rdrgr�rjrls   rrjzBufferedWriter.seeksO���)�)��3�4�4�
�
�
�� � �"�#�(�(��s�F�;�	<�	<�
�
�s�'A�Ac��|j5|j�|jr
	ddd�y	ddd�	|j�|j5|jj	�ddd�y#1swY�JxYw#1swYyxYw#|j5|jj	�ddd�w#1swYwxYwxYwry)rdrQr�r|rCrqs rrCzBufferedWriter.close#s���
�
�
��x�x��4�;�;��	�	�#.��	!��J�J�L��!�!������ �"�!��
��"�!���!�!������ �"�!�!�s:�A:�B�B�:B�B�
C�C�:	C�C�Cryr�)
r]r^r_r8r�r�r�rur|rgrrrjrCr`rrr?r?�s:���)<�	"�#��8*�#�$�"B�<�
!rr?c�p�eZdZ	efd�Zdd�Zd�Zd�Zdd�Zdd�Z	d�Z
d�Zd	�Zd
�Z
d�Zd�Zed
��Zy)�BufferedRWPairc��	|j�std��|j�std��t||�|_t||�|_y)Nz#"reader" argument must be readable.z#"writer" argument must be writable.)r�r<r�r@�readerr?�writer)rfr{r|r>s    rr�zBufferedRWPair.__init__CsQ��	���� ��?�@�@���� ��?�@�@�$�V�[�9���$�V�[�9��rc�@�|�d}|jj|�S�Nr*)r{r�r�s  rr�zBufferedRWPair.readQs!���<��D��{�{����%�%rc�8�|jj|�Sry)r{r�r�s  rr�zBufferedRWPair.readintoVs���{�{�#�#�A�&�&rc�8�|jj|�Sry)r|r�r�s  rr�zBufferedRWPair.writeYs���{�{� � ��#�#rc�8�|jj|�Sry)r{r�r�s  rr�zBufferedRWPair.peek\s���{�{����%�%rc�8�|jj|�Sry)r{r�r�s  rr�zBufferedRWPair.read1_s���{�{� � ��&�&rc�8�|jj|�Sry)r{r�r�s  rr�zBufferedRWPair.readinto1bs���{�{�$�$�Q�'�'rc�6�|jj�Sry)r{r�rqs rr�zBufferedRWPair.readablee����{�{�#�#�%�%rc�6�|jj�Sry)r|r�rqs rr�zBufferedRWPair.writablehr�rc�6�|jj�Sry)r|r|rqs rr|zBufferedRWPair.flushks���{�{� � �"�"rc��	|jj�|jj�y#|jj�wxYwry)r|rCr{rqs rrCzBufferedRWPair.closens8��	 ��K�K�����K�K�����D�K�K����s	�7�Ac�n�|jj�xs|jj�Sry)r{r7r|rqs rr7zBufferedRWPair.isattyts'���{�{�!�!�#�;�t�{�{�'9�'9�';�;rc�.�|jjSry)r|r�rqs rr�zBufferedRWPair.closedw����{�{�!�!�!rNr�r�)r]r^r_r8r�r�r�r�r�r�r�r�r�r|rCr7r�r�r`rrryry3s]��	�4G�:�&�
'�$�&�'�(�&�&�#� �<��"��"rryc�X�eZdZ	efd�Zdd�Zd�Zd
d�Zd
d�Zd�Z	dd�Z
dd	�Zd
�Zd�Z
y)r>c��|j�tj|||�tj|||�yry)r�r@r�r?rBs   rr�zBufferedRandom.__init__�s2����������c�;�7�����c�;�7rc���|tvrtd��|j�|jrQ|j5|j
j
|jt|j�z
d�ddd�|j
j
||�}|j5|j�ddd�|dkrtd��|S#1swY�\xYw#1swY�'xYw)Nr_rrz seek() returned invalid position)r`r4r|rErArQrjrFr3r?r<rls   rrjzBufferedRandom.seek�s����)�)��3�4�4��
�
���>�>�������
�
�d�n�n�s�4�>�>�/B�B�A�F�!��h�h�m�m�C��(��
�_�_�� � �"����7��<�=�=��
�!���
�_�s�=C�)C �C� C)c�n�|jrtj|�Stj|�Sry)rcr?rrr@rqs rrrzBufferedRandom.tell�s+���?�?�!�&�&�t�,�,�!�&�&�t�,�,rNc�R�|�|j�}tj||�Sry)rrr?rurvs  rruzBufferedRandom.truncate�s%���;��)�)�+�C��&�&�t�S�1�1rc�V�|�d}|j�tj||�Sr~)r|r@r�r�s  rr�zBufferedRandom.read�s(���<��D��
�
���"�"�4��.�.rc�N�|j�tj||�Sry)r|r@r�r�s  rr�zBufferedRandom.readinto�s���
�
���&�&�t�Q�/�/rc�N�|j�tj||�Sry)r|r@r�r�s  rr�zBufferedRandom.peek�s���
�
���"�"�4��.�.rc�N�|j�tj||�Sry)r|r@r�r�s  rr�zBufferedRandom.read1�s���
�
���#�#�D�$�/�/rc�N�|j�tj||�Sry)r|r@r�r�s  rr�zBufferedRandom.readinto1�s���
�
���'�'��a�0�0rc� �|jra|j5|jj|jt|j�z
d�|j
�ddd�tj||�S#1swY�xYwr�)	rErArQrjrFr3r?r?r�r�s  rr�zBufferedRandom.write�sb���>�>�������
�
�d�n�n�s�4�>�>�/B�B�A�F��$�$�&�!��#�#�D�!�,�,�!��s�A
B�B
r�ryr�)r]r^r_r8r�rjrrrur�r�r�r�r�r�r`rrr>r>|s>���)<�8�
�"-�2�/�0�/�0�1�-rr>c����eZdZdZdZdZdZdZdZdZ	dd�Z
d�Zd�Zd�Z
d	�Zdd
�Zdd�Zd�Zd
�Zd�Zefd�Zd�Zdd�Z�fd�Zd�Zd�Zd�Zd�Zd�Zed��Zed��Z �xZ!S)r6r*FNTc�^�	|jdk\r3	|jrtj|j�d|_t	|t
�rt
d��t	|t�r|}|dkr
td��d}t	|t�st
d|����t|�td�kstd|����td�|D��dk7s|jd	�dkDrtd
��d|vr0d|_
d|_tjtj z}nnd
|vr
d|_d}n`d|vr)d|_tj tj$z}n3d|vr/d|_d|_tj(tj z}d	|vrd|_d|_|j"r |jrtj*z}n3|j"rtj,z}ntj.z}|t1tdd�z}t1tdd�xst1tdd�}||z}d}	|dkru|std��|�tj2||d�}n4|||�}t	|t�st
d��|dkrt5d��|}|stj6|d�||_tj8|�}		t;j<|	j>�r<tAtBjDtjFtBjD�|��	t1|	dd�|_%|jJdkrtL|_%tNrtO|tjP�||_)|j&r	tjT|dtV�||_y#d|_wxYw#tH$rY��wxYw#t4$r(}
|
jBtBjXk7r�Yd}
~
�Od}
~
wwxYw#|�tj|��xYw)Nrr*z$integer argument expected, got floatznegative file descriptorzinvalid mode: zxrwab+c3�$K�|]}|dv���
y�w)�rwaxNr`)�.0�cs  r�	<genexpr>z"FileIO.__init__.<locals>.<genexpr>�s����)�D�q�q�F�{�D�s�rr%zKMust have exactly one of create/read/write/append mode and at most one plusr!Tr"r#r$�O_BINARY�O_NOINHERIT�	O_CLOEXECz'Cannot use closefd=False with file namei�zexpected integer from openerzNegative file descriptorFr;)-�_fd�_closefdr-rCr+�floatr1r,r4r/r2�sum�count�_created�	_writable�O_EXCL�O_CREAT�	_readable�O_TRUNC�
_appending�O_APPEND�O_RDWR�O_RDONLY�O_WRONLY�getattrrVr<�set_inheritabler9�stat�S_ISDIR�st_mode�IsADirectoryErrorrj�EISDIRrkr=�_blksizer8�_setmoder�rg�lseekr
�ESPIPE)rfrDrBrHr)�fdr�noinherit_flag�owned_fd�fdfstatrms           rr�zFileIO.__init__�s���	��8�8�q�=�
��=�=��H�H�T�X�X�&�����d�E�"��B�C�C��d�C� ��B��A�v� �!;�<�<��B��$��$��$�8�9�9��4�y�C��M�)��4�9�:�:��)�D�)�)�Q�.�$�*�*�S�/�A�2E��9�:�
:��$�;� �D�M�!�D�N��I�I��
�
�*�E�
�D�[�!�D�N��E�
�D�[�!�D�N��J�J����+�E�
�D�[�!�D�N�"�D�O��K�K�"�*�*�,�E��$�;�!�D�N�!�D�N��>�>�d�n�n��R�Y�Y��E�
�^�^��R�[�[� �E��R�[�[� �E�
���Z��+�+��!�"�m�Q�7�6�!�"�k�1�5�	�
������/	��A�v��$�%N�O�O��>�����u�e�4�B���e�,�B�%�b�#�.�'�(F�G�G��A�v�%�&@�A�A���%��&�&�r�5�1�#�D�M��h�h�r�l�G�
��<�<����0�+�E�L�L�,.�K�K����,E�t�M�M�1�$�G�\�1�=�D�M��}�}��!� 3��
����R�[�[�)��D�I������H�H�R��H�-�����I����T"�
��
��&���w�w�%�,�,�.��/����	��#�����"��sb�+O�
BP�$AO�?A P� O�	O�	O�P�O�P�	P�'P
�P�
P�P�P,c��|jdk\rK|jr>|js1ddl}|j	d|��t
d|��|j
�yyyy)Nrzunclosed file r)r�source)r�r�r�rr�ResourceWarningrC)rfrs  rr�zFileIO.__del__HsK���8�8�q�=�T�]�]�4�;�;���M�M��6��%&�t�
�
5��J�J�L�	4?�]�=rc�H�td|jj�d���rrrqs rrzFileIO.__getstate__Orrc	�N�|jj�d|jj��}|jrd|zS	|j}d|�d|�d|j
�d|j�d�	S#t$r*d||j|j
|jfzcYSwxYw)	Nrdz
<%s [closed]>�<z name=z mode=z	 closefd=�>z<%s fd=%d mode=%r closefd=%r>)	rer^r_r�rgrBr�r=r�)rf�
class_namergs   rrzFileIO.__repr__Rs��� $��� 9� 9� $��� ;� ;�=�
��;�;�"�Z�/�/�	B��9�9�D� ��t�y�y�$�-�-�A�
B��	�	F�3�����4�9�9�d�m�m�D�E�
F�	F�s�A1�10B$�#B$c�2�|jstd��y)NzFile not open for reading)r�r\rqs rr�zFileIO._checkReadable`����~�~�&�'B�C�C�rc�2�|jstd��y)NzFile not open for writing)r�r\r�s  rr�zFileIO._checkWritabledr�rc���	|j�|j�|�|dkr|j�S	tj|j
|�S#t$rYywxYwr�)r{r�r�r-r�r�rir�s  rr�zFileIO.readhsd��	�	
���������<�4�!�8��<�<�>�!�	��7�7�4�8�8�T�*�*���	��	�s�A�	A&�%A&c�T�	|j�|j�t}	tj|j
dt�}tj|j
�j}||k\r||z
dz}t�}	t|�|k\rt|�}|t|t�z
}|t|�z
}	tj|j
|�}|s	t|�S||z
}�o#t$rY��wxYw#t$r|rYt|�SYywxYwrp)r{r�r8r-r�r�r	r9�st_sizer<r�r3r/r�rir0)rf�bufsizerm�endrRr�rMs       rr�zFileIO.readallxs&��	�
	
��������%��	��(�(�4�8�8�Q��1�C��(�(�4�8�8�$�,�,�C��c�z���)�a�-�������6�{�g�%��f�+���3�w�(;�<�<���#�f�+�%�A�
�������!�,��
���V�}��
�e�O�F���	�	��	��#�
����V�}���
�s$�AC>�
 D
�>	D
�	D
�
D'�&D'c��	t|�jd�}|jt|��}t|�}||d||Sr�)r�r�r�r3)rfr'�mr�r�s     rr�zFileIO.readinto�sD��+��q�M���s�#���y�y��Q�� ����I����"�1���rc��	|j�|j�	tj|j|�S#t
$rYywxYwry)r{r�r-r�r�rir�s  rr�zFileIO.write�sM��	�	
��������	��8�8�D�H�H�a�(�(���	��	�s�A�	A�Ac��	t|t�rtd��|j�t	j
|j||�S)Nzan integer is required)r+r�r1r{r-r�r�rls   rrjzFileIO.seek�sB��		��c�5�!��4�5�5������x�x����#�v�.�.rc�n�	|j�tj|jdt�Sr�)r{r-r�r�r	rqs rrrzFileIO.tell�s,��	5�	
�����x�x����!�X�.�.rc��	|j�|j�|�|j�}tj|j
|�|Sry)r{r�rrr-�	ftruncater�r�s  rruzFileIO.truncate�sH��	�
	
���������<��9�9�;�D�
���T�X�X�t�$��rc���	|js;	|jrtj|j�t
�|�
�yy#t
�|�
�wxYwry)r�r�r-rCr�r r!s �rrCzFileIO.close�sH���	�
�{�{�
 ��=�=��H�H�T�X�X�&���
����
��
��s�+A�Ac���	|j�|j�$	|j�d|_|jS|jS#t$rd|_Y|jSwxYw)NTF)r{�	_seekablerrr<rqs rr�zFileIO.seekable�si��2������>�>�!�
&��	�	��"&����~�~��t�~�~���	�
'�!&����~�~��	
'�s�A�A,�+A,c�<�	|j�|jSry)r{r�rqs rr�zFileIO.readable�s��5������~�~�rc�<�	|j�|jSry)r{r�rqs rr�zFileIO.writable�s��6������~�~�rc�<�	|j�|jSry)r{r�rqs rr:z
FileIO.fileno�s��A������x�x�rc�b�	|j�tj|j�Sry)r{r-r7r�rqs rr7z
FileIO.isatty�s$��<������y�y����"�"rc��	|jSry)r�rqs rrHzFileIO.closefds��D��}�}�rc��	|jr|jryy|jr|jryy|jr|jryyy)Nzxb+�xbzab+�abzrb+rX�wb)r�r�r�r�rqs rrBzFileIO.modesD��)��=�=��~�~���
�_�_��~�~���
�^�^��~�~���r)r"TNry)"r]r^r_r�r�r�r�r�r�r�r�r�rrr�r�r�r�r�r�rrjrrrurCr�r�r�r:r7r�rHrBr9r:s@rr6r6�s����
�C��H��I��I��J��I��H�w�r�M�B�D�D�� !�F�� (�/� /�� �
��
�
�
#�
�������rr6c�`�eZdZ	d
d�Zd�Zdd�Zd�Zd�Zed��Z	ed��Z
ed	��Zy)�
TextIOBasec�(�	|jd�yr�rkr�s  rr�zTextIOBase.read%s��	�	
���&�!rc�(�	|jd�yr�rk)rf�ss  rr�zTextIOBase.write/s��<����'�"rNc�(�	|jd�yrtrkrvs  rruzTextIOBase.truncate3s��8����*�%rc�(�	|jd�y)Nr�rkrqs rr�zTextIOBase.readline7s��	�	
���*�%rc�(�	|jd�yr�rkrqs rr�zTextIOBase.detach>r�rc��	yryr`rqs rrzTextIOBase.encodingGs��)�rc��	yryr`rqs r�newlineszTextIOBase.newlinesLs��	�rc��	yryr`rqs rrFzTextIOBase.errorsVs��	'�rr�ry)r]r^r_r�r�rur�r�r�rr�rFr`rrr�r�s\���"�#�&�&�$������������rr�c�L�eZdZ	dd�Zdd�Zd�Zd�Zd�ZdZdZ	dZ
ed	��Zy
)
�IncrementalNewlineDecoderc�~�tjj||��||_||_d|_d|_y)N)rFrF)�codecs�IncrementalDecoderr��	translate�decoder�seennl�	pendingcr)rfr�r�rFs    rr�z"IncrementalNewlineDecoder.__init__gs7���!�!�*�*�4��*�?�"�����������rc�8�|j�|}n|jj||��}|jr|s|rd|z}d|_|jd�r|s|dd}d|_|j	d�}|j	d�|z
}|j	d�|z
}|xj
|xr|j|xr|jz|xr|jzzc_|jr(|r|jdd�}|r|jdd�}|S)N��final�
Fr*T�
�
)r��decoder�r�r�r��_LF�_CR�_CRLFr��replace)rf�inputr��output�crlf�cr�lfs       rr�z IncrementalNewlineDecoder.decodens���<�<���F��\�\�(�(��e�(�<�F��>�>�v���F�]�F�"�D�N��?�?�4� ���C�R�[�F�!�D�N��|�|�F�#��
�\�\�$�
�$�
&��
�\�\�$�
�$�
&�������t�x�x�B�O�4�8�8�<��*��
�
�,�	,���>�>�������5�������d�3���
rc��|j�d}d}n|jj�\}}|dz}|jr|dz}||fS)Nrrr)r��getstater�)rfr�flags   rr	z"IncrementalNewlineDecoder.getstate�sO���<�<���C��D����-�-�/�I�C����
���>�>��A�I�D��D�y�rc��|\}}t|dz�|_|j�!|jj||dz	f�yyr�)�boolr�r��setstate)rf�staterr
s    rr
z"IncrementalNewlineDecoder.setstate�sD���	��T��d�Q�h�����<�<�#��L�L�!�!�3���	�"2�3�$rc�n�d|_d|_|j�|jj�yy)NrF)r�r�r��resetrqs rrzIncrementalNewlineDecoder.reset�s/���������<�<�#��L�L��� �$rrr�c� �d|jS)N)Nr�r�)r�r�r�)r�r�)r�r�)r�r�r�)r�rqs rr�z"IncrementalNewlineDecoder.newlines�s�������	rN)�strict)F)
r]r^r_r�r�r	r
rr�rrr�r�r`rrr�r�`sC�����>	�4�!��C�
�C�
�E�
�	��	rr�c�n�eZdZ	dZdZ		d)d�Zd�Z		d)d�Zd�Ze	d��Z
e	d��Ze	d	��Ze	d
��Z
e	d��Zddeddd�d
�Zd�Zd�Zd�Zd�Zd�Ze	d��Ze	d��Zd�Zd�Zd�Zd�Zd�Zd�Zd*d�Zd�Zd�Z d�Z!		d+d�Z"d �Z#d!�Z$d*d"�Z%d#�Z&d,d$�Z'd*d%�Z(d&�Z)d*d'�Z*e	d(��Z+y)-rAiNc�`�|j|�t|�}|dk(r|j�}t|t�std|z��t
j|�jsd}t||z��|�d}n9t|t�std|z��trt
j|�||_d|_
d|_d|_|j j#�x|_|_t)|j d�|_|j-|||||�y)	NrrzG%r is not a text encoding; use codecs.open() to handle arbitrary codecsrr r(rr�)�_check_newliner�_get_locale_encodingr+r/r4r��lookup�_is_text_encoding�LookupError�
_CHECK_ERRORS�lookup_errorr�_decoded_chars�_decoded_chars_used�	_snapshotrUr�r��_tellingr��
_has_read1�
_configure)rfrUrrFrGrS�
write_throughr�s        rr�zTextIOWrapper.__init__�s�����G�$� ��*���x���0�0�2�H��(�C�(��3�h�>�?�?��}�}�X�&�8�8�B�C��c�H�n�-�-��>��F��f�c�*� �!5��!>�?�?���#�#�F�+���� ���#$�� ����)-���)=�)=�)?�?�����!�$�+�+�w�7�������&�'�&�
�	7rc�z�|�'t|t�stdt|�����|dvrt	d|����y)Nzillegal newline type: )Nr(r�r�r�zillegal newline value: )r+r/r1�typer4)rfrGs  rrzTextIOWrapper._check_newline�s?����z�'�3�'?��$�w�-�I�J�J��8�8��G�E�F�F�9rc��||_||_d|_d|_d|_||_|du|_||_|dk7|_|xstj|_||_||_
|jrR|j�rA|j j#�}|dk7r!	|j%�j'd�yyyy#t($rYywxYw)N�r(r)�	_encoding�_errors�_encoder�_decoder�	_b2cratio�_readuniversal�_readtranslate�_readnl�_writetranslater-�linesep�_writenl�_line_buffering�_write_throughr�r�rUrr�_get_encoderr
r)rfrrFrGrSr#�positions       rr"zTextIOWrapper._configure�s���!��������
���
����")�k���%��o������&�"�}����-�2�:�:��
�-���+����>�>�d�m�m�o��{�{�'�'�)�H��1�}���%�%�'�0�0��3��.�>��
#����s�)C�	C�Cc�r�dj|jj|jj�}	|j}|dj|�z
}	|j}|dj|�z
}|dj|j�zS#t
$rY�JwxYw#t
$rY�8wxYw)Nz<{}.{}z name={0!r}z mode={0!r}z encoding={0!r}>)r	rer^r_rgr=rBr)rfrRrgrBs    rrzTextIOWrapper.__repr__!s���������!:�!:�!%���!<�!<�>��	1��9�9�D�
�m�*�*�4�0�0�F�	1��9�9�D�
�m�*�*�4�0�0�F��*�1�1�$�-�-�@�@�@���	��	���	��	�s#�B�B*�	B'�&B'�*	B6�5B6c��|jSry)r(rqs rrzTextIOWrapper.encoding2s���~�~�rc��|jSry)r)rqs rrFzTextIOWrapper.errors6����|�|�rc��|jSry)r3rqs rrSzTextIOWrapper.line_buffering:s���#�#�#rc��|jSry)r4rqs rr#zTextIOWrapper.write_through>s���"�"�"rc��|jSry)rrqs rrUzTextIOWrapper.bufferBr:r)rrFrGrSr#c��	|j�|�
|�|turtd��|�|�
|j}n!d}nt	|t
�st
d|z��|�
|j}n3t	|t
�st
d|z��|dk(r|j�}|tur|j}|j|�|�|j}|�|j}|j�|j|||||�y)NzPIt is not possible to set the encoding or newline of stream after the first readrr rr)r+�Ellipsisr\r)r+r/r1r(rr/rrSr#r|r")rfrrFrGrSr#s      r�reconfigurezTextIOWrapper.reconfigureFs��	�
�M�M�%��)�V�-?��x�/�&�'�(�
(��>�������!���F�C�(��0�6�9�:�:����~�~�H��h��,�� 6�� A�B�B��8�#��4�4�6���h���l�l�G����G�$��!�!�0�0�N�� � �.�.�M��
�
������&�'�&�
�	7rc�H�|jrtd��|jSr�)r�r4r�rqs rr�zTextIOWrapper.seekableqs���;�;��<�=�=��~�~�rc�6�|jj�Sry)rUr�rqs rr�zTextIOWrapper.readablevr�rc�6�|jj�Sry)rUr�rqs rr�zTextIOWrapper.writableyr�rc�Z�|jj�|j|_yry)rUr|r�r rqs rr|zTextIOWrapper.flush|s������������
rc���|j�9|js,	|j�|jj�yyy#|jj�wxYwry)rUr�r|rCrqs rrCzTextIOWrapper.close�sL���;�;�"�4�;�;�
$��
�
�����!�!�#�	,7�"�����!�!�#�r�c�.�|jjSry)rUr�rqs rr�zTextIOWrapper.closed�r�rc�.�|jjSry)rUrgrqs rrgzTextIOWrapper.name�s���{�{���rc�6�|jj�Sry)rUr:rqs rr:zTextIOWrapper.fileno�����{�{�!�!�#�#rc�6�|jj�Sry)rUr7rqs rr7zTextIOWrapper.isatty�rIrc���	|jrtd��t|t�s"t	d|j
jz��t|�}|jxs|jxrd|v}|r7|jr+|jdk7r|jd|j�}|jxs|j�}|j|�}|jj!|�|jr|sd|vr|j#�|j$�|j'd�d|_|j(r|j(j+�|S)Nr'zcan't write %s to text streamr�r�r()r�r4r+r/r1rer]r3r0r3r2rr*r5�encoderUr�r|r�_set_decoded_charsr+r)rfr��length�haslf�encoderr's      rr�zTextIOWrapper.write�s"��&��;�;��3�4�4��!�S�!��;��K�K�0�0�1�2�
2��Q����%�%�=��)=�)=�L�4�1�9���T�)�)�d�m�m�t�.C��	�	�$��
�
�.�A��-�-�6�4�#4�#4�#6���N�N�1��������!�����U�d�a�i��J�J�L��>�>�%��#�#�B�'�!�D�N��=�=��M�M���!��
rc��tj|j�}||j�|_|jSry)r��getincrementalencoderr(r)r*)rf�make_encoders  rr5zTextIOWrapper._get_encoder�s0���3�3�D�N�N�C��$�T�\�\�2��
��}�}�rc��tj|j�}||j�}|jrt||j�}||_|Sry)r��getincrementaldecoderr(r)r-r�r.r+)rf�make_decoderr�s   r�_get_decoderzTextIOWrapper._get_decoder�sK���3�3�D�N�N�C���t�|�|�,�����/���9L�9L�M�G���
��rc�"�	||_d|_yr�)rr)rf�charss  rrMz TextIOWrapper._set_decoded_chars�s��,�#���#$�� rc��	|j}|�|j|d}n|j|||z}|xjt|�z
c_|Sry)rrr3)rfr��offsetrYs    r�_get_decoded_charsz TextIOWrapper._get_decoded_chars�sW��5��)�)���9��'�'���0�E��'�'��v��z�:�E�� � �C��J�.� ��rc�J�	ddl}|j�S#t$rYywxYw)Nrr)r�getencoding�ImportError)rfrs  rrz"TextIOWrapper._get_locale_encoding�s/��	(��
�%�%�'�'��	�	��	�s��	"�"c�d�	|j|krtd��|xj|zc_y)Nz"rewind decoded_chars out of bounds)r�AssertionErrorrts  r�_rewind_decoded_charsz#TextIOWrapper._rewind_decoded_chars�s0��/��#�#�a�'� �!E�F�F�� � �A�%� rc�(�	|j�td��|jr|jj�\}}|jr&|j
j
|j�}n%|j
j|j�}|}|jj||�}|j|�|r't|�t|j�z|_
nd|_
|jr|zf|_|S)Nz
no decoderr')r+r4r r	r!rUr��_CHUNK_SIZEr�r�rMr3rr,r)rf�
dec_buffer�	dec_flags�input_chunk�eof�
decoded_charss      r�_read_chunkzTextIOWrapper._read_chunk�s���	��=�=� ��\�*�*��=�=�%)�M�M�$:�$:�$<�!�J�	�
�?�?��+�+�+�+�D�,<�,<�=�K��+�+�*�*�4�+;�+;�<�K��o���
�
�,�,�[�#�>�
����
�.�� ��-��D�4G�4G�0H�H�D�N� �D�N��=�=�(��k�)A�B�D�N��w�rc�H�||dzz|dzz|dzzt|�dzzS)N�@���)r)rfr6rf�
bytes_to_feed�need_eof�
chars_to_skips      r�_pack_cookiezTextIOWrapper._pack_cookie	s=���I�r�M�*�m�S�.@�A��s�"�$�&*�8�n�c�&9�:�	;rc��t|d�\}}t|d�\}}t|d�\}}t|d�\}}|||t|�|fS)Nl)�divmodr)rf�bigint�restr6rfrprqrrs        r�_unpack_cookiezTextIOWrapper._unpack_cookie	sY�����.���h� ��u�-���i�$�T�5�1���m�"(��u�"5���-���M�4��>�=�P�Prc
�2�|jstd��|jstd��|j	�|j
j
�}|j}|�|j�|jrtd��|S|j\}}|t|�z}|j}|dk(r|j||�S|j�}	t|j |z�}d}|dkDrs|j#d|f�t|j%|d|��}	|	|kr.|j�\}
}|
s|}||	z}n6|t|
�z}d}n
||z}|dz}|dkDr�sd}|j#d|f�||z}|}
|dk(r#|j||
�|j#|�Sd}d}d}t'|t|��D][}|dz
}|t|j%|||dz��z
}|j�\}}|s||kr||z
}||z}|dd}}}
||k\s�[n2|t|j%dd	�
��z
}d	}||krtd��|j||
|||�|j#|�S#|j#|�wxYw)N�!underlying stream is not seekablez(telling position disabled by next() callzpending decoded textrrrrFTr�z'can't reconstruct logical file position)r�r\r r<r|rUrrr+rrrar3rrsr	r,r,r
r��range)rfr6r�rf�
next_inputrr�saved_state�
skip_bytes�	skip_backr�r'�d�	start_pos�start_flags�	bytes_fedrq�
chars_decoded�ires                   rrrzTextIOWrapper.tell	s����~�~�&�'J�K�K��}�}��D�E�E��
�
���;�;�#�#�%���-�-���?�d�n�n�4��"�"�$�%;�<�<��O�!%����	�:��C�
�O�#���0�0�
��A���$�$�X�y�9�9��&�&�(��F	*��T�^�^�m�;�<�J��I��q�.�� � �#�y�!1�2�����z�+�:�'>�?�@���
�%�"�+�+�-�D�A�q��$%�	�%��*�
���#�a�&�(�J� !�I��)�+�J� )�A�
�I�#�q�.�&�
�� � �#�y�!1�2�!�:�-�I�#�K���!��(�(��K�@�@
���[�)�5�I��H��M��:�s�:��7���Q��	���W�^�^�J�q��1��4E�%F�!G�G�
�(/�(8�(8�(:�%�
�I�!�m�}�&D���*�I�!�]�2�M�<E�q�!�M��K� �M�1��8���W�^�^�C�t�^�%D�!E�E�
��� �=�0�!�"K�L�L��$�$��;�	�8�]�L�
���[�)��G���[�)�s!�BJ�/2J�3A5J�)AJ�Jc�|�|j�|�|j�}|jj|�Sry)r|rrrUrurvs  rruzTextIOWrapper.truncatey	s0���
�
���;��)�)�+�C��{�{�#�#�C�(�(rc�z�|j�td��|j�|j}d|_|S)Nzbuffer is already detached)rUr4r|r)rfrUs  rr�zTextIOWrapper.detach	s6���;�;���9�:�:��
�
����������
rc�����fd�}�jrtd���jstd��|tk(r#|dk7rtd��d}�j�}n�|tk(r�|dk7rtd���j��jjd|�}�jd�d�_�jr�jj�||�|S|dk7rtd|�d	���|dkrtd
|�����j��j|�\}}}}}	�jj|��jd�d�_|dk(r'�jr�jj�nY�js|s|	rI�jxs�j��_�jj!d|f�|df�_|	ry�jj#|�}
�j�jj%|
|��||
f�_t'�j(�|	krt+d��|	�_||�|S)
Nc���		�jxs�j�}|dk7r|jd�y|j�y#t$rYywxYwr�)r*r5r
rr)r6rPrfs  �r�_reset_encoderz*TextIOWrapper.seek.<locals>._reset_encoder�	sV���K�	
$��-�-�>�4�+<�+<�+>��
�q�=��$�$�Q�'��M�M�O���
��
�s�A
�
	A�Ar2rzrz#can't do nonzero cur-relative seeksz#can't do nonzero end-relative seeksr(zunsupported whence (�)r.rz#can't restore logical file position)r�r4r�r\r	rrr
r|rUrjrMrr+rrxrWr
r�r�r3rr<r)rf�cookiernr�r6r�rfrprqrrrgs`          rrjzTextIOWrapper.seek�	s-���	$��;�;��2�3�3��~�~�&�'J�K�K��X����{�*�+P�Q�Q��F��Y�Y�[�F�
�x�
���{�*�+P�Q�Q��J�J�L��{�{�'�'��6�2�H��#�#�B�'�!�D�N��}�}��
�
�#�#�%��8�$��O��Q�;��&�B�C�C��A�:��F�D�E�E��
�
��

����'�	E�	�9�m�X�}�	
������#�����#�����Q�;�4�=�=��M�M���!�
�]�]�i�=� �M�M�@�T�->�->�-@�D�M��M�M�"�"�C��#3�4�'��-�D�N���+�+�*�*�=�9�K��#�#��
�
�$�$�[�(�;�
=�'��5�D�N��4�&�&�'�-�7��C�D�D�'4�D�$��v���
rc�b�|j�|�d}n	|j}|�}|jxs|j�}|dkrb|j
�|j|jj�d��z}|j�|jd�d|_
|Sd}|j
|�}t|�|krD|sB|j�}||j
|t|�z
�z
}t|�|kr|s�B|S#t$rt|�d���wxYw)Nr*r�rTr�r(F)r�r�r=r1r+rWr\r�rUr�rrMr3rj)rfr�r�r�rRrhs      rr�zTextIOWrapper.read�	s1�������<��D�
$�!�^�^�
�"�|���-�-�6�4�#4�#4�#6���!�8��-�-�/��n�n�T�[�[�%5�%5�%7�t�n�D�E�F��~�~�)��'�'��+�!%����M��C��,�,�T�2�F��f�+��$�S��*�*�,�,���$�1�1�$��V��2D�E�E���f�+��$�S��M��)"�
?��4�(�*<� =�>�>�
?�s�D�D.c�t�d|_|j�}|sd|_|j|_t�|Sr�)r r�rr�r�r�s  rr�zTextIOWrapper.__next__�	s4����
��}�}����!�D�N� �N�N�D�M����rc�$�|jrtd��|�d}n	|j}|�}|j�}d}|js|j�dx}}	|jr*|jd|�}|dk\r|dz}�n;t|�}n�|jrj|jd|�}|jd|�}|dk(r|dk(rt|�}ni|dz}n�|dk(r|dz}n�||kr|dz}n�||dzk(r|dz}n�|dz}n�|j|j�}|dk\r|t|j�z}n�|dk\rt|�|k\r|}nj|j�r|jrn|j�r�|jr||j�z
}n|jd	�d|_|S��e|dk\r||kDr|}|j#t|�|z
�|d|S#t$rt	|�d���wxYw)
Nr#r*r�rr�rr�rr()r�r4r�r=r1r\r+rWr.r�r3r-r/rjrrMrrb)	rfr�r�r��startrm�endpos�nlpos�crposs	         rr�zTextIOWrapper.readline�	sN���;�;��4�5�5��<��D�
$�!�^�^�
�"�|���&�&�(�����}�}��������f���"�"��i�i��e�,���!�8� �1�W�F����I�E��$�$�
�	�	�$��.���	�	�$��.���B�;���{� #�D�	��"'������b�[�"�Q�Y�F���U�]�"�Q�Y�F���e�a�i�'�"�Q�Y�F��#�Q�Y�F���i�i����-���!�8� �3�t�|�|�#4�4�F���q�y�S��Y�$�.�����"�"�$��&�&���"�"�$��"�"���/�/�1�1���'�'��+�!%�����}�@�1�9��$���F�	
�"�"�3�t�9�v�#5�6��G�V�}���g"�
?��4�(�*<� =�>�>�
?�s�G7�7Hc�J�|jr|jjSdSry)r+r�rqs rr�zTextIOWrapper.newlinesU
s��)-���t�}�}�%�%�@�D�@r)NNNFFry)rrFrr�),r]r^r_rdrr�rr"rr�rrFrSr#rUr?r@r�r�r�r|rCr�rgr:r7r�r5rWrMr\rrbrjrsrxrrrur�rjr�r�r�r�r`rrrArA�s~���,�K��G�
DH�5:�7�BG�>B�7<��HA�"���������$��$��#��#�����"�$��#'�t�)7�V�
&�&�'�$��"��"�� �� �$�$��0�
�%�
�(�&�(�T01�JK�;�Q�a*�F)��I�V�:�[�z�A��ArrAc�T��eZdZ	d�fd�	Zd�Zd�Zed��Zed��Zd�Z	�xZ
S)�StringIOc���tt|�t�dd|��|�d|_|�`t|t�s-tdjt|�j���|j|�|jd�yy)Nr�
surrogatepass)rrFrGFz*initial_value must be str or None, not {0}r)
r r�r�rr0r+r/r1r	r%r]r�rj)rf�
initial_valuerGres   �rr�zStringIO.__init__a
s����
�h��&�w�y�07�.=�/6�	'�	8��?�#(�D� ��$��m�S�1�� L�!'���]�(;�(D�(D�!E�G�G��J�J�}�%��I�I�a�L�%rc�D�|j�|jxs|j�}|j�}|j	�	|j|jj�d��|j|�S#|j|�wxYw)NTr�)	r|r+rWr	rr�rUrr
)rfr��	old_states   rrzStringIO.getvalueq
sx���
�
���-�-�6�4�#4�#4�#6���$�$�&�	��
�
��	(��>�>�$�+�+�"6�"6�"8��>�E����Y�'��G���Y�'�s�*B�Bc�,�tj|�Sry)�objectrrqs rrzStringIO.__repr__{
s�����t�$�$rc��yryr`rqs rrFzStringIO.errors�
���rc��yryr`rqs rrzStringIO.encoding�
r�rc�&�|jd�yr�rkrqs rr�zStringIO.detach�
s�����(�#r)r(r�)r]r^r_r�rrr�rFrr�r9r:s@rr�r�Z
sD����� (�%�
��������$rr�)r)r"r*NNNTN)8r-�abcr�rjr�r�_threadrr@�platform�msvcrtrr��iorrr	r
r`r��addr
�	SEEK_DATAr8rir�dev_moder�rr�staticmethodrVrZ�	open_coder=r\r<r4�ABCMetarb�registerr��_ior6r�r�rr@r?ryr>r�r�r�rAr�r`rr�<module>r�sa���
�
�
���
�)��<�<�&�&�*��H�	�6�6���
�2�{��������&�������&���"��$�C�);�<�R��	�	�@R�@R��(�
��B�=A�,0�K��K�^� (����I�
��2�2��_�s�{�{�_�B	�	�	���6��8#��8#�t�����i� ��	���6��e$�V�e$�N�����>�*�h!�~�h!�VL�n�L�^F�%�F�Pf!�%�f!�RF"�^�F"�RG-�^�^�G-�TT�Y�T�n
>��>�@�
�
���z�"�R�� 9� 9�R�jb
A�J�b
A�J0$�}�0$��YI�(�'�I�(���
�
�w�
�
�
�s$�H�H�H�H�H4�3H4