zmc
2023-10-12 ed135d79df12a2466b52dae1a82326941211dcc9
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
U
I=®dï…ã@sÊdZddlZddlZddlZddlmZddlmZddl    m
Z
ddl m Z m Z mZmZddlmZdd    lmZdd
lmZdd lmZdd lmZmZmZdd lmZmZmZm Z m!Z!m"Z"m#Z#ddl$m%Z%m&Z&ddl'm(Z(m)Z)m*Z*m+Z+m,Z,m-Z-m.Z.m/Z/m0Z0m1Z1ddl2m3Z3m4Z4m5Z5m6Z6m7Z7m8Z8m9Z9m:Z:m;Z;m<Z<m=Z=m>Z>ddl2m?Z@ddlAmBZBeBjCeBjDeBjEeBjFeBjGfZHdZIdZJdZKGdd„deLƒZMGdd„deLƒZNGdd„deNƒZOGdd„deMeNƒZPGdd„deLƒZQdS) z`
requests.models
~~~~~~~~~~~~~~~
 
This module contains the primary objects that power Requests.
éN)Ú RequestField)Úencode_multipart_formdata)Ú    parse_url)Ú DecodeErrorÚReadTimeoutErrorÚ ProtocolErrorÚLocationParseError)ÚUnsupportedOperationé)Ú default_hooks)ÚCaseInsensitiveDict)Ú HTTPBasicAuth)Úcookiejar_from_dictÚget_cookie_headerÚ_copy_cookie_jar)Ú    HTTPErrorÚ MissingSchemaÚ
InvalidURLÚChunkedEncodingErrorÚContentDecodingErrorÚConnectionErrorÚStreamConsumedError)Úto_native_stringÚunicode_is_ascii)
Úguess_filenameÚget_auth_from_urlÚ requote_uriÚstream_decode_response_unicodeÚto_key_val_listÚparse_header_linksÚ iter_slicesÚguess_json_utfÚ    super_lenÚcheck_header_validity) ÚCallableÚMappingÚ    cookielibÚ
urlunparseÚurlsplitÚ    urlencodeÚstrÚbytesÚis_py2ÚchardetÚ builtin_strÚ
basestring)Újson)Úcodeséi(ic@s0eZdZedd„ƒZedd„ƒZedd„ƒZdS)ÚRequestEncodingMixincCsNg}t|jƒ}|j}|sd}| |¡|j}|rD| d¡| |¡d |¡S)zBuild the path URL to use.ú/ú?Ú)r(ÚurlÚpathÚappendÚqueryÚjoin)Úselfr7Úpr8r:©r>úRD:\z\workplace\VsCode\pyvenv\venv\Lib\site-packages\pip/_vendor/requests/models.pyÚpath_url=s
 
 
 
zRequestEncodingMixin.path_urlcCs¶t|ttfƒr|St|dƒr |St|dƒr®g}t|ƒD]j\}}t|tƒsRt|dƒsX|g}|D]B}|dk    r\| t|tƒr€| d¡n|t|tƒr–| d¡n|f¡q\q6t|ddS|SdS)züEncode parameters in a piece of data.
 
        Will successfully encode parameters when passed as a dict or a list of
        2-tuples. Order is retained if data is a list of 2-tuples but arbitrary
        if parameters are supplied as a dict.
        ÚreadÚ__iter__Núutf-8T)Údoseq)    Ú
isinstancer*r+Úhasattrrr/r9Úencoder))ÚdataÚresultÚkÚvsÚvr>r>r?Ú_encode_paramsRs$    
 
