<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <link href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.0-alpha1/dist/css/bootstrap.min.css" rel="stylesheet"
        integrity="sha384-GLhlTQ8iRABdZLl6O3oVMWSktQOp6b7In1Zl3/Jr59b6EGGoI1aFkw7cmDA6j6gD" crossorigin="anonymous">
    <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.3.0/css/all.min.css"
        integrity="sha512-SzlrxWUlpfuzQ+pcUCosxcglQRNAq/DZjVsC0lE40xsADsfeQoEypE+enwcOiGjk/bSuGGKHEyjSoQ1zVisanQ=="
        crossorigin="anonymous" referrerpolicy="no-referrer" />
</head>
</html>
B
    ÍAÒ[l  ã               @   sp   d Z ddlmZmZmZ ddlmZ G dd„ deƒZG dd„ deƒZG dd	„ d	eƒZ	G d
d„ deƒZ
[[[[dS )a  Response 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@   e Zd ZdZdd„ Zdd„ Zdd„ Zdd	„ Zd
d„ Zdd„ Z	dS )Úaddbasez(Base class for addinfo and addclosehook.c             C   sV   || _ | j j| _| j j| _t| j dƒr0| j j| _t| j dƒrH| j j| _n
dd„ | _d S )NÚ	readlinesÚfilenoc               S   s   d S )N© r	   r	   r	   úQ/opt/alt/python37/lib/python3.7/site-packages/future/backports/urllib/response.pyÚ<lambda>   ó    z"addbase.__init__.<locals>.<lambda>)ÚfpÚreadÚreadlineÚhasattrr   r   )Úselfr   r	   r	   r
   Ú__init__   s    


zaddbase.__init__c             C   s
   t | jƒS )N)Úiterr   )r   r	   r	   r
   Ú__iter__   s    zaddbase.__iter__c             C   s   d| j jt| ƒ| jf S )Nz<%s at %r whose fp = %r>)Ú	__class__Ú__name__Úidr   )r   r	   r	   r
   Ú__repr__%   s    zaddbase.__repr__c             C   s>   | j r| j  ¡  d | _ d | _d | _d | _d | _d | _d | _d S )N)r   Úcloser   r   r   r   r   Ú__next__)r   r	   r	   r
   r   )   s    
zaddbase.closec             C   s   | j d krtdƒ‚| S )NzI/O operation on closed file)r   Ú
ValueError)r   r	   r	   r
   Ú	__enter__4   s    
zaddbase.__enter__c             C   s   |   ¡  d S )N)r   )r   ÚtypeÚvalueÚ	tracebackr	   r	   r
   Ú__exit__9   s    zaddbase.__exit__N)
r   Ú
__module__Ú__qualname__Ú__doc__r   r   r   r   r   r    r	   r	   r	   r
   r      s   r   c               @   s    e Zd ZdZdd„ Zdd„ ZdS )Úaddclosehookz*Class to add a close hook to an open file.c             G   s   t  | |¡ || _|| _d S )N)r   r   Ú	closehookÚhookargs)r   r   r%   r&   r	   r	   r
   r   ?   s    zaddclosehook.__init__c             C   s,   | j r| j | jŽ  d | _ d | _t | ¡ d S )N)r%   r&   r   r   )r   r	   r	   r
   r   D   s
    zaddclosehook.closeN)r   r!   r"   r#   r   r   r	   r	   r	   r
   r$   <   s   r$   c               @   s    e Zd ZdZdd„ Zdd„ ZdS )Úaddinfoz.class to add an info() method to an open file.c             C   s   t  | |¡ || _d S )N)r   r   Úheaders)r   r   r(   r	   r	   r
   r   N   s    zaddinfo.__init__c             C   s   | j S )N)r(   )r   r	   r	   r
   ÚinfoR   s    zaddinfo.infoN)r   r!   r"   r#   r   r)   r	   r	   r	   r
   r'   K   s   r'   c               @   s2   e Zd ZdZddd„Zdd„ Zdd„ Zd	d
„ ZdS )Ú
addinfourlz9class to add info() and geturl() methods to an open file.Nc             C   s"   t  | |¡ || _|| _|| _d S )N)r   r   r(   ÚurlÚcode)r   r   r(   r+   r,   r	   r	   r
   r   X   s    zaddinfourl.__init__c             C   s   | j S )N)r(   )r   r	   r	   r
   r)   ^   s    zaddinfourl.infoc             C   s   | j S )N)r,   )r   r	   r	   r
   Úgetcodea   s    zaddinfourl.getcodec             C   s   | j S )N)r+   )r   r	   r	   r
   Úgeturld   s    zaddinfourl.geturl)N)r   r!   r"   r#   r   r)   r-   r.   r	   r	   r	   r
   r*   U   s
   
r*   N)r#   Ú
__future__r   r   r   Zfuture.builtinsr   r   r$   r'   r*   r	   r	   r	   r
   Ú<module>   s   1
