← back to Atmos Game

assets/gen/.venv/lib/python3.12/site-packages/httpx/__pycache__/_exceptions.cpython-312.pyc

154 lines

�

c�bjO!����dZddlmZddlZddlZej
rddlmZmZgd�Z	Gd�de
�ZGd	�d
e�ZGd�de�Z
Gd
�de
�ZGd�de�ZGd�de�ZGd�de�ZGd�de�ZGd�de
�ZGd�de�ZGd�de�ZGd�de�ZGd�d e�ZGd!�d"e
�ZGd#�d$e
�ZGd%�d&e
�ZGd'�d(e�ZGd)�d*e�ZGd+�d,e�ZGd-�d.e�ZGd/�d0e�ZGd1�d2e
�Z Gd3�d4e
�Z!Gd5�d6e"�Z#Gd7�d8e#�Z$Gd9�d:e#�Z%Gd;�d<e#�Z&Gd=�d>e#�Z'ejP	d@			dAd?��Z)y)Bul
Our exception hierarchy:

* HTTPError
  x RequestError
    + TransportError
      - TimeoutException
        · ConnectTimeout
        · ReadTimeout
        · WriteTimeout
        · PoolTimeout
      - NetworkError
        · ConnectError
        · ReadError
        · WriteError
        · CloseError
      - ProtocolError
        · LocalProtocolError
        · RemoteProtocolError
      - ProxyError
      - UnsupportedProtocol
    + DecodingError
    + TooManyRedirects
  x HTTPStatusError
* InvalidURL
* CookieConflict
* StreamError
  x StreamConsumed
  x StreamClosed
  x ResponseNotRead
  x RequestNotRead
�)�annotationsN�)�Request�Response)�
CloseError�ConnectError�ConnectTimeout�CookieConflict�
DecodingError�	HTTPError�HTTPStatusError�
InvalidURL�LocalProtocolError�NetworkError�PoolTimeout�
ProtocolError�
ProxyError�	ReadError�ReadTimeout�RemoteProtocolError�RequestError�RequestNotRead�ResponseNotRead�StreamClosed�StreamConsumed�StreamError�TimeoutException�TooManyRedirects�TransportError�UnsupportedProtocol�
WriteError�WriteTimeoutc�\��eZdZdZd�fd�Zedd��Zejdd��Z�xZS)ra�
    Base class for `RequestError` and `HTTPStatusError`.

    Useful for `try...except` blocks when issuing a request,
    and then calling `.raise_for_status()`.

    For example:

    ```
    try:
        response = httpx.get("https://www.example.com")
        response.raise_for_status()
    except httpx.HTTPError as exc:
        print(f"HTTP Exception for {exc.request.url} - {exc}")
    ```
    c�2��t�|�|�d|_y�N��super�__init__�_request��self�message�	__class__s  ��h/Users/macstudio3/Projects/atmos-game/assets/gen/.venv/lib/python3.12/site-packages/httpx/_exceptions.pyr(zHTTPError.__init__\s���
����!�(,��
�c�H�|j�td��|jS)Nz'The .request property has not been set.)r)�RuntimeError)r+s r.�requestzHTTPError.request`s"���=�=� ��H�I�I��}�}�r/c��||_yr%)r))r+r2s  r.r2zHTTPError.requestfs	����
r/�r,�str�return�None)r6r)r2rr6r7)	�__name__�
__module__�__qualname__�__doc__r(�propertyr2�setter�
__classcell__�r-s@r.rrJs9����"-�����

�^�^� �� r/rc�*��eZdZdZdd�d�fd�Z�xZS)rzS
    Base class for all exceptions that may occur when issuing a `.request()`.
    N)r2c�2��t�|�|�||_yr%r&)r+r,r2r-s   �r.r(zRequestError.__init__ps���
����!� ��
r/)r,r5r2�Request | Noner6r7�r8r9r:r;r(r>r?s@r.rrks����CG� � r/rc��eZdZdZy)rzU
    Base class for all exceptions that occur at the level of the Transport API.
    N�r8r9r:r;�r/r.rr{���r/rc��eZdZdZy)rzM
    The base class for timeout errors.

    An operation has timed out.
    NrErFr/r.rr����r/rc��eZdZdZy)r	z1
    Timed out while connecting to the host.
    NrErFr/r.r	r	�rGr/r	c��eZdZdZy)rz7
    Timed out while receiving data from the host.
    NrErFr/r.rr�rGr/rc��eZdZdZy)r"z3
    Timed out while sending data to the host.
    NrErFr/r.r"r"�rGr/r"c��eZdZdZy)rzB
    Timed out waiting to acquire a connection from the pool.
    NrErFr/r.rr�rGr/rc��eZdZdZy)rzo
    The base class for network-related errors.

    An error occurred while interacting with the network.
    NrErFr/r.rr�rIr/rc��eZdZdZy)rz2
    Failed to receive data from the network.
    NrErFr/r.rr�rGr/rc��eZdZdZy)r!z2
    Failed to send data through the network.
    NrErFr/r.r!r!�rGr/r!c��eZdZdZy)rz+
    Failed to establish a connection.
    NrErFr/r.rr�rGr/rc��eZdZdZy)rz'
    Failed to close a connection.
    NrErFr/r.rr�rGr/rc��eZdZdZy)rzB
    An error occurred while establishing a proxy connection.
    NrErFr/r.rr�rGr/rc��eZdZdZy)r z�
    Attempted to make a request to an unsupported protocol.

    For example issuing a request to `ftp://www.example.com`.
    NrErFr/r.r r �rIr/r c��eZdZdZy)rz$
    The protocol was violated.
    NrErFr/r.rr�rGr/rc��eZdZdZy)rz�
    A protocol was violated by the client.

    For example if the user instantiated a `Request` instance explicitly,
    failed to include the mandatory `Host:` header, and then issued it directly
    using `client.send()`.
    NrErFr/r.rr�s��r/rc��eZdZdZy)rz^
    The protocol was violated by the server.

    For example, returning malformed HTTP.
    NrErFr/r.rr�rIr/rc��eZdZdZy)rzG
    Decoding of the response failed, due to a malformed encoding.
    NrErFr/r.rr�rGr/rc��eZdZdZy)rz
    Too many redirects.
    NrErFr/r.rr�rGr/rc�$��eZdZdZd�fd�Z�xZS)r