ÿÿ z#RequestEncodingMixin._encode_paramscCs®|stdƒ‚nt|tƒr tdƒ‚g}t|p,iƒ}t|p8iƒ}|D]|\}}t|tƒs\t|dƒsb|g}|D]T}|dk    rft|tƒs„t|ƒ}| t|tƒrœ| d¡n|t|tƒr²|     d¡n|f¡qfq@|D]Ö\}}d}d}    t|t
t fƒr t |ƒdkrø|\}
} n&t |ƒdkr|\}
} }n |\}
} }}    nt |ƒp,|}
|} t| tttfƒrJ| } n(t| dƒr`|  ¡} n| dkrnqÂn| } t|| |
|    d    } | j|d
| | ¡qÂt|ƒ\}}||fS) a¥Build the body for a multipart/form-data request.
 
        Will successfully encode files when passed as a dict or a list of
        tuples. Order is retained if data is a list of tuples but arbitrary
        if parameters are supplied as a dict.
        The tuples may be 2-tuples (filename, fileobj), 3-tuples (filename, fileobj, contentype)
        or 4-tuples (filename, fileobj, contentype, custom_headers).
        zFiles must be provided.zData must not be a string.rBNrCéérA)ÚnamerHÚfilenameÚheaders)Ú content_type)Ú
ValueErrorrEr/rrFr+r*r9ÚdecoderGÚtupleÚlistÚlenrÚ    bytearrayrArÚmake_multipartr)ÚfilesrHÚ
new_fieldsÚfieldsÚfieldÚvalrLrJÚftÚfhÚfnÚfpÚfdataÚrfÚbodyrSr>r>r?Ú _encode_filesmsT
 
 
 
ÿÿ  
 
 
   z"RequestEncodingMixin._encode_filesN)Ú__name__Ú
__module__Ú __qualname__Úpropertyr@Ú staticmethodrMrgr>r>r>r?r3<s 
 
r3c@seZdZdd„Zdd„ZdS)ÚRequestHooksMixincCsZ||jkrtd|ƒ‚t|tƒr2|j| |¡n$t|dƒrV|j| dd„|Dƒ¡dS)zProperly register a hook.z1Unsupported event specified, with event name "%s"rBcss|]}t|tƒr|VqdS©N)rEr$)Ú.0Úhr>r>r?Ú    <genexpr>¸s
z2RequestHooksMixin.register_hook.<locals>.<genexpr>N)ÚhooksrTrEr$r9rFÚextend©r<ÚeventÚhookr>r>r?Ú register_hook¯s 
 
 
zRequestHooksMixin.register_hookcCs2z|j| |¡WdStk
r,YdSXdS)ziDeregister a previously registered hook.
        Returns True if the hook existed, False if not.
        TFN)rrÚremoverTrtr>r>r?Úderegister_hookºs
z!RequestHooksMixin.deregister_hookN)rhrirjrwryr>r>r>r?rm®s rmc
@s*eZdZdZd    dd„Zdd„Zdd„ZdS)
ÚRequesta{A user-created :class:`Request <Request>` object.
 
    Used to prepare a :class:`PreparedRequest <PreparedRequest>`, which is sent to the server.
 
    :param method: HTTP method to use.
    :param url: URL to send.
    :param headers: dictionary of headers to send.
    :param files: dictionary of {filename: fileobject} files to multipart upload.
    :param data: the body to attach to the request. If a dictionary or
        list of tuples ``[(key, value)]`` is provided, form-encoding will
        take place.
    :param json: json for the body to attach to the request (if files or data is not specified).
    :param params: URL parameters to append to the URL. If a dictionary or
        list of tuples ``[(key, value)]`` is provided, form-encoding will
        take place.
    :param auth: Auth handler or (user, pass) tuple.
    :param cookies: dictionary or CookieJar of cookies to attach to this request.
    :param hooks: dictionary of callback hooks, for internal usage.
 
    Usage::
 
      >>> import requests
      >>> req = requests.Request('GET', 'https://httpbin.org/get')
      >>> req.prepare()
      <PreparedRequest [GET]>
    Nc Cs¶|dkr gn|}|dkrgn|}|dkr,in|}|dkr<in|}|    dkrLin|    }    tƒ|_t|     ¡ƒD]\} } |j| | dqd||_||_||_||_||_    |
|_
||_ ||_ ||_ dS)N)rurv)r rrrWÚitemsrwÚmethodr7rRr[rHr0ÚparamsÚauthÚcookies) r<r|r7rRr[rHr}r~rrrr0rJrLr>r>r?Ú__init__âs"zRequest.__init__cCs
d|jS)Nz<Request [%s]>©r|©r<r>r>r?Ú__repr__ûszRequest.__repr__c Cs<tƒ}|j|j|j|j|j|j|j|j|j    |j
|j d
|S)zXConstructs a :class:`PreparedRequest <PreparedRequest>` for transmission and returns it.)
r|r7rRr[rHr0r}r~rrr) ÚPreparedRequestÚpreparer|r7rRr[rHr0r}r~rrr©r<r=r>r>r?r…þsö zRequest.prepare)
NNNNNNNNNN)rhrirjÚ__doc__r€rƒr…r>r>r>r?rzÆsþ
rzc
@s‚eZdZdZdd„Zddd„Zdd„Zd    d
„Zd d „Ze    d d„ƒZ
dd„Z dd„Z ddd„Z dd„Zd dd„Zdd„Zdd„ZdS)!r„aÓThe fully mutable :class:`PreparedRequest <PreparedRequest>` object,
    containing the exact bytes that will be sent to the server.
 
    Generated from either a :class:`Request <Request>` object or manually.
 
    Usage::
 
      >>> import requests
      >>> req = requests.Request('GET', 'https://httpbin.org/get')
      >>> r = req.prepare()
      >>> r
      <PreparedRequest [GET]>
 
      >>> s = requests.Session()
      >>> s.send(r)
      <Response [200]>
    cCs0d|_d|_d|_d|_d|_tƒ|_d|_dSrn)r|r7rRÚ_cookiesrfr rrÚ_body_positionr‚r>r>r?r€#szPreparedRequest.__init__Nc CsR| |¡| ||¡| |¡| |¡| |||
¡| ||¡| |    ¡dS)z6Prepares the entire request with the given parameters.N)Úprepare_methodÚ prepare_urlÚprepare_headersÚprepare_cookiesÚ prepare_bodyÚ prepare_authÚ prepare_hooks) r<r|r7rRr[rHr}r~rrrr0r>r>r?r…4s
 
 
 zPreparedRequest.preparecCs
d|jS)Nz<PreparedRequest [%s]>rr‚r>r>r?rƒFszPreparedRequest.__repr__cCsXtƒ}|j|_|j|_|jdk    r*|j ¡nd|_t|jƒ|_|j|_|j|_|j    |_    |Srn)
r„r|r7rRÚcopyrrˆrfrrr‰r†r>r>r?r‘Is zPreparedRequest.copycCs$||_|jdk    r t|j ¡ƒ|_dS)zPrepares the given HTTP method.N)r|rÚupper)r<r|r>r>r?rŠTs
zPreparedRequest.prepare_methodcCsDddlm}z|j|dd d¡}Wn|jk
r>t‚YnX|S)Nr)ÚidnaT)Úuts46rC)Ú pip._vendorr“rGrUÚ    IDNAErrorÚ UnicodeError)Úhostr“r>r>r?Ú_get_idna_encoded_hostZs  
z&PreparedRequest._get_idna_encoded_hostc
Cs,t|tƒr| d¡}ntr"t|ƒnt|ƒ}| ¡}d|krR| ¡ d¡sR||_    dSzt
|ƒ\}}}}}}}    Wn,t k
r˜}
zt |
j ނW5d}
~
XYnX|sºd} |  t|dƒ¡} t| ƒ‚|sÊt d|ƒ‚t|ƒsz| |¡}Wntk
rþt dƒ‚YnXn| d¡rt dƒ‚|pd    } | r.| d
7} | |7} |rL| dt|ƒ7} |sVd }trÊt|tƒrr| d ¡}t| tƒrˆ|  d ¡} t|tƒrž| d ¡}t|tƒr´| d ¡}t|    tƒrÊ|     d ¡}    t|ttfƒrât|ƒ}| |¡} | r
|rd || f}n| }tt|| |d||    gƒƒ}||_    dS)zPrepares the given HTTP URL.Úutf8ú:ÚhttpNzDInvalid URL {0!r}: No schema supplied. Perhaps you meant http://{0}?z Invalid URL %r: No host suppliedzURL has an invalid label.Ú*r6ú@r4rCz%s&%s)rEr+rUr,Úunicoder*ÚlstripÚlowerÚ
startswithr7rrrÚargsÚformatrrrr™r—rGrMrr')r<r7r}Úschemer~r˜Úportr8r:ÚfragmentÚeÚerrorÚnetlocÚ
enc_paramsr>r>r?r‹dsh
 
 
 
 
 
 
 
 
zPreparedRequest.prepare_urlcCs<tƒ|_|r8| ¡D]"}t|ƒ|\}}||jt|ƒ<qdS)z Prepares the given HTTP headers.N)r rRr{r#r)r<rRÚheaderrPÚvaluer>r>r?rŒºs  zPreparedRequest.prepare_headersc
Csrd}d}|s6|dk    r6d}t |¡}t|tƒs6| d¡}tt|dƒt|ttt    t
fƒ gƒ}|røz t |ƒ}Wnt t tfk
r†d}YnX|}t|ddƒdk    rÌz| ¡|_Wn ttfk
rÊtƒ|_YnX|rØtdƒ‚|rìt|ƒ|jd<n
d|jd    <np|r| ||¡\}}n2|rB| |¡}t|tƒs8t|d
ƒr>d}nd }| |¡|rhd |jkrh||jd <||_dS)z"Prepares the given HTTP body data.Nzapplication/jsonrCrBÚtellz1Streamed bodies and files are mutually exclusive.úContent-LengthÚchunkedzTransfer-EncodingrAz!application/x-www-form-urlencodedz content-typez Content-Type)Ú complexjsonÚdumpsrEr+rGÚallrFr/rWrVr%r"Ú    TypeErrorÚAttributeErrorr    Úgetattrr®r‰ÚIOErrorÚOSErrorÚobjectÚNotImplementedErrorr.rRrgrMÚprepare_content_lengthrf)r<rHr[r0rfrSÚ    is_streamÚlengthr>r>r?rŽÅsL 
 
 
þ 
 
 
 
zPreparedRequest.prepare_bodycCsL|dk    r$t|ƒ}|rHt|ƒ|jd<n$|jdkrH|j d¡dkrHd|jd<dS)z>Prepare Content-Length header based on request method and bodyNr¯)ÚGETÚHEADÚ0)r"r.rRr|Úget)r<rfr½r>r>r?r»
s z&PreparedRequest.prepare_content_lengthr6cCsj|dkr"t|jƒ}t|ƒr|nd}|rft|tƒrDt|ƒdkrDt|Ž}||ƒ}|j |j¡|     |j
¡dS)z"Prepares the given HTTP auth data.NrN) rr7ÚanyrErVrXr Ú__dict__Úupdater»rf)r<r~r7Úurl_authÚrr>r>r?rs
zPreparedRequest.prepare_authcCs@t|tjƒr||_n
t|ƒ|_t|j|ƒ}|dk    r<||jd<dS)aPrepares the given HTTP cookie data.
 
        This function eventually generates a ``Cookie`` header from the
        given cookies using cookielib. Due to cookielib's design, the header
        will not be regenerated if it already exists, meaning this function
        can only be called once for the life of the
        :class:`PreparedRequest <PreparedRequest>` object. Any subsequent calls
        to ``prepare_cookies`` will have no actual effect, unless the "Cookie"
        header is removed beforehand.
        NÚCookie)rEr&Ú    CookieJarrˆrrrR)r<rÚ cookie_headerr>r>r?r-s 
 zPreparedRequest.prepare_cookiescCs&|pg}|D]}| |||¡q dS)zPrepares the given hooks.N)rw)r<rrrur>r>r?rAszPreparedRequest.prepare_hooks)
NNNNNNNNNN)N)r6)rhrirjr‡r€r…rƒr‘rŠrlr™r‹rŒrŽr»rrrr>r>r>r?r„s2þ
 
    V
E
r„c
@seZdZdZdddddddd    d
d g
Zd d „Zdd„Zdd„Zdd„Zdd„Z    dd„Z
dd„Z dd„Z dd„Z edd„ƒZed d!„ƒZed"d#„ƒZed$d%„ƒZed&d'„ƒZd;d*d+„Zed)d,fd-d.„Zed/d0„ƒZed1d2„ƒZd3d4„Zed5d6„ƒZd7d8„Zd9d:„Zd,S)<ÚResponsezhThe :class:`Response <Response>` object, which contains a
    server's response to an HTTP request.
    Ú_contentÚ status_coderRr7ÚhistoryÚencodingÚreasonrÚelapsedÚrequestcCs^d|_d|_d|_d|_tƒ|_d|_d|_d|_g|_    d|_
t iƒ|_ t  d¡|_d|_dS)NFr)rËÚ_content_consumedÚ_nextrÌr rRÚrawr7rÎrÍrÏrrÚdatetimeÚ    timedeltarÐrÑr‚r>r>r?r€Us
 zResponse.__init__cCs|Srnr>r‚r>r>r?Ú    __enter__„szResponse.__enter__cGs | ¡dSrn)Úclose)r<r£r>r>r?Ú__exit__‡szResponse.__exit__cs ˆjs ˆj‡fdd„ˆjDƒS)Ncsi|]}|tˆ|dƒ“qSrn)r¶)roÚattrr‚r>r?Ú
<dictcomp>sz)Response.__getstate__.<locals>.<dictcomp>)rÒÚcontentÚ    __attrs__r‚r>r‚r?Ú __getstate__ŠszResponse.__getstate__cCs:| ¡D]\}}t|||ƒqt|ddƒt|ddƒdS)NrÒTrÔ)r{Úsetattr)r<ÚstaterPr­r>r>r?Ú __setstate__’s zResponse.__setstate__cCs
d|jS)Nz<Response [%s]>)rÌr‚r>r>r?rƒšszResponse.__repr__cCs|jS©akReturns True if :attr:`status_code` is less than 400.
 
        This attribute checks if the status code of the response is between
        400 and 600 to see if there was a client error or a server error. If
        the status code, is between 200 and 400, this will return True. This
        is **not** a check to see if the response code is ``200 OK``.
        ©Úokr‚r>r>r?Ú__bool__szResponse.__bool__cCs|jSrârãr‚r>r>r?Ú __nonzero__§szResponse.__nonzero__cCs
| d¡S)z,Allows you to use a response as an iterator.é€)Ú iter_contentr‚r>r>r?rB±szResponse.__iter__cCs(z | ¡Wntk
r"YdSXdS)axReturns True if :attr:`status_code` is less than 400, False if not.
 
        This attribute checks if the status code of the response is between
        400 and 600 to see if there was a client error or a server error. If
        the status code is between 200 and 400, this will return True. This
        is **not** a check to see if the response code is ``200 OK``.
        FT)Úraise_for_statusrr‚r>r>r?räµs
     z Response.okcCsd|jko|jtkS)zšTrue if this Response is a well-formed HTTP redirect that could have
        been processed automatically (by :meth:`Session.resolve_redirects`).
        Úlocation)rRrÌÚREDIRECT_STATIr‚r>r>r?Ú is_redirectÄszResponse.is_redirectcCsd|jko|jtjtjfkS)z@True if this Response one of the permanent versions of redirect.rê)rRrÌr1Úmoved_permanentlyÚpermanent_redirectr‚r>r>r?Úis_permanent_redirectËszResponse.is_permanent_redirectcCs|jS)zTReturns a PreparedRequest for the next request in a redirect chain, if there is one.)rÓr‚r>r>r?ÚnextÐsz Response.nextcCst |j¡dS)z7The apparent encoding, provided by the chardet library.rÎ)r-ÚdetectrÜr‚r>r>r?Úapparent_encodingÕszResponse.apparent_encodingr
Fcs|‡‡fdd„}ˆjr(tˆjtƒr(tƒ‚n"ˆdk    rJtˆtƒsJtdtˆƒƒ‚tˆjˆƒ}|ƒ}ˆjrf|n|}|rxt    |ˆƒ}|S)aøIterates over the response data.  When stream=True is set on the
        request, this avoids reading the content at once into memory for
        large responses.  The chunk size is the number of bytes it should
        read into memory.  This is not necessarily the length of each item
        returned as decoding can take place.
 
        chunk_size must be of type int or None. A value of None will
        function differently depending on the value of `stream`.
        stream=True will read data as it arrives in whatever size the
        chunks are received. If stream=False, data is returned as
        a single chunk.
 
        If decode_unicode is True, content will be decoded using the best
        available encoding based on the response.
        c
3sÎtˆjdƒrªz ˆjjˆddD]
}|VqWqÄtk
rV}z t|ƒ‚W5d}~XYqÄtk
r~}z t|ƒ‚W5d}~XYqÄtk
r¦}z t|ƒ‚W5d}~XYqÄXnˆj     ˆ¡}|s¼qÄ|Vqªdˆ_
dS)NÚstreamT)Údecode_content) rFrÔrórrrrrrrArÒ)Úchunkr¨©Ú
chunk_sizer<r>r?Úgenerateës   z'Response.iter_content.<locals>.generateNz.chunk_size must be an int, it is instead a %s.)
rÒrErËÚboolrÚintr´Útyper r)r<r÷Údecode_unicoderøÚ reused_chunksÚ stream_chunksÚchunksr>rör?rèÚs 
zResponse.iter_contentNccs”d}|j||dD]n}|dk    r&||}|r6| |¡}n| ¡}|rl|drl|rl|dd|dkrl| ¡}nd}|D]
}|Vqtq|dk    r|VdS)zõIterates over the response data, one line at a time.  When
        stream=True is set on the request, this avoids reading the
        content at once into memory for large responses.
 
        .. note:: This method is not reentrant safe.
        N)r÷rüéÿÿÿÿ)rèÚsplitÚ
splitlinesÚpop)r<r÷rüÚ    delimiterÚpendingrõÚlinesÚliner>r>r?Ú
iter_liness $
 
zResponse.iter_linescCsV|jdkrJ|jrtdƒ‚|jdks,|jdkr4d|_nd | t¡¡pFd|_d|_|jS)z"Content of the response, in bytes.Fz2The content for this response was already consumedrNóT)rËrÒÚ RuntimeErrorrÌrÔr;rèÚCONTENT_CHUNK_SIZEr‚r>r>r?rÜ0s
ÿzResponse.contentc    Cshd}|j}|jstdƒS|jdkr(|j}zt|j|dd}Wn&ttfk
rbt|jdd}YnX|S)aÀContent of the response, in unicode.
 
        If Response.encoding is None, encoding will be guessed using
        ``chardet``.
 
        The encoding of the response content is determined based solely on HTTP
        headers, following RFC 2616 to the letter. If you can take advantage of
        non-HTTP knowledge to make a better guess at the encoding, you should
        set ``r.encoding`` appropriately before accessing this property.
        Nr6Úreplace)Úerrors)rÎrÜr*ròÚ LookupErrorr´)r<rÜrÎr>r>r?ÚtextDs
z Response.textcKsj|jsZ|jrZt|jƒdkrZt|jƒ}|dk    rZztj|j |¡f|ŽWStk
rXYnXtj|jf|ŽS)zØReturns the json-encoded content of a response, if any.
 
        :param \*\*kwargs: Optional arguments that ``json.loads`` takes.
        :raises ValueError: If the response body does not contain valid json.
        rON)    rÎrÜrXr!r±ÚloadsrUÚUnicodeDecodeErrorr)r<ÚkwargsrÎr>r>r?r0js
 
ÿÿz Response.jsoncCsF|j d¡}i}|rBt|ƒ}|D] }| d¡p6| d¡}|||<q |S)z8Returns the parsed header links of the response, if any.ÚlinkÚrelr7)rRrÁr)r<r¬ÚlÚlinksrÚkeyr>r>r?r„s 
zResponse.linkscCs¸d}t|jtƒrDz|j d¡}WqJtk
r@|j d¡}YqJXn|j}d|jkr`dkrxnnd|j||jf}n,d|jkrŽdkr¤nnd|j||jf}|r´t||d    ‚d
S) z+Raises :class:`HTTPError`, if one occurred.r6rCz
iso-8859-1iiôz%s Client Error: %s for url: %siXz%s Server Error: %s for url: %s)ÚresponseN)rErÏr+rUrrÌr7r)r<Úhttp_error_msgrÏr>r>r?ré–s zResponse.raise_for_statuscCs0|js|j ¡t|jddƒ}|dk    r,|ƒdS)zØReleases the connection back to the pool. Once this method has been
        called the underlying ``raw`` object must not be accessed again.
 
        *Note: Should not normally need to be called explicitly.*
        Ú release_connN)rÒrÔrØr¶)r<rr>r>r?rدs
 
zResponse.close)r
F)rhrirjr‡rÝr€r×rÙrÞrárƒrårærBrkrärìrïrðròrèÚITER_CHUNK_SIZErrÜrr0rrérØr>r>r>r?rÊKsTþ/
 
 
 
 
 
 
 
7
 
%
rÊ)Rr‡rÕÚsysÚencodings.idnaÚ    encodingsZpip._vendor.urllib3.fieldsrZpip._vendor.urllib3.filepostrÚpip._vendor.urllib3.utilrZpip._vendor.urllib3.exceptionsrrrrÚior    rrr Ú
structuresr r~r rrrrÚ
exceptionsrrrrrrrÚ_internal_utilsrrÚutilsrrrrrrr r!r"r#Úcompatr$r%r&r'r(r)r*r+r,r-r.r/r0r±Ú status_codesr1ÚmovedÚfoundÚotherÚtemporary_redirectrîrëÚDEFAULT_REDIRECT_LIMITr rr¹r3rmrzr„rÊr>r>r>r?Ú<module>sD       $08  ûrJ=