
Â�Â­Â�Â­Â�Â­Â�Â­Â�Â­Â�Â­Â�Â­Â�Â­Â�Â­Â�Â­Â�Â­Â�Â­Â�Â­Â�Â­Â�Â­Â�Â­Â�Â­Â�Â­
<!DOCTYPE html>
<html>
U
    'â7`Q!  ã                   @   s(  d Z ddlZddlZddlmZmZmZmZmZ ddl	m
Z
 zddlZejZW n ek
rj   d ZZY nX erŠddlmZmZmZmZ nd Z ZZd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G dd„ deƒZG dd„ deƒZG dd„ deƒZG dd„ deeƒ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!G d d!„ d!e ej"ƒZ#G d"d#„ d#e ƒZ$G d$d%„ d%eƒZ%G d&d'„ d'ee&ƒZ'G d(d)„ d)eƒZ(edk	�râej)fZ*e(ej)fZ+ej,fZ-e(ej,fZ.ne/ƒ Z*e(e&fZ+e/ƒ Z-e(fZ.G d*d+„ d+fe.žŽ Z0G d,d-„ d-fe+žŽ Z1dS ).zHTTP related errors.é    N)ÚTYPE_CHECKINGÚAnyÚOptionalÚTupleÚUnioné   )ÚLooseHeaders)ÚClientResponseÚConnectionKeyÚFingerprintÚRequestInfo)ÚClientErrorÚClientConnectionErrorÚClientOSErrorÚClientConnectorErrorÚClientProxyConnectionErrorÚClientSSLErrorÚClientConnectorSSLErrorÚClientConnectorCertificateErrorÚServerConnectionErrorÚServerTimeoutErrorÚServerDisconnectedErrorÚServerFingerprintMismatchÚClientResponseErrorÚClientHttpProxyErrorÚWSServerHandshakeErrorÚContentTypeErrorÚClientPayloadErrorÚ
InvalidURLc                   @   s   e Zd ZdZdS )r   z(Base class for client connection errors.N©Ú__name__Ú
__module__Ú__qualname__Ú__doc__© r$   r$   úL/opt/alt/python38/lib64/python3.8/site-packages/aiohttp/client_exceptions.pyr   ,   s   r   c                	   @   sŽ   e Zd ZdZdddddœeeedf ee ee e	ee
 ddœdd„Ze	d	œd
d„Ze	d	œdd„Zeed	œdd„ƒZejeddœdd„ƒZdS )r   zYConnection error during reading response.

    request_info: instance of RequestInfo
    NÚ )ÚcodeÚstatusÚmessageÚheaders.)Úrequest_infoÚhistoryr'   r(   r)   r*   Úreturnc                C   st   || _ |d k	r.|d k	rtdƒ‚tjdtdd� |d k	r>|| _n|d k	rN|| _nd| _|| _|| _|| _||f| _	d S )NzSBoth code and status arguments are provided; code is deprecated, use status insteadz/code argument is deprecated, use status insteadé   ©Ú
