Team Ai
Datasetpublic

codekingpro/portable-devtools

sourceHugging Faceupdated 5mo agoView on Hugging Face
1likes14kdownloads
_util.cpython-313.pyc52 linesDownload Raw Back to __pycache__
1�

2�j�
���SSKJrJrJrJrJrJrJrJr /SQr	"SS\35r"SS\5r"SS\5r
SS	\\S4\S\S\S
\\\445Sjjr\"SSS9r"SS\5rS\\\\\\4S
\4Sjrg)�)�Any�Dict�NoReturn�Pattern�Tuple�Type�TypeVar�Union)�
ProtocolError�LocalProtocolError�RemoteProtocolError�validate�bytesifyc�2�\rSrSrSrS	S\S\SS4SjjrSrg)6r�aException indicating a violation of the HTTP/1.1 protocol.7 8This as an abstract base class, with two concrete base classes:9:exc:`LocalProtocolError`, which indicates that you tried to do something10that HTTP/1.1 says is illegal, and :exc:`RemoteProtocolError`, which11indicates that the remote peer tried to do something that HTTP/1.1 says is12illegal. See :ref:`error-handling` for details.13 14In addition to the normal :exc:`Exception` features, it has one attribute:15 16.. attribute:: error_status_hint17 18   This gives a suggestion as to what status code a server might use if19   this error occurred as part of a request.20 21   For a :exc:`RemoteProtocolError`, this is useful as a suggestion for22   how you might want to respond to a misbehaving peer, if you're23   implementing a server.24 25   For a :exc:`LocalProtocolError`, this can be taken as a suggestion for26   how your peer might have responded to *you* if h11 had allowed you to27   continue.28 29   The default is 400 Bad Request, a generic catch-all for protocol30   violations.31 32�msg�error_status_hint�returnNc�t�[U5[La[S5e[R	X5 X lg)Nz+tried to directly instantiate ProtocolError)�typer�	TypeError�	Exception�__init__r)�selfrrs   �;D:\code\apps\devtools\python\Lib\site-packages\h11/_util.pyr�ProtocolError.__init__)s.����:��&��I�J�J����4�%�!2��)r)i�)	�__name__�33__module__�__qualname__�__firstlineno__�__doc__�str�intr�__static_attributes__�rrrrs&���83�C�3�C�3�$�3�3rrc�"�\rSrSrS\4SjrSrg)r�;rc��[UlUe�N)r
�	__class__�rs r�!_reraise_as_remote_protocol_error�4LocalProtocolError._reraise_as_remote_protocol_error<s��-����34r�r+N)rrr r!rr-r%r&rrrr;s���8�rrc��\rSrSrSrg)r
�Pr&N)rrr r!r%r&rrr
r
Ps��rr
�regex�datar�format_argsrc��URU5nU(d!U(aUR"U6n[U5eUR5$r*)�	fullmatch�formatr�	groupdict)r2r3rr4�matchs     rrrTs>��
�O�O�D�!�E����*�*�k�*�C� ��%�%��?�?��r�_T_Sentinel�Sentinel)�boundc�l^�\rSrSrS\\S\S\\S4S\	\\354S\36S\4U4S	jjrS\4S37jrSr
U=r$)r;�k�cls�name�bases.�	namespace�kwdsrc�R>�U[4:Xde[TU]"XX#40UD6nXUlU$r*)r;�super�__new__r+)r?r@rArBrC�vr+s      �rrF�Sentinel.__new__ls4������#�#�#��G�O�C�u�@�4�@�����rc��UR$r*)rr,s r�__repr__�Sentinel.__repr__xs���}�}�rr&)rrr r!rr:r#rrrrrFrJr%�
__classcell__r/s@rr;r;ksg���38�
�+�
�39��40��T�3�Y��41���S��>�	42�43�44�45�
46��#��r�sc���[U5[LaU$[U[5(aUR	S5n[U[475(a[
S5e[U5$)N�asciiz#expected bytes-like object, not int)r�bytes�48isinstancer#�encoder$r)rMs rrrsP���A�w�%�����!�S���
�H�H�W����!�S����=�>�>���8�OrN)zmalformed data)�typingrrrrrrr	r49�__all__rrrr
rPr#rr:rr;�	bytearray�50memoryviewr$rr&rr�<module>rWs���L�L�L���!3�I�!3�^���*	�-�	�514D���5�>��!&��-0��SV��	�#�u�*���(�m�:�6���t��(��e�Y�52�C��<�=��%�r
codekingpro/portable-devtools · Team Ai