https://t.me/RX1948
Server : Apache
System : Linux iad1-shared-b8-43 6.6.49-grsec-jammy+ #10 SMP Thu Sep 12 23:23:08 UTC 2024 x86_64
User : dh_edsupp ( 6597262)
PHP Version : 8.2.26
Disable Function : NONE
Directory :  /lib/python3/dist-packages/future/backports/urllib/__pycache__/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Current File : //lib/python3/dist-packages/future/backports/urllib/__pycache__/response.cpython-310.pyc
o

,�]l�@spdZddlmZmZmZddlmZGdd�de�ZGdd�de�ZGdd	�d	e�Z	Gd
d�de�Z
[[[[dS)
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.
�)�absolute_import�division�unicode_literals)�objectc@s@eZdZdZdd�Zdd�Zdd�Zdd	�Zd
d�Zdd
�Z	dS)�addbasez(Base class for addinfo and addclosehook.cCsX||_|jj|_|jj|_t|jd�r|jj|_t|jd�r%|jj|_dSdd�|_dS)N�	readlines�filenocSsdS�N�r
r
r
�B/usr/lib/python3/dist-packages/future/backports/urllib/response.py�<lambda>sz"addbase.__init__.<locals>.<lambda>)�fp�read�readline�hasattrrr)�selfr
r
r
r�__init__s


zaddbase.__init__cCs
t|j�Sr	)�iterr
�rr
r
r�__iter__s
zaddbase.__iter__cCsd|jjt|�|jfS)Nz<%s at %r whose fp = %r>)�	__class__�__name__�idr
rr
r
r�__repr__%s
�zaddbase.__repr__cCs>|jr|j��d|_d|_d|_d|_d|_d|_d|_dSr	)r
�closerrrrr�__next__rr
r
rr)s

z
addbase.closecCs|jdur	td��|S)NzI/O operation on closed file)r
�
ValueErrorrr
r
r�	__enter__4s
zaddbase.__enter__cCs|��dSr	)r)r�type�value�	tracebackr
r
r�__exit__9szaddbase.__exit__N)
r�
__module__�__qualname__�__doc__rrrrrr!r
r
r
rrs
rc@� eZdZdZdd�Zdd�ZdS)�addclosehookz*Class to add a close hook to an open file.cGst�||�||_||_dSr	)rr�	closehook�hookargs)rr
r'r(r
r
rr?s
zaddclosehook.__init__cCs,|jr|j|j�d|_d|_t�|�dSr	)r'r(rrrr
r
rrDs
zaddclosehook.closeN)rr"r#r$rrr
r
r
rr&<sr&c@r%)�addinfoz.class to add an info() method to an open file.cCst�||�||_dSr	)rr�headers)rr
r*r
r
rrNs
zaddinfo.__init__cC�|jSr	�r*rr
r
r�infoR�zaddinfo.infoN)rr"r#r$rr-r
r
r
rr)Ksr)c@s2eZdZdZddd�Zdd�Zdd�Zd	d
�ZdS)�
addinfourlz9class to add info() and geturl() methods to an open file.NcCs"t�||�||_||_||_dSr	)rrr*�url�code)rr
r*r0r1r
r
rrXs
zaddinfourl.__init__cCr+r	r,rr
r
rr-^r.zaddinfourl.infocCr+r	)r1rr
r
r�getcodear.zaddinfourl.getcodecCr+r	)r0rr
r
r�geturldr.zaddinfourl.geturlr	)rr"r#r$rr-r2r3r
r
r
rr/Us
r/N)r$�
__future__rrr�future.builtinsrrr&r)r/r
r
r
r�<module>s1


https://t.me/RX1948 - 2025