stacklevelr   )
r+   Ú
ValueErrorÚwarningsÚwarnÚDeprecationWarningr(   r)   r*   r,   Úargs)Úselfr+   r,   r'   r(   r)   r*   r$   r$   r%   Ú__init__6   s(    
ÿýzClientResponseError.__init__©r-   c                 C   s   d  | j| j| jj¡S )Nz{}, message={!r}, url={!r})Úformatr(   r)   r+   Zreal_url©r6   r$   r$   r%   Ú__str__W   s
    ýzClientResponseError.__str__c                 C   sr   | j ›d| j›�}| jdkr,|d| j›�7 }| jdkrF|d| j›�7 }| jd k	r`|d| j›�7 }d t| ƒj|¡S )Nz, r   z	, status=r&   z
, message=z
, headers=z{}({}))r+   r,   r(   r)   r*   r9   Útyper    )r6   r5   r$   r$   r%   Ú__repr__^   s    


zClientResponseError.__repr__c                 C   s   t jdtdd� | jS ©Nz/code property is deprecated, use status insteadr.   r/   ©r2   r3   r4   r(   r:   r$   r$   r%   r'   h   s    ýzClientResponseError.code)Úvaluer-   c                 C   s   t jdtdd� || _d S r>   r?   )r6   r@   r$   r$   r%   r'   q   s    ý)r    r!   r"   r#   r   r   r	   r   ÚintÚstrr   r7   r;   r=   Úpropertyr'   Úsetterr$   r$   r$   r%   r   0   s(   
ø
÷!
r   c                   @   s   e Zd ZdZdS )r   zContentType found is not valid.Nr   r$   r$   r$   r%   r   {   s   r   c                   @   s   e Zd ZdZdS )r   z!websocket server handshake error.Nr   r$   r$   r$   r%   r      s   r   c                   @   s   e Zd ZdZdS )r   z¡HTTP proxy error.

    Raised in :class:`aiohttp.connector.TCPConnector` if
    proxy responds with status other than ``200 OK``
    on ``CONNECT`` request.
    Nr   r$   r$   r$   r%   r   ƒ   s   r   c                   @   s   e Zd ZdZdS )ÚTooManyRedirectsz%Client was redirected too many times.Nr   r$   r$   r$   r%   rE   Œ   s   rE   c                   @   s   e Zd ZdZdS )r   z$Base class for client socket errors.Nr   r$   r$   r$   r%   r   �   s   r   c                   @   s   e Zd ZdZdS )r   zOSError error.Nr   r$   r$   r$   r%   r   ”   s   r   c                       s–   e Zd ZdZeeddœ‡ fdd„Zeedœdd„ƒZee	dœd	d
„ƒZ
eee dœdd„ƒZeeededf dœdd„ƒZe	dœdd„ZejZ‡  ZS )r   zŠClient connector error.

    Raised in :class:`aiohttp.connector.TCPConnector` if
        connection to proxy can not be established.
    N)Úconnection_keyÚos_errorr-   c                    s,   || _ || _tƒ  |j|j¡ ||f| _d S ©N)Ú	_conn_keyÚ	_os_errorÚsuperr7   ÚerrnoÚstrerrorr5   )r6   rF   rG   ©Ú	__class__r$   r%   r7   Ÿ   s    zClientConnectorError.__init__r8   c                 C   s   | j S rH   )rJ   r:   r$   r$   r%   rG   ¥   s    zClientConnectorError.os_errorc                 C   s   | j jS rH   ©rI   Úhostr:   r$   r$   r%   rQ   ©   s    zClientConnectorError.hostc                 C   s   | j jS rH   ©rI   Úportr:   r$   r$   r%   rS   ­   s    zClientConnectorError.portr   c                 C   s   | j jS rH   )rI   Ússlr:   r$   r$   r%   rT   ±   s    zClientConnectorError.sslc                 C   s    d  | | jd k	r| jnd| j¡S )Nz6Cannot connect to host {0.host}:{0.port} ssl:{1} [{2}]Údefault)r9   rT   rM   r:   r$   r$   r%   r;   µ   s
      ÿzClientConnectorError.__str__)r    r!   r"   r#   r
   ÚOSErrorr7   rC   rG   rB   rQ   r   rA   rS   r   Ú
SSLContextÚboolrT   r;   ÚBaseExceptionÚ
__reduce__Ú__classcell__r$   r$   rN   r%   r   ˜   s   r   c                   @   s   e Zd ZdZdS )r   zŠProxy connection error.

    Raised in :class:`aiohttp.connector.TCPConnector` if
        connection to proxy can not be established.
    Nr   r$   r$   r$   r%   r   ¾   s   r   c                   @   s   e Zd ZdZdS )r   zServer connection errors.Nr   r$   r$   r$   r%   r   Æ   s   r   c                   @   s&   e Zd ZdZdee ddœdd„ZdS )r   zServer disconnected.N)r)   r-   c                 C   s   |d krd}|f| _ || _d S )NzServer disconnected)r5   r)   )r6   r)   r$   r$   r%   r7   Í   s    z ServerDisconnectedError.__init__)N)r    r!   r"   r#   r   rB   r7   r$   r$   r$   r%   r   Ê   s   r   c                   @   s   e Zd ZdZdS )r   zServer timeout error.Nr   r$   r$   r$   r%   r   Õ   s   r   c                   @   s4   e Zd ZdZeeeeddœdd„Zedœdd„ZdS )	r   z4SSL certificate does not match expected fingerprint.N)ÚexpectedÚgotrQ   rS   r-   c                 C   s*   || _ || _|| _|| _||||f| _d S rH   )r\   r]   rQ   rS   r5   )r6   r\   r]   rQ   rS   r$   r$   r%   r7   Ü   s
    z"ServerFingerprintMismatch.__init__r8   c                 C   s   d  | jj| j| j| j| j¡S )Nz/<{} expected={!r} got={!r} host={!r} port={!r}>)r9   rO   r    r\   r]   rQ   rS   r:   r$   r$   r%   r=   ã   s        ÿz"ServerFingerprintMismatch.__repr__)	r    r!   r"   r#   ÚbytesrB   rA   r7   r=   r$   r$   r$   r%   r   Ù   s   r   c                   @   s   e Zd ZdZdS )r   zResponse payload error.Nr   r$   r$   r$   r%   r   é   s   r   c                       sH   e Zd ZdZeddœ‡ fdd„Zeedœdd„ƒZedœd	d
„Z	‡  Z
S )r   z]Invalid URL.

    URL used for fetching is malformed, e.g. it doesn't contains host
    part.N)Úurlr-   c                    s   t ƒ  |¡ d S rH   )rK   r7   )r6   r_   rN   r$   r%   r7   õ   s    zInvalidURL.__init__r8   c                 C   s
   | j d S )Nr   )r5   r:   r$   r$   r%   r_   ú   s    zInvalidURL.urlc                 C   s   d| j j› d| j› d�S )Nú<ú ú>)rO   r    r_   r:   r$   r$   r%   r=   þ   s    zInvalidURL.__repr__)r    r!   r"   r#   r   r7   rC   r_   rB   r=   r[   r$   r$   rN   r%   r   í   s
   r   c                   @   s   e Zd ZdZdS )r   zBase error for ssl.*Errors.Nr   r$   r$   r$   r%   r     s   r   c                   @   s   e Zd ZdZdS )r   zResponse ssl error.Nr   r$   r$   r$   r%   r     s   r   c                   @   s|   e Zd ZdZeeddœdd„Zeedœdd„ƒZee	dœd	d
„ƒZ
eee dœdd„ƒZeedœdd„ƒZe	dœdd„ZdS )r   zResponse certificate error.N)rF   Úcertificate_errorr-   c                 C   s   || _ || _||f| _d S rH   )rI   Ú_certificate_errorr5   )r6   rF   rc   r$   r$   r%   r7   !  s    z(ClientConnectorCertificateError.__init__r8   c                 C   s   | j S rH   )rd   r:   r$   r$   r%   rc   (  s    z1ClientConnectorCertificateError.certificate_errorc                 C   s   | j jS rH   rP   r:   r$   r$   r%   rQ   ,  s    z$ClientConnectorCertificateError.hostc                 C   s   | j jS rH   rR   r:   r$   r$   r%   rS   0  s    z$ClientConnectorCertificateError.portc                 C   s   | j jS rH   )rI   Zis_sslr:   r$   r$   r%   rT   4  s    z#ClientConnectorCertificateError.sslc                 C   s
   d  | ¡S )Nz{Cannot connect to host {0.host}:{0.port} ssl:{0.ssl} [{0.certificate_error.__class__.__name__}: {0.certificate_error.args}])r9   r:   r$   r$   r%   r;   8  s    þÿz'ClientConnectorCertificateError.__str__)r    r!   r"   r#   r
   Ú	Exceptionr7   rC   rc   rB   rQ   r   rA   rS   rX   rT   r;   r$   r$   r$   r%   r     s    þr   )2r#   Zasyncior2   Útypingr   r   r   r   r   Ztypedefsr   rT   rW   ÚImportErrorZclient_reqrepr	   r
   r   r   Ú__all__re   r   r   r   r   r   rE   r   rV   r   r   r   r   r   ÚTimeoutErrorr   r   r   r1   r   r   ZCertificateErrorZcert_errorsZcert_errors_basesZSSLErrorZ
ssl_errorsZssl_error_basesÚtupler   r   r$   r$   r$   r%   Ú<module>   sZ   
K	&
þþ