Team Ai
Datasetpublic

codekingpro/portable-devtools

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

2��j����%SrSSKJr SSKrSSKrSSKJrJrJ	r	J3r4Jr SSKJ
r
 SSKJrJrJrJrJrJr SSKJrJrJrJrJr SSKJr SS	KJr SS5KJ r  SSK!J"r"J#r# SS
K$J%r& SSK'J(r( SSK)J*r*J+r+J,r,J-r-J.r.J/r/J0r0J1r1 SSK)J2r3 SSK4J5r5J6r6J7r7 SSK8J9r9J:r:J;r;J<r<J=r=J>r>J?r?J@r@ SSK8J*rA SSK8JrB SSKCJDrD SSKEJFrF SSKGJHrH SSKIJJrJJKrKJLrLJMrMJNrNJOrOJPrPJQrQJRrRJSrS \(aSSKTJUrU SSKVJWrW SSKXJ$rY SSKZJ[r[ SSK4J\r\ \FR�\FR�\FR�\FR�\FR�4rbS\cS'S rdS!\cS"'S#reS!\cS$'S%rfS!\cS&'"S'S(5rg"S)S*5rh"S+S,\h5ri"S-S.\g\h5rj"S/S05rkg)1z`6requests.models7~~~~~~~~~~~~~~~8 9This module contains the primary objects that power Requests.10�)�annotationsN)�Callable�	Generator�Iterable�Iterator�Mapping)�UnsupportedOperation)�
TYPE_CHECKING�Any�Final�Literal�cast�overload)�DecodeError�LocationParseError�
ProtocolError�ReadTimeoutError�SSLError)�RequestField)�encode_multipart_formdata)�	parse_url�)�to_native_string�unicode_is_ascii)�SupportsRead)�
HTTPBasicAuth)�JSONDecodeError�11basestring�builtin_str�chardet�	cookielib�	urlencode�urlsplit�12urlunparse)�json)�_copy_cookie_jar�cookiejar_from_dict�get_cookie_header)�ChunkedEncodingError�ConnectionError�ContentDecodingError�	HTTPError�InvalidJSONError�13InvalidURL�
MissingSchema�StreamConsumedError)r)r)�
default_hooks)�codes)�CaseInsensitiveDict)14�check_header_validity�get_auth_from_url�guess_filename�guess_json_utf�iter_slices�parse_header_links�requote_uri�stream_decode_response_unicode�	super_len�to_key_val_list)�	CookieJar)�Self)�_types)�HTTPAdapter)�RequestsCookieJarzFinal[tuple[int, ...]]�REDIRECT_STATI��int�DEFAULT_REDIRECT_LIMITi(�CONTENT_CHUNK_SIZEi�ITER_CHUNK_SIZEc���\rSrSr%S\S'\S
Sj5r\\SSj55r	\\SSj55r	\\SSj55r	\\SSj55r	\SS	j5r	\SS15j5r16Srg)�RequestEncodingMixin�m�17str | None�urlc�$�/n[[[UR55nURnU(dSnURU5 URnU(a"URS5 URU5 SRU5$)zBuild the path URL to use.�/�?�)r#r�strrM�path�append�query�join)�selfrM�prSrUs     �UD:\code\apps\devtools\python\user_packages\Python313\site-packages\requests/models.py�path_url�RequestEncodingMixin.path_urlpsl�����T�#�t�x�x�(�)���v�v����D��18�19�4��������J�J�s�O��J�J�u���w�w�s�|��c��g�N���datas rY�_encode_params�#RequestEncodingMixin._encode_params�s��*-r\c��gr^r_r`s rYrbrc�s��.1r\c��gr^r_r`s rYrbrc�s��(+r\c��gr^r_r`s rYrbrc�s��47r\c	���[U[[45(aU$[U[5(aU$[	US5(a�/n[U5H�up#[U[5(d[	US5(dU/nUHgnUcMUR[U[5(aURS5OU[U[5(aURS5OU45 Mi M� [USS9$U$)z�Encode parameters in a piece of data.20 21Will successfully encode parameters when passed as a dict or a list of222-tuples. Order is retained if data is a list of 2-tuples but arbitrary23if parameters are supplied as a dict.24�__iter__�utf-8T)�doseq)25�26isinstancerR�bytes�
_SupportsRead�hasattrr=rrT�encoder")ra�result�k�vs�vs     rYrbrc�s����d�S�%�L�)�)��K�
��m�
,�
,��K�
�T�:�
&�
&�02�F�(��.����b�*�-�-�W�R��5L�5L���B��A��}��
�
�5?��3�5G�5G����� 1�Q�5?��3�5G�5G����� 1�Q����/��V�4�0�0��Kr\c	�.�U(d[S5e[U[5(a[S5e/n[U=(d 05n[U=(d 05nUH�upE[U[5(d[	US5(dU/nUH�nUcM[U[275(d[
U5nUR[U[285(aURS5OU[U[5(aURS5OU45 M� M� UH�upvSnSn	[U[[45(a/[U5S:XaUup�O1[U5S:XaUup�nOUup�p�O[U5=(d Un29Un[U[[30[45(aUnO-[U[5(aUR!5nOUcM�Un[#X|X�S9n
U
R%US	9 URU
5 M� ['U5up�X�4$)31auBuild the body for a multipart/form-data request.32 33Will successfully encode files when passed as a dict or a list of34tuples. Order is retained if data is a list of tuples but arbitrary35if parameters are supplied as a dict.36The tuples may be 2-tuples (filename, fileobj), 3-tuples (filename, fileobj, contentype)37or 4-tuples (filename, fileobj, contentype, custom_headers).38zFiles must be provided.zData must not be a string.rhNri��)�namera�filename�headers)�content_type)�39ValueErrorrkrr=rnrlrRrT�decodero�tuple�list�lenr6�	bytearrayrm�readr�make_multipartr)�filesra�40new_fields�fields�field�valrsrq�ft�fh�fn�fp�fdata�rf�bodyrzs                rY�
_encode_files�"RequestEncodingMixin._encode_files�s�����6�7�7�
��j�
)�
)��9�:�:�=?�41� ����,������,�� �J�E��#�z�*�*�'�#�z�2J�2J��e�����=�%�a��/�/���F���%�%� *�%��7�7�"�L�L��1�!&�1;�A�s�1C�1C�A�H�H�W�-��	��
�!�$�D�A��B��B��!�e�T�]�+�+��q�6�Q�;��F�B����V�q�[�!"�J�B�B�%&�N�B�B��#�A�&�+�!�����"�s�E�9�5�6�6����B�
�.�.����	��������1�2�J�B����2��.����b�!�5�87�z�B����!�!r\r_N��returnrR)rarRr�rR)rarlr�rl)ra�_t.SupportsRead[str | bytes]r�r�)raz
_t.KVDataTyper�rR)raz_t.EncodableDataTyper�z*str | bytes | _t.SupportsRead[str | bytes])r��_t.FilesTypera�_t.RawDataType | Noner�ztuple[bytes, str])�__name__�42__module__�__qualname__�__firstlineno__�__annotations__�propertyrZr�staticmethodrbr��__static_attributes__r_r\rYrJrJms���	�O�
����(��-���-�
��1���1�
��+�*�+�	%�+���+���7���7���"��	3����>�D"��D"�#8�D"�	�D"��D"r\rJc�@�\rSrSr%S\S'SSjrS	SjrSrg)43�RequestHooksMixin���dict[str, list[_t.HookType]]�hooksc��XR;a[SUS35e[U[5(aURUR	U5 g[US5(a&URUR
SU55 gg)zProperly register a hook.z.Unsupported event specified, with event name "�"rhc3�T# �UHn[U[5(dMUv� M  g7fr^)rkr)�.0�hs  rY�	<genexpr>�2RequestHooksMixin.register_hook.<locals>.<genexpr>
s���$P��1�44�1�h�8O�Q�Q��s�(�	(N)r�r{rkrrTrn�extend�rW�event�hooks   rY�
register_hook�RequestHooksMixin.register_hooksw��45�46�47�"��M�e�W�TU�V�W�W��d�H�%�%��J�J�u��$�$�T�*�
�T�:�
&�
&��J�J�u��$�$�$P��$P�P�'r\c�b�URURU5 g![a gf=f)zYDeregister a previously registered hook.48Returns True if the hook existed, False if not.49TF)r��remover{r�s   rY�deregister_hook�!RequestHooksMixin.deregister_hooks3��50	��J�J�u��$�$�T�*����	��	�s�!�51.�.r_N)r�rRr�z#Iterable[_t.HookType] | _t.HookTyper��None)r�rRr�z_t.HookTyper��bool)r�r�r�r�r�r�r�r�r_r\rYr�r��s.��'�'�Q��Q� C�Q�	
�Q�	r\r�c���\rSrSr%SrS\S'S\S'S\S'S	\S52'S\S'S
\S'S\S'S\S'S\S'SSSjjrSSjrSSjrSr	g)�Requestia'A user-created :class:`Request <Request>` object.53 54Used to prepare a :class:`PreparedRequest <PreparedRequest>`, which is sent to the server.55 56:param method: HTTP method to use.57:param url: URL to send.58:param headers: dictionary of headers to send.59:param files: dictionary of {filename: fileobject} files to multipart upload.60:param data: the body to attach to the request. If a dictionary or61    list of tuples ``[(key, value)]`` is provided, form-encoding will62    take place.63:param json: json for the body to attach to the request (if files or data is not specified).64:param params: URL parameters to append to the URL. If a dictionary or65    list of tuples ``[(key, value)]`` is provided, form-encoding will66    take place.67:param auth: Auth handler or (user, pass) tuple.68:param cookies: dictionary or CookieJar of cookies to attach to this request.69:param hooks: dictionary of callback hooks, for internal usage.70 71Usage::72 73  >>> import requests74  >>> req = requests.Request('GET', 'https://httpbin.org/get')75  >>> req.prepare()76  <PreparedRequest [GET]>77rL�method�_t.UriType | NonerMz;CaseInsensitiveDict[str] | Mapping[str, str | bytes] | Noneryr�r��_t.DataTypera�_t.JsonTyper%�
_t.ParamsType�params�_t.AuthType�auth�5RequestsCookieJar | CookieJar | dict[str, str] | None�cookiesNc�6�Uc/OUnUc/OUnUc0OUnUc0OUnU	c0OU	n	[5Ul[U	R55Hup�UR	X�S9 M XlX lX0lX@lXPl	X�l78X`lXplX�l
g)N)r�r�)r1r�r~�itemsr�r�rMryr�rar%r�r�r�)
rWr�rMryr�rar�r�r�r�r%rqrss
             rY�__init__�Request.__init__As����\�r�t���m������"�W���~��6���m����"�_��79������'�D�A����Q��/�(��������80��	��	����	��r\c�"�SURS3$)Nz81<Request [�]>�r��rWs rY�__repr__�Request.__repr__cs���D�K�K�=��+�+r\c
��[5nURURURURUR82URURURURURURS983 U$)zXConstructs a :class:`PreparedRequest <PreparedRequest>` for transmission and returns it.)84r�rMryr�rar%r�r�r�r�)�PreparedRequest�preparer�rMryr�rar%r�r�r�r��rWrXs  rYr��Request.preparefsh�����	�	�	��;�;�����L�L��*�*��������;�;�����L�L��*�*�	�	85��r\)86r�r�rar�ryr�r%r�r�rM�87NNNNNNNNNN�r�rLrMr�ry� Mapping[str, str | bytes] | Noner�r�rar�r�r�r�r�r�r�r��_t.HooksInputType | Noner%r�r�r�r��r�r�)88r�r�r�r��__doc__r�r�r�r�r�r_r\rYr�r�s����6
��	��
H�H���89��90����91��
B�B�"�!%�48�"� � $� �IM�*.� � �� �� �2�	 �92� ��
 �� �� �G� �(� �� �93� �D,�r\r�c�f�\rSrSr%SrS\S'S\S'S\S'S\S	'S94\S'S\S
'S\S'SSjrS S!SjjrS"SjrS#Sjr	S$Sjr95\S%Sj5rS&Sjr
S'SjrS(S)SjjrS*SjrS+S,SjjrS-SjrS.SjrSrg)/r�ixa�The fully mutable :class:`PreparedRequest <PreparedRequest>` object,96containing the exact bytes that will be sent to the server.97 98Instances are generated from a :class:`Request <Request>` object, and99should not be instantiated manually; doing so may produce undesirable100effects.101 102Usage::103 104  >>> import requests105  >>> req = requests.Request('GET', 'https://httpbin.org/get')106  >>> r = req.prepare()107  >>> r108  <PreparedRequest [GET]>109 110  >>> s = requests.Session()111  >>> s.send(r)112  <Response [200]>113rLr�rMz CaseInsensitiveDict[str | bytes]ryz$RequestsCookieJar | CookieJar | None�_cookies�_t.BodyTyper�r�r�zint | object | None�_body_positionc�v�SUlSUlSUlSUlSUl[5UlSUlgr^)r�rMryr�r�r1r�r�r�s rYr��PreparedRequest.__init__�s8�������������
���	�"�_��114�"��r\Nc��[SU5nURU5 URX&5 URU5 UR	U5 URXTU1155 UR
Xr5 URU	5 g)z6Prepares the entire request with the given parameters.�116_t.UriTypeN)r�prepare_method�prepare_url�prepare_headers�prepare_cookies�prepare_body�prepare_auth�
prepare_hooks)rWr�rMryr�rar�r�r�r�r%s           rYr��PreparedRequest.prepare�sv���<��%�����F�#�����%����W�%����W�%����$�t�,����$�$�	
���5�!r\c�"�SURS3$)Nz<PreparedRequest [r�r�r�s rYr��PreparedRequest.__repr__�s��#�D�K�K�=��3�3r\c�T�[5nURUlURUlURbURR	5OSUl[UR5UlURUlURUlURUl	U$r^)117r�r�rMry�copyr&r�r�r�r�r�s  rYr��PreparedRequest.copy�sx������;�;��������+/�<�<�+C�D�L�L�%�%�'���	�%�d�m�m�4��118�������*�*����.�.����r\c�|�XlURb)[URR55Ulgg)zPrepares the given HTTP method.N)r�r�upper)rWr�s  rYr��PreparedRequest.prepare_method�s/�����;�;�"�*�4�;�;�+<�+<�+>�?�D�K�#r\c��SSKnURUSS9RS5nU$!URa [ef=f)NrT)�uts46ri)�idnaror|�	IDNAError�UnicodeError)�hostr�s  rY�_get_idna_encoded_host�&PreparedRequest._get_idna_encoded_host�sI���	��;�;�t�4�;�0�7�7��@�D�����~�~�	���	�s�'�>c119��[U[5(aURS5nO[U5nUR	5nSU;a+UR5R
S5(dXlg[U5up4pVpxn	U(d[SU<SUS35eU(d[SU<S35e[U5(dURU5nO!UR
S1205(a[S	5eU=(d SnU(aUS-
nX�-
nU(aUSU3-
nU(dS
n[U[[45(a[!U5nUbUR#U5nOSnU(aU(aUSU3nOUn[%['X;USX�455nXlg![an121[U122R6eSn123A124ff=f![a [S	5ef=f)zPrepares the given HTTP URL.�utf8�:�httpNzInvalid URL z0: No scheme supplied. Perhaps you meant https://rPz: No host suppliedzURL has an invalid label.)�*�.rQ�@rO�&)rkrlr|rR�lstrip�lower�125startswithrMrrr.�argsr/rr�r�rrbr:r$)
rWrMr��schemer�r��portrSrU�fragment�e�netloc�126enc_paramss
             rYr��PreparedRequest.prepare_url�s����c�5�!�!��*�*�V�$�C��c�(�C��j�j�l��127�#�:�c�i�i�k�4�4�V�<�<��H��	&�>G��n�;�F�$�d�8����s�g�&-�-0�E��4��
�128��|�C�7�2D�E�F�F� ��%�%�
>��2�2�4�8���_�_�Z�
(�
(��8�9�9�������c�M�F�������$��j� �F���D��f�s�E�l�+�+�%�f�-�F����,�,�V�4�J��J��� �'��:�,�/��"���*�f�d�B��%P�Q�R�����g"�	&��a�f�f�%�%��	&��& �
>� �!<�=�=�
>�s$�5F!�G�!129G�+F=�=G�Gc��[5UlU(a>UR5H)n[U5 Uup4X@R[	U5'M+ gg)z Prepares the given HTTP headers.N)r3ryr�r4r)rWry�headerrw�values     rYr��PreparedRequest.prepare_headers3sG��+�,����!�-�-�/��%�f�-�$���7<���-�d�3�4�	*�r\c��SnSnU(dAUb>Sn[R"USS9n[	U[1305(dUR
S5n[	U[5(a�[	U[[131[[[45(dt[U5nUn[!USS5bUR#5UlU(a[+S5eU(a[-U5UR.S	'O�S132UR.S'O�[1SU5nU(aUR3X(5upEOGU(a@UR5U5n[	U[65(d[	U[85(aSnOS
nUR;U5 U(aSUR.;aXPR.S'X@lg![an[X`S9eSnAff=f![[[4a SnGNHf=f![&a [)5UlGNBf=f)z"Prepares the given HTTP body data.Nzapplication/jsonF)�	allow_nan)�requestri�tellz1Streamed bodies and files are mutually exclusive.�Content-Length�chunkedzTransfer-Encodingr�z!application/x-www-form-urlencodedzcontent-typezContent-Type)�complexjson�dumpsr{r-rkrlrorrRr~r}rr<�	TypeError�AttributeErrorr	�getattrrr��OSError�object�NotImplementedErrorrryrr�rbrrm�prepare_content_lengthr�)	rWrar�r%r�rz�ve�length�raw_datas	         rYr��PreparedRequest.prepare_body>s���������(�.�L�
9�"�(�(���?���d�E�*�*��{�{�7�+���d�H�%�%�j��3��t�U�G�4�/133�/134�
�"�4����D��t�V�T�*�6�3�*.�)�)�+�D�'��)�G����1<�V�1D����-�.�4=����0�1��3�T�:�H��'+�'9�'9�%�'J�$��|���.�.�x�8�D�!�$�135�3�3�z�$�
�7V�7V�'+��'J���'�'��-���t�|�|�!C�/;���^�,��	��s�
9�&�r�8�8��
9���~�/C�D�
���
���3�+1�(�D�'�3�s;�F+�
G�)G$�+136G�5	F>�>G�G!� G!�$H�Hc���Ub,[U5nU(a[U5URS'ggURS;a-URR	S5cSURS'ggg)z>Prepare Content-Length header based on request method and bodyNr)�GET�HEAD�0)r<rryr��get)rWr�rs   rYr�&PreparedRequest.prepare_content_length�sn�����t�_�F��2=�V�1D����-�.��137
�K�K��.���� � �!1�2�:�.1�D�L�L�)�*�	;�
/r\c��Uc7[[[UR55n[	U5(aUOSnU(a�[U[5(a[U5S:Xa	[U6nO[SU5nU"U5nURRUR5 URUR5 gg)z"Prepares the given HTTP auth data.NruzCallable[..., PreparedRequest])
r5rrRrM�anyrkr}rr�__dict__�updaterr�)rWr�rM�url_auth�auth_handler�rs      rYr��PreparedRequest.prepare_auth�s����<�(��c�4�8�8�)<�=�H�"�8�}�}�8�$�D���$��&�&�3�t�9��>�,�d�3�� $�$D�d�K���T�"�A�
�M�M� � ����,�
�'�'��	�	�2�r\c���[U[R5(aXlO[	U5Ul[SUR5n[
X 5nUbX0RS'gg)a�Prepares the given HTTP cookie data.138 139This function eventually generates a ``Cookie`` header from the140given cookies using cookielib. Due to cookielib's design, the header141will not be regenerated if it already exists, meaning this function142can only be called once for the life of the143:class:`PreparedRequest <PreparedRequest>` object. Any subsequent calls144to ``prepare_cookies`` will have no actual effect, unless the "Cookie"145header is removed beforehand.146r>N�Cookie)rkr!r>r�r'rr(ry)rWr��cookies_jar�
cookie_headers    rYr��PreparedRequest.prepare_cookies�sY���g�y�2�2�3�3�#�M�/��8�D�M��;��
�
�6��)�+�<�
��$�%2�L�L��"�%r\c�T�U=(d 0nUHnURX!U5 M g)zPrepares the given hooks.N)r�)rWr�r�s   rYr��PreparedRequest.prepare_hooks�s)��147�����E����u�E�l�3�r\)r�r�r�ryr�r�rM�r�r�r�r�r�r�)r�rLr�r�)r�rRr�rR)rMr�r�r�r�r�)ryr�r�r�r^)rar�r�r�r%r�r�r�)r�r�r�r�)rQ)r�r�rMr�r�r�)r�r�r�r�)r�r�r�r�)r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�rr�r�r�r�r_r\rYr�r�xs����(
��	�O�
-�-�2�2�148��'�'�'�'�#�&"�!%�48�"� � $� �IM�*.� �"��"��"�2�	"�149�"��
"��"��"�G�"�(�"��"�150�"�:4�	�@�����P�
�P��P�151�	P�d	=�KO�L��L�(4�L�<G�L�	
�L�\1�&�3��3��3�152�	3�:3�L�3�	
�3�.4r\r�c��\rSrSr%SrS\S'S\S'S\S'S	\S153'S\S'S
\S'S\S'S\S'S\S'S\S'S\S'S\S'S\S'S\S'/SQrS\S 'S?S!jrS@S"jrSAS#jr	SBS$jr154SCS%jrSDS&jrSES'jr
SES(jrSFS)jr\SES*j5r\SES+j5r\SES,j5r\SGS-j5r\SHS.j5r\SISJS0jj5r\SKSLS1jj5rSISMS2jjr\\S/S34SNS4jj5r\\4S3S5.SOS6jjj5r\S/S34SPS7jjr\SQS8j5r\SDS9j5rSRS:jr\SSS;j5rS?S<jrS?S=jrS>r g3)T�Responsei�z`The :class:`Response <Response>` object, which contains a155server's response to an HTTP request.156zbytes | Literal[False] | None�_contentr��_content_consumed�PreparedRequest | None�_nextrE�status_codezCaseInsensitiveDict[str]ryr�rawrRrMrL�encodingzlist[Response]�history�reasonrBr�zdatetime.timedelta�elapsedr�rrA�157connection)158r9r=ryrMr@r?rAr�rBrz	list[str]�	__attrs__c��SUlSUlSUlSUl[	5UlSUlSUlSUl/Ul	SUl159[05Ul[R"S5UlSUlg)NFr)r9r:r<r=r3ryr>rMr?r@rAr'r��datetime�	timedeltarBrr�s rYr��Response.__init__�s�����
�!&�����160� ���161+�,���162��������
�163������+�2�.��� �)�)�!�,�����r\c��U$r^r_r�s rY�	__enter__�Response.__enter__*s���r\c�$�UR5 gr^)�close)rWrs  rY�__exit__�Response.__exit__-s���164�165�r\c	��UR(dUR URVs0sHo[XS5_M sn$s snfr^)r:�contentrDr)rW�attrs  rY�__getstate__�Response.__getstate__0s:���%�%��L�L�<@�N�N�K�N�D�g�d�$�/�/�N�K�K��Ks�Ac��UR5Hup#[XU5 M [USS5 [USS5 g)Nr:Tr>)r��setattr)rW�staterwrs    rY�__setstate__�Response.__setstate__8s9�� �;�;�=�K�D��D��&�)�	��)�4�0���e�T�"r\c�"�SURS3$)Nz<Response [r�)r=r�s rYr��Response.__repr__@s���T�-�-�.�b�1�1r\c��UR$�aCReturns True if :attr:`status_code` is less than 400.166 167This attribute checks if the status code of the response is between168400 and 600 to see if there was a client error or a server error. If169the status code, is between 200 and 400, this will return True. This170is **not** a check to see if the response code is ``200 OK``.171��okr�s rY�__bool__�Response.__bool__C�
���w�w�r\c��UR$r]r^r�s rY�__nonzero__�Response.__nonzero__Mrbr\c�$�URS5$)z,Allows you to use a response as an iterator.�)�iter_contentr�s rYrh�Response.__iter__Ws��� � ��%�%r\c�F�UR5 g![a gf=f)aPReturns True if :attr:`status_code` is less than 400, False if not.172 173This attribute checks if the status code of the response is between174400 and 600 to see if there was a client error or a server error. If175the status code is between 200 and 400, this will return True. This176is **not** a check to see if the response code is ``200 OK``.177FT)�raise_for_statusr,r�s rYr_�Response.ok[s,��	��!�!�#����	��	�s��178 � c�T�SUR;=(a UR[;$)z�True if this Response is a well-formed HTTP redirect that could have179been processed automatically (by :meth:`Session.resolve_redirects`).180�location)ryr=rCr�s rY�is_redirect�Response.is_redirectjs#��181�T�\�\�)�P�d�.>�.>�.�.P�Pr\c��SUR;=(a- UR[R[R4;$)z@True if this Response one of the permanent versions of redirect.rn)ryr=r2�moved_permanently�permanent_redirectr�s rY�is_permanent_redirect�Response.is_permanent_redirectqs?���T�\�\�)�182�d�.>�.>��#�#��$�$�C183�/184�	185r\c��UR$)zTReturns a PreparedRequest for the next request in a redirect chain, if there is one.)r<r�s rY�next�
Response.nextys���z�z�r\c�X�[b#[R"UR5S$g)zOThe apparent encoding, provided by the charset_normalizer or chardet libraries.r?ri)r �detectrQr�s rY�apparent_encoding�Response.apparent_encoding~s'�����>�>�$�,�,�/�186�;�;�r\Fc��gr^r_�rW�187chunk_size�decode_unicodes   rYrh�Response.iter_content�s��r\c��gr^r_r~s   rYrhr��s��!$r\c�^^�SUU4SjjnTR(a)[TR[5(a188[	5eTb-[T[1895(d[
S[T5S35eTR(a'[[TR5n[UT5nOU"5nU(a[UT5nU$)aIterates over the response data.  When stream=True is set on the190request, this avoids reading the content at once into memory for191large responses.  The chunk size is the number of bytes it should192read into memory.  This is not necessarily the length of each item193returned as decoding can take place.194 195chunk_size must be of type int or None. A value of None will196function differently depending on the value of `stream`.197stream=True will read data as it arrives in whatever size the198chunks are received. If stream=False, data is returned as199a single chunk.200 201If decode_unicode is True, content will be decoded using encoding202information from the response. If no encoding information is available,203bytes will be returned. This can be bypassed by manually setting204`encoding` on the response.205c3�># �[TRS5(a$TRRTSS9Shv�N O*TRRT5nU(dOUv� M)STlgN7![an[	U5eSnAf[206an[
U5eSnAf[an[U5eSnAf[an[U5eSnAff=f7f)N�streamT)�decode_content)
rnr>r�rr)rr+rr*r�RequestsSSLErrorr�r:)r�chunkrrWs  ��rY�generate�'Response.iter_content.<locals>.generate�s������t�x�x��*�*�	.�#�x�x���z�$��O�O�O�� �H�H�M�M�*�5�E� ���K�	�&*�D�"�#P��$�2�.�q�1�1��"�2�.�q�1�1��'�-�)�!�,�,���.�*�1�-�-��.�s\�C�A7�A5�A7�3C�5A7�7207C�B�
C�B$�$
C�1B<�<
C�	C�C�Cz+chunk_size must be an int, it is instead a r�)r�zGenerator[bytes, None, None])r:rkr9r�r0rEr�typerrlr8r;)rWrr�r�rQ�chunkss``    rYrhr��s����*	*�	*�.�!�!�j�����&E�&E�%�'�'�
�
#�J�z�3�,G�,G��=�d�:�>N�=O�q�Q��
��!�!��5�$�-�-�0�G� ��*�5�F��Z�F��3�F�D�A�F��
r\Nc��gr^r_�rWrr��	delimiters    rY�208iter_lines�Response.iter_lines�s��r\)r�c��gr^r_r�s    rYr�r��s��!$r\c#�L# �SnURXS9H�nUb[SXE-5nU(aURU5nOUR5nU(a1US(a'U(a USSUS:XaUR	5nOSnUShv�N M� UbUv� ggN7f)a+Iterates over the response data, one line at a time.  When209stream=True is set on the request, this avoids reading the210content at once into memory for large responses.211 212The decode_unicode param works the same as in `iter_content`, with the213same caveats.214 215.. note:: This method is not reentrant safe.216N)rr�zstr | bytes�����)rhr�split�217splitlines�pop)rWrr�r��pendingr��liness       rYr�r��s���� '+���&�&�!�'�218�E��"��]�G�O�<������I�.���(�(�*����r��u��r��2��%��)�1K��)�)�+�������#219�&���M��
�s�BB$�B"�B$c�,�URSLasUR(a[S5eURS:Xd
URcSUlO2SRUR
[55=(d SUlSUlUR$)z"Content of the response, in bytes.Fz2The content for this response was already consumedrNr\T)r9r:�RuntimeErrorr=r>rVrhrGr�s rYrQ�Response.contentsy���=�=�E�!��%�%�"�#W�X�X����1�$����(8� $��
� #����):�):�;M�)N� O� V�SV��
�!%����}�}�r\c��SnURnUR(dgURcURn[URU=(d SSS9nU$![[2204a [URSS9nU$f=f)a�Content of the response, in unicode.221 222If Response.encoding is None, encoding will be guessed using223``charset_normalizer`` or ``chardet``.224 225The encoding of the response content is determined based solely on HTTP226headers, following RFC 2616 to the letter. If you can take advantage of227non-HTTP knowledge to make a better guess at the encoding, you should228set ``r.encoding`` appropriately before accessing this property.229NrQri�replace)�errors)r?rQr{rR�LookupErrorr)rWrQr?s   rY�text�
Response.texts������=�=���|�|���=�=� ��-�-�H�		:��$�,�,��(;�G�I�N�G�����Y�'�	:��$�,�,�y�9�G���	:�s�A�$B�Bc�X�UR(dsUR(ab[UR5S:�aI[UR5nUb1[R230"URR
U540UD6$[R231"UR40UD6$![a N.[a0n[URURUR5eSnAff=f![a0n[URURUR5eSnAff=f)a1Decodes the JSON response body (if any) as a Python object.232 233This may return a dictionary, list, etc. depending on what is in the response.234 235:param \*\*kwargs: Optional arguments that ``json.loads`` takes.236:raises requests.exceptions.JSONDecodeError: If the response body does not237    contain valid json.238rvN)r?rQrr7r�loadsr|�UnicodeDecodeErrorr�RequestsJSONDecodeError�msg�doc�posr�)rW�kwargsr?rs    rYr%�
Response.json?s����}�}����#�d�l�l�2C�a�2G�239&�d�l�l�3�H��#�	G�&�,�,�T�\�\�-@�-@��-J�U�f�U�U�	?��$�$�T�Y�Y�9�&�9�9��*��240�&�G�1�!�%�%�������F�F��G��241�	?�*�!�%�%�������>�>��	?�s6�/B'� C/�'242C,�3	C,�<+C'�'C,�/243D)�9+D$�$D)c���URRS5n0nU(aF[U5nUH5nURS5=(d URS5nUcM1XBU'M7 U$)z8Returns the parsed header links of the response, if any.�link�relrM)ryr%r9)rWr�resolved_links�linksr��keys      rYr��Response.linksbsc�����!�!�&�)��46���&�v�.�E����h�h�u�o�8����%����?�*.�3�'��244�r\c���Sn[UR[5(aURRS5nOURnSUR245s=::aS:a"O OUR246SUSUR3nO8SUR247s=::aS:a!O OUR248S	USUR3nU(a	[XS2499eg![a URRS5nN�f=f)z+Raises :class:`HTTPError`, if one occurred.rQriz250iso-8859-1i�i�z Client Error: z251 for url: iXz Server Error: )�responseN)rkrArlr|r�r=rMr,)rW�http_error_msgrAs   rYrk�Response.raise_for_statusts������d�k�k�5�)�)�252
:����+�+�G�4���[�[�F��$�"�"�(�S�(��#�#�$�O�F�8�:�d�h�h�Z�P�
��D�$�$�
*�s�
*��#�#�$�O�F�8�:�d�h�h�Z�P�
���N�:�:���&�
:����+�+�L�9��
:�s�C
�
%C5�4C5c��UR(dURR5 [URSS5nUbU"5 gg)z�Releases the connection back to the pool. Once this method has been253called the underlying ``raw`` object must not be accessed again.254 255*Note: Should not normally need to be called explicitly.*256�release_connN)r:r>rMr)rWr�s  rYrM�Response.close�s=���%�%��H�H�N�N���t�x�x���>���#��N�$r\)
r9r:r<r�rBr?ryr@r>rArr=rMr6)r�r?)rrr�r�)r��dict[str, Any])rWr�r�r�r�)r�r�)r��Iterator[bytes])r�r;)r�rL)rF)r�257int | Noner��Literal[False]r�r�)r)rr�r��
Literal[True]r��Iterator[str | bytes])rr�r�r�r�r�)rrEr�r�r�zbytes | Noner�r�)rrEr�r�r��str | bytes | Noner�r�)rrEr�r�r�r�r�r�)r�rl)r�rr�r)r�zdict[str, dict[str, str]])!r�r�r�r�r�r�rDr�rJrNrSrXr�r`rdrhr�r_rortrwr{rrhrHr�rQr�r%r�rkrMr�r_r\rYr8r8�s����,�+���!�!���
%�%�	�H�	�H���
����
��
��
�����I�y��-�^��L�#�2���&������Q��Q��258��259����������KP��$��:H��	�����'(�$�$�$�=J�$�	�$��$�BG�=�$�=�:>�=�	�=�~�*�).�"&�	���'�� �	�260261�����*�$�262)-�$��$�&�	$�263&�$�264�
$��$�*�$�(,�	&��&��&�&�	&�265266�&�P����$�#��#�J!?�F����";�:r\r8)lr��267__future__rrF�encodings.idna�	encodings�collections.abcrrrrr�ior	�typingr268rrr
rr�urllib3.exceptionsrrrrr�urllib3.fieldsr�urllib3.filepostr�urllib3.utilr�_internal_utilsrrr@rrmr�r�compatrrrr r!r"r#r$r%rr�r&r'r(�269exceptionsr)r*r+r,r-r.r/r0r�r�r�r1�status_codesr2�270structuresr3�utilsr4r5r6r7r8r9r:r;r<r=�http.cookiejarr>�typing_extensionsr?rQ�_t�adaptersrArB�moved�found�other�temporary_redirectrsrCr�rFrGrHrJr�r�r�r8r_r\rY�<module>r�sJ���#��271�L�L�#�����(�6�"�?�1��	�	�	�(���272	�	�	�C�4� ��+�����(�&��%�*�273274�K�K�	�K�K�	�K�K�	���	���*��&��!��� �#��C�#�����O"�O"�d��8Z��Z�z_4�*�,=�_4�DB�Br\
codekingpro/portable-devtools · Team Ai