z|
    The response had an error HTTP status of 4xx or 5xx.

    May be raised when calling `response.raise_for_status()`
    c�@��t�|�|�||_||_yr%)r'r(r2�response)r+r,r2r\r-s    �r.r(zHTTPStatusError.__init__	s���
����!���� ��
r/)r,r5r2rr\rr6r7rCr?s@r.r
r
s����!�!r/r
c�$��eZdZdZd�fd�Z�xZS)rz7
    URL is improperly formed or cannot be parsed.
    c�$��t�|�|�yr%�r'r(r*s  �r.r(zInvalidURL.__init__����
����!r/r4rCr?s@r.rrs����"�"r/rc�$��eZdZdZd�fd�Z�xZS)r
z�
    Attempted to lookup a cookie by name, but multiple cookies existed.

    Can occur when calling `response.cookies.get(...)`.
    c�$��t�|�|�yr%r_r*s  �r.r(zCookieConflict.__init__r`r/r4rCr?s@r.r
r
s����"�"r/r
c�$��eZdZdZd�fd�Z�xZS)rz�
    The base class for stream exceptions.

    The developer made an error in accessing the request stream in
    an invalid way.
    c�$��t�|�|�yr%r_r*s  �r.r(zStreamError.__init__1r`r/r4rCr?s@r.rr)s����"�"r/rc�$��eZdZdZd�fd�Z�xZS)rz]
    Attempted to read or stream content, but the content has already
    been streamed.
    c�(��d}t�|�|�y)Na]Attempted to read or stream some content, but the content has already been streamed. For requests, this could be due to passing a generator as request content, and then receiving a redirect response or a secondary request as part of an authentication flow.For responses, this could be due to attempting to stream the response content more than once.r_r*s  �r.r(zStreamConsumed.__init__;s���
&�	�	����!r/�r6r7rCr?s@r.rr5s����
	"�	"r/rc�$��eZdZdZd�fd�Z�xZS)rz\
    Attempted to read or stream response content, but the request has been
    closed.
    c�(��d}t�|�|�y)NzDAttempted to read or stream content, but the stream has been closed.r_r*s  �r.r(zStreamClosed.__init__Ms���U�	�	����!r/rgrCr?s@r.rrGs����
"�"r/rc�$��eZdZdZd�fd�Z�xZS)rzY
    Attempted to access streaming response content, without having called `read()`.
    c�(��d}t�|�|�y)NzOAttempted to access streaming response content, without having called `read()`.r_r*s  �r.r(zResponseNotRead.__init__Y����
/�	�	����!r/rgrCr?s@r.rrT�����"�"r/rc�$��eZdZdZd�fd�Z�xZS)rzX
    Attempted to access streaming request content, without having called `read()`.
    c�(��d}t�|�|�y)NzNAttempted to access streaming request content, without having called `read()`.r_r*s  �r.r(zRequestNotRead.__init__frlr/rgrCr?s@r.rrarmr/rc#�NK�	d��y#t$r}|�||_|�d}~wwxYw�w)z�
    A context manager that can be used to attach the given request context
    to any `RequestError` exceptions that are raised within the block.
    N)rr2)r2�excs  r.�request_contextrrns/�����
������!�C�K��	���s�%�	�%�	"��"�%r%)r2rBr6ztyping.Iterator[None])*r;�
__future__r�
contextlib�typing�
TYPE_CHECKING�_modelsrr�__all__�	Exceptionrrrrr	rr"rrrr!rrrr rrrrrr
rr
r1rrrrr�contextmanagerrrrFr/r.�<module>r{s����B#��
�	���*���@ �	� �B
 �9�
 � �\���~���%���"���#���"���>���������<���������.���N������-���L���|��
!�i�
!�"��"�"�Y�"�"	"�,�	"�"�[�"�$
"�;�
"�
"�k�
"�
"�[�
"����"��
�����r/