Your IP : 3.145.45.223


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

�

�Q�f9	���dZddlZgd�ZGd�dej�ZGd�de�ZGd�d	e�ZGd
�de�Zy)aResponse classes used by urllib.

The base class, addbase, defines a minimal file-like interface,
including read() and readline().  The typical response object is an
addinfourl instance, which defines an info() method that returns
headers and a geturl() method that returns the url.
�N)�addbase�addclosehook�addinfo�
addinfourlc�4��eZdZdZ�fd�Zd�Zd�Zd�Z�xZS)rzOBase class for addinfo and addclosehook. Is a good idea for garbage collection.c�@��tt|�|dd��||_y)Nz<urllib response>F)�delete)�superr�__init__�fp)�selfr�	__class__s  ��6/opt/alt/python312/lib64/python3.12/urllib/response.pyrzaddbase.__init__s!���
�g��&�r�+>�u�&�M����c�h�d|jj�dt|��d|j�d�S)N�<z at z whose fp = �>)r�__name__�id�file�r
s r�__repr__zaddbase.__repr__s(��-1�^�^�-D�-D�-/��X�t�y�y�B�	Brc�H�|jjrtd��|S)NzI/O operation on closed file)r�closed�
ValueErrorrs r�	__enter__zaddbase.__enter__s���7�7�>�>��;�<�<��rc�$�|j�y�N)�close)r
�type�value�	tracebacks    r�__exit__zaddbase.__exit__!s���
�
�r)	r�
__module__�__qualname__�__doc__rrrr#�
__classcell__�rs@rrrs���Y��
B��
rrc�,��eZdZdZ�fd�Z�fd�Z�xZS)rz*Class to add a close hook to an open file.c�H��tt|�|�||_||_yr)r
rr�	closehook�hookargs)r
rr+r,rs    �rrzaddclosehook.__init__(s ���
�l�D�*�2�.�"��� ��
rc���	|j}|j}|rd|_d|_||�tt|��y#tt|��wxYwr)r+r,r
rr)r
r+r,rs   �rrzaddclosehook.close-sN���	.����I��}�}�H��!%��� $��
��8�$��,��+�-��E�,��+�-�s�-A�A)rr$r%r&rrr'r(s@rrr%s���4�!�
	.�	.rrc�(��eZdZdZ�fd�Zd�Z�xZS)rz.class to add an info() method to an open file.c�:��tt|�|�||_yr)r
rr�headers)r
rr0rs   �rrzaddinfo.__init__<s���
�g�t�%�b�)���rc��|jSr)r0rs r�infozaddinfo.info@s���|�|�r)rr$r%r&rr2r'r(s@rrr9s���8��rrc�@��eZdZdZd�fd�	Zed��Zd�Zd�Z�xZ	S)rz9class to add info() and geturl() methods to an open file.c�J��tt|�||�||_||_yr)r
rr�url�code)r
rr0r5r6rs     �rrzaddinfourl.__init__Gs"���
�j�$�(��W�5������	rc��|jSr�r6rs r�statuszaddinfourl.statusLs���y�y�rc��|jSrr8rs r�getcodezaddinfourl.getcodePs���y�y�rc��|jSr)r5rs r�geturlzaddinfourl.geturlSs���x�x�rr)
rr$r%r&r�propertyr9r;r=r'r(s@rrrDs)���C��
�����rr)r&�tempfile�__all__�_TemporaryFileWrapperrrrr�rr�<module>rCsJ����
>���h�,�,��..�7�.�(�g����r

?>