Team Ai
Datasetpublic

codekingpro/portable-devtools

sourceHugging Faceupdated 5mo agoView on Hugging Face
1likes15kdownloads
_exceptions.cpython-313.pyc157 linesDownload Raw Back to __pycache__
1�

2�jO!����SrSSKJr SSKrSSKr\R3(aSSKJrJr /SQr	"SS\45r"S	S5\5r"SS\5r
"S
S\
5r"SS\5r"SS\5r"SS\5r"SS\5r"SS\
5r"SS\5r"SS\5r"SS\5r"SS \5r"S!S"\
5r"S#S$\
5r"S%S&\
5r"S'S(\5r"S)S*\5r"S+S,\5r"S-S.\5r"S/S0\5r"S1S2\65r "S3S4\75r!"S5S6\"5r#"S7S8\#5r$"S9S:\#5r%"S;S<\#5r&"S=S>\#5r'\RPS@SAS?jj5r)g)Bul8Our exception hierarchy:9 10* HTTPError11  x RequestError12    + TransportError13      - TimeoutException14        · ConnectTimeout15        · ReadTimeout16        · WriteTimeout17        · PoolTimeout18      - NetworkError19        · ConnectError20        · ReadError21        · WriteError22        · CloseError23      - ProtocolError24        · LocalProtocolError25        · RemoteProtocolError26      - ProxyError27      - UnsupportedProtocol28    + DecodingError29    + TooManyRedirects30  x HTTPStatusError31* InvalidURL32* CookieConflict33* StreamError34  x StreamConsumed35  x StreamClosed36  x ResponseNotRead37  x RequestNotRead38�)�annotationsN�)�Request�Response)�39CloseError�ConnectError�ConnectTimeout�CookieConflict�
DecodingError�	HTTPError�HTTPStatusError�40InvalidURL�LocalProtocolError�NetworkError�PoolTimeout�
ProtocolError�41ProxyError�	ReadError�ReadTimeout�RemoteProtocolError�RequestError�RequestNotRead�ResponseNotRead�StreamClosed�StreamConsumed�StreamError�TimeoutException�TooManyRedirects�TransportError�UnsupportedProtocol�42WriteError�WriteTimeoutc�l^�\rSrSrSrSU4Sjjr\SSj5r\RS	Sj5rSr	U=r43$)44r�Jab45Base class for `RequestError` and `HTTPStatusError`.46 47Useful for `try...except` blocks when issuing a request,48and then calling `.raise_for_status()`.49 50For example:51 52```53try:54    response = httpx.get("https://www.example.com")55    response.raise_for_status()56except httpx.HTTPError as exc:57    print(f"HTTP Exception for {exc.request.url} - {exc}")58```59c�2>�[TU]U5 SUlg�N��super�__init__�_request��self�message�	__class__s  ��WD:\code\apps\devtools\python\user_packages\Python313\site-packages\httpx/_exceptions.pyr)�HTTPError.__init__\s���
����!�(,��
�c�J�URc[S5eUR$)Nz'The .request property has not been set.)r*�RuntimeError)r,s r/�request�HTTPError.request`s"���=�=� ��H�I�I��}�}�r1c��Xlgr&�r*)r,r4s  r/r4r5fs���
r1r7�r-�str�return�None)r:r)r4rr:r;)�__name__�60__module__�__qualname__�__firstlineno__�__doc__r)�propertyr4�setter�__static_attributes__�
__classcell__�r.s@r/rrJs9����"-�����61
�^�^� �� r1rc�8^�\rSrSrSrSS.SU4SjjjrSrU=r$)r�kzK62Base class for all exceptions that may occur when issuing a `.request()`.63N)r4c�0>�[TU]U5 X lgr&r')r,r-r4r.s   �r/r)�RequestError.__init__ps���
����!� �
r1r7)r-r9r4�Request | Noner:r;�r<r=r>r?r@r)rCrDrEs@r/rrks����CG� � � r1rc��\rSrSrSrSrg)r�{zM64Base class for all exceptions that occur at the level of the Transport API.65�N�r<r=r>r?r@rCrNr1r/rr{���r1rc��\rSrSrSrSrg)r�zA66The base class for timeout errors.67 68An operation has timed out.69rNNrOrNr1r/rr����r1rc��\rSrSrSrSrg)r	�z)70Timed out while connecting to the host.71rNNrOrNr1r/r	r	�rPr1r	c��\rSrSrSrSrg)r�z/72Timed out while receiving data from the host.73rNNrOrNr1r/rr�rPr1rc��\rSrSrSrSrg)r"�z+74Timed out while sending data to the host.75rNNrOrNr1r/r"r"�rPr1r"c��\rSrSrSrSrg)r�z:76Timed out waiting to acquire a connection from the pool.77rNNrOrNr1r/rr�rPr1rc��\rSrSrSrSrg)r�zc78The base class for network-related errors.79 80An error occurred while interacting with the network.81rNNrOrNr1r/rr�rSr1rc��\rSrSrSrSrg)r�z*82Failed to receive data from the network.83rNNrOrNr1r/rr�rPr1rc��\rSrSrSrSrg)r!�z*84Failed to send data through the network.85rNNrOrNr1r/r!r!�rPr1r!c��\rSrSrSrSrg)r�z#86Failed to establish a connection.87rNNrOrNr1r/rr�rPr1rc��\rSrSrSrSrg)r��z88Failed to close a connection.89rNNrOrNr1r/rr�rPr1rc��\rSrSrSrSrg)r��z:90An error occurred while establishing a proxy connection.91rNNrOrNr1r/rr�rPr1rc��\rSrSrSrSrg)r ��zt92Attempted to make a request to an unsupported protocol.93 94For example issuing a request to `ftp://www.example.com`.95rNNrOrNr1r/r r �rSr1r c��\rSrSrSrSrg)r��z96The protocol was violated.97rNNrOrNr1r/rr�rPr1rc��\rSrSrSrSrg)r��z�98A protocol was violated by the client.99 100For example if the user instantiated a `Request` instance explicitly,101failed to include the mandatory `Host:` header, and then issued it directly102using `client.send()`.103rNNrOrNr1r/rr�s��r1rc��\rSrSrSrSrg)r��zR104The protocol was violated by the server.105 106For example, returning malformed HTTP.107rNNrOrNr1r/rr�rSr1rc��\rSrSrSrSrg)r��z?108Decoding of the response failed, due to a malformed encoding.109rNNrOrNr1r/rr�rPr1rc��\rSrSrSrSrg)r��z110Too many redirects.111rNNrOrNr1r/rr�rPr1rc�0^�\rSrSrSrSU4SjjrSrU=r$)r
izp112The response had an error HTTP status of 4xx or 5xx.113 114May be raised when calling `response.raise_for_status()`115c�<>�[TU]U5 X lX0lgr&)r(r)r4�response)r,r-r4rvr.s    �r/r)�HTTPStatusError.__init__	s���
����!��� �
r1)r4rv)r-r9r4rrvrr:r;rKrEs@r/r
r
s����!�!r1r
c�0^�\rSrSrSrSU4SjjrSrU=r$)riz/116URL is improperly formed or cannot be parsed.117c�$>�[TU]U5 gr&�r(r)r+s  �r/r)�InvalidURL.__init__����
����!r1rNr8rKrEs@r/rrs����"�"r1rc�0^�\rSrSrSrSU4SjjrSrU=r$)r118izz119Attempted to lookup a cookie by name, but multiple cookies existed.120 121Can occur when calling `response.cookies.get(...)`.122c�$>�[TU]U5 gr&rzr+s  �r/r)�CookieConflict.__init__r|r1rNr8rKrEs@r/r123r124s����"�"r1r125c�0^�\rSrSrSrSU4SjjrSrU=r$)ri)zw126The base class for stream exceptions.127 128The developer made an error in accessing the request stream in129an invalid way.130c�$>�[TU]U5 gr&rzr+s  �r/r)�StreamError.__init__1r|r1rNr8rKrEs@r/rr)s����"�"r1rc�0^�\rSrSrSrSU4SjjrSrU=r$)ri5zQ131Attempted to read or stream content, but the content has already132been streamed.133c�(>�Sn[TU]U5 g)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.rzr+s  �r/r)�StreamConsumed.__init__;s���
&�	�	����!r1rN�r:r;rKrEs@r/rr5s����134	"�	"r1rc�0^�\rSrSrSrSU4SjjrSrU=r$)riGzP135Attempted to read or stream response content, but the request has been136closed.137c�(>�Sn[TU]U5 g)NzDAttempted to read or stream content, but the stream has been closed.rzr+s  �r/r)�StreamClosed.__init__Ms���U�	�	����!r1rNr�rKrEs@r/rrGs����138"�"r1rc�0^�\rSrSrSrSU4SjjrSrU=r$)riTzQ139Attempted to access streaming response content, without having called `read()`.140c�(>�Sn[TU]U5 g)NzOAttempted to access streaming response content, without having called `read()`.rzr+s  �r/r)�ResponseNotRead.__init__Y����
/�	�	����!r1rNr�rKrEs@r/rrT�����"�"r1rc�0^�\rSrSrSrSU4SjjrSrU=r$)riazP141Attempted to access streaming request content, without having called `read()`.142c�(>�Sn[TU]U5 g)NzNAttempted to access streaming request content, without having called `read()`.rzr+s  �r/r)�RequestNotRead.__init__fr�r1rNr�rKrEs@r/rrar�r1rc#�P# �Sv� g![anUbXlUeSnAff=f7f)z�143A context manager that can be used to attach the given request context144to any `RequestError` exceptions that are raised within the block.145N)rr4)r4�excs  r/�request_contextr�ns,����
������!�K��	���s�&�	�&�146#��#�&r&)r4rJr:ztyping.Iterator[None])*r@�147__future__r�148contextlib�typing�
TYPE_CHECKING�_modelsrr�__all__�	Exceptionrrrrr	rr"rrrr!rrrr rrrrrr
rr149r3rrrrr�contextmanagerr�rNr1r/�<module>r�s����B#��
�	���*���@ �	� �B
 �9�
 � �\���~���%���"���#���"���>���������<���������.���N������-���L���|��150!�i�151!�"��"�"�Y�"�"	"�,�	"�"�[�"�$152"�;�153"�154"�k�155"�156"�[�157"����"��
�����r1
codekingpro/portable-devtools · Team Ai