zmc
2023-08-08 e792e9a60d958b93aef96050644f369feb25d61b
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
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
U
I=®d‹ã@s®ddlmZddlZddlZddlZddlZddlmZm    Z
ddlZddl m Z m Z mZmZmZmZmZmZmZmZmZmZmZddlmZddlmZddlmZdd    lm Z m!Z!m"Z"m#Z#m$Z$m%Z%m&Z&dd
l'm(Z(dd l)m*Z*dd l+m,Z,dd l-m.Z.ddl/m0Z0ddl1m2Z2ddl3m4Z4ddl5m6Z6m7Z7m8Z8m9Z:m;Z;ddl<m=Z=ej>j?Z?e @eA¡ZBeCƒZDGdd„deCƒZEejFejGhZHGdd„deEe(ƒZIGdd„deIƒZJdd„ZKdd„Z9dS)é)Úabsolute_importN)ÚerrorÚtimeouté) ÚClosedPoolErrorÚ ProtocolErrorÚEmptyPoolErrorÚHeaderParsingErrorÚHostChangedErrorÚLocationValueErrorÚ MaxRetryErrorÚ
ProxyErrorÚReadTimeoutErrorÚSSLErrorÚ TimeoutErrorÚInsecureRequestWarningÚNewConnectionError)ÚCertificateError)Úsix)Úqueue)Úport_by_schemeÚDummyConnectionÚHTTPConnectionÚHTTPSConnectionÚVerifiedHTTPSConnectionÚ HTTPExceptionÚ BaseSSLError)ÚRequestMethods)Ú HTTPResponse)Úis_connection_dropped)Úset_file_position)Úassert_header_parsing)ÚRetry)ÚTimeout)Úget_hostÚ    parse_urlÚUrlÚ_normalize_hostÚ_encode_target)Ú    LifoQueuec@sBeZdZdZdZeZd dd„Zdd„Zdd„Z    d    d
„Z
d d „Z dS)ÚConnectionPoola;
    Base class for all connection pools, such as
    :class:`.HTTPConnectionPool` and :class:`.HTTPSConnectionPool`.
 
    .. note::
       ConnectionPool.urlopen() does not normalize or percent-encode target URIs
       which is useful if your target server doesn't support percent-encoded
       target URIs.
    NcCs0|s tdƒ‚t||jd|_| ¡|_||_dS)NzNo host specified.©Úscheme)r r'r,ÚhostÚlowerÚ _proxy_hostÚport)Úselfr-r0©r2úYD:\z\workplace\VsCode\pyvenv\venv\Lib\site-packages\pip/_vendor/urllib3/connectionpool.pyÚ__init__Ns
 
zConnectionPool.__init__cCsdt|ƒj|j|jfS)Nz%s(host=%r, port=%r))ÚtypeÚ__name__r-r0©r1r2r2r3Ú__str__VszConnectionPool.__str__cCs|S©Nr2r7r2r2r3Ú    __enter__YszConnectionPool.__enter__cCs | ¡dS)NF)Úclose)r1Úexc_typeÚexc_valÚexc_tbr2r2r3Ú__exit__\szConnectionPool.__exit__cCsdS)úD
        Close all pooled connections and disable the pool.
        Nr2r7r2r2r3r;aszConnectionPool.close)N) r6Ú
__module__Ú __qualname__Ú__doc__r,r)ÚQueueClsr4r8r:r?r;r2r2r2r3r*@s
 
r*c
@s¸eZdZdZdZeZeZdde    j
ddddddf    dd„Z dd    „Z d!d
d „Z d d „Zdd„Zdd„Zdd„Zdd„Zedfdd„Zdd„Zdd„Zdd„Zdddddeddddf
dd „ZdS)"ÚHTTPConnectionPoolaN    
    Thread-safe connection pool for one host.
 
    :param host:
        Host used for this HTTP Connection (e.g. "localhost"), passed into
        :class:`httplib.HTTPConnection`.
 
    :param port:
        Port used for this HTTP Connection (None is equivalent to 80), passed
        into :class:`httplib.HTTPConnection`.
 
    :param strict:
        Causes BadStatusLine to be raised if the status line can't be parsed
        as a valid HTTP/1.0 or 1.1 status line, passed into
        :class:`httplib.HTTPConnection`.
 
        .. note::
           Only works in Python 2. This parameter is ignored in Python 3.
 
    :param timeout:
        Socket timeout in seconds for each individual connection. This can
        be a float or integer, which sets the timeout for the HTTP request,
        or an instance of :class:`urllib3.util.Timeout` which gives you more
        fine-grained control over request timeouts. After the constructor has
        been parsed, this is always a `urllib3.util.Timeout` object.
 
    :param maxsize:
        Number of connections to save that can be reused. More than 1 is useful
        in multithreaded situations. If ``block`` is set to False, more
        connections will be created but they will not be saved once they've
        been used.
 
    :param block:
        If set to True, no more than ``maxsize`` connections will be used at
        a time. When no free connections are available, the call will block
        until a connection has been released. This is a useful side effect for
        particular multithreaded situations where one does not want to use more
        than maxsize connections per host to prevent flooding.
 
    :param headers:
        Headers to include with all requests, unless other headers are given
        explicitly.
 
    :param retries:
        Retry configuration to use by default with requests in this pool.
 
    :param _proxy:
        Parsed proxy URL, should not be used directly, instead, see
        :class:`urllib3.connectionpool.ProxyManager`"
 
    :param _proxy_headers:
        A dictionary with proxy headers, should not be used directly,
        instead, see :class:`urllib3.connectionpool.ProxyManager`"
 
    :param \**conn_kw:
        Additional parameters are used to create fresh :class:`urllib3.connection.HTTPConnection`,
        :class:`urllib3.connection.HTTPSConnection` instances.
    ÚhttpNFrc Ks´t |||¡t ||¡||_t|tƒs4t |¡}|dkrBtj}||_    ||_
|  |¡|_ ||_ |    |_|
pli|_t|ƒD]} |j  d¡qxd|_d|_| |_|jr°|j dg¡dS)NrÚsocket_options)r*r4rÚstrictÚ
isinstancer#Ú
from_floatr"ÚDEFAULTrÚretriesrDÚpoolÚblockÚproxyÚ proxy_headersÚxrangeÚputÚnum_connectionsÚ num_requestsÚconn_kwÚ
setdefault) r1r-r0rHrÚmaxsizerNÚheadersrLÚ_proxyÚ_proxy_headersrUÚ_r2r2r3r4¬s( 
 
 
 zHTTPConnectionPool.__init__cCsR|jd7_t d|j|j|jp$d¡|jf|j|j|jj|jdœ|j    —Ž}|S)z9
        Return a fresh :class:`HTTPConnection`.
        rz(Starting new HTTP connection (%d): %s:%sÚ80)r-r0rrH)
rSÚlogÚdebugr-r0Ú ConnectionClsrÚconnect_timeoutrHrU©r1Úconnr2r2r3Ú    _new_connÝs üüûzHTTPConnectionPool._new_conncCs d}z|jj|j|d}WnBtk
r8t|dƒ‚Yn&tjk
r\|jrXt|dƒ‚YnX|r”t|ƒr”t     
d|j ¡|  ¡t |ddƒdkr”d}|pž| ¡S)    a™
        Get a connection. Will return a pooled connection if one is available.
 
        If no connections are available and :prop:`.block` is ``False``, then a
        fresh connection is returned.
 
        :param timeout:
            Seconds to wait before giving up and raising
            :class:`urllib3.exceptions.EmptyPoolError` if the pool is empty and
            :prop:`.block` is ``True``.
        N)rNrzPool is closed.z>Pool reached maximum size and no more connections are allowed.z Resetting dropped connection: %sÚ    auto_openrr)rMÚgetrNÚAttributeErrorrrÚEmptyrrr]r^r-r;Úgetattrrc)r1rrbr2r2r3Ú    _get_connòs$ þ zHTTPConnectionPool._get_conncCs^z|jj|ddWdStk
r*Yn$tjk
rLt d|j¡YnX|rZ| ¡dS)aä
        Put a connection back into the pool.
 
        :param conn:
            Connection object for the current host and port as returned by
            :meth:`._new_conn` or :meth:`._get_conn`.
 
        If the pool is already full, the connection is closed and discarded
        because we exceeded maxsize. If connections are discarded frequently,
        then maxsize should be increased.
 
        If the pool is closed, then the connection will be closed and discarded.
        F©rNNz2Connection pool is full, discarding connection: %s)    rMrRrfrÚFullr]Úwarningr-r;rar2r2r3Ú    _put_connszHTTPConnectionPool._put_conncCsdS)úU
        Called right before a request is made, after the socket is created.
        Nr2rar2r2r3Ú_validate_conn5sz!HTTPConnectionPool._validate_conncCsdSr9r2rar2r2r3Ú_prepare_proxy;sz!HTTPConnectionPool._prepare_proxycCs2|tkr|j ¡St|tƒr$| ¡St |¡SdS)z< Helper that always returns a :class:`urllib3.util.Timeout` N)Ú_DefaultrÚclonerIr#rJ)r1rr2r2r3Ú _get_timeout?s
 
 
zHTTPConnectionPool._get_timeoutcCsjt|tƒrt||d|ƒ‚t|dƒr>|jtkr>t||d|ƒ‚dt|ƒksVdt|ƒkrft||d|ƒ‚dS)zAIs the error actually a timeout? Will raise a ReadTimeout or passú!Read timed out. (read timeout=%s)Úerrnoz    timed outzdid not complete (read)N)rIÚ SocketTimeoutrÚhasattrruÚ_blocking_errnosÚstr)r1ÚerrÚurlÚ timeout_valuer2r2r3Ú_raise_timeoutKs(
ÿÿÿÿz!HTTPConnectionPool._raise_timeoutc Ks|jd7_| |¡}| ¡|j|_z| |¡Wn:ttfk
rp}z|j|||jd‚W5d}~XYnX|rˆ|j    ||f|Žn|j
||f|Ž|j }    t |ddƒrê|    dkrÂt ||d|    ƒ‚|    tjkrÞ|j t ¡¡n |j |    ¡zjz|jdd}
WnTtk
rPz | ¡}
Wn0tk
rJ}zt |d¡W5d}~XYnXYnXWn<tttfk
r}z|j|||    d‚W5d}~XYnXt |d    d
ƒ} t d |j|j|j||| |
j|
j ¡    zt!|
j"ƒWn@t#tfk
r} ztj$d | %|¡| dd W5d} ~ XYnX|
S)a
        Perform a request on a given urllib connection object taken from our
        pool.
 
        :param conn:
            a connection from one of our connection pools
 
        :param timeout:
            Socket timeout in seconds for the request. This can be a
            float or integer, which will set the same timeout value for
            the socket connect and the socket read, or an instance of
            :class:`urllib3.util.Timeout`, which gives you more fine-grained
            control over your timeouts.
        r)rzr{r|NÚsockrrtT)Ú    bufferingÚ _http_vsn_strzHTTP/?z%s://%s:%s "%s %s %s" %s %sz$Failed to parse headers (url=%s): %s)Úexc_info)&rTrsÚ start_connectr`rrorvrr}Úrequest_chunkedÚrequestÚ read_timeoutrhrr#ÚDEFAULT_TIMEOUTr~Ú
settimeoutÚsocketÚgetdefaulttimeoutÚ getresponseÚ    TypeErrorÚ BaseExceptionrÚ
raise_fromÚ SocketErrorr]r^r,r-r0ÚstatusÚlengthr!Úmsgr    rlÚ _absolute_url) r1rbÚmethodr{rÚchunkedÚhttplib_request_kwÚ timeout_objÚer…Úhttplib_responseÚ http_versionÚhper2r2r3Ú _make_requestdsp
 ÿ
  ( ÷ üz HTTPConnectionPool._make_requestcCst|j|j|j|djS)N)r,r-r0Úpath)r&r,r-r0r{)r1rœr2r2r3r’Ész HTTPConnectionPool._absolute_urlcCsV|jdkrdS|jd}|_z|jdd}|r| ¡qWntjk
rPYnXdS)r@NFrj)rMrer;rrg)r1Úold_poolrbr2r2r3r;Ìs
 zHTTPConnectionPool.closecCsx| d¡rdSt|ƒ\}}}|dk    r0t||d}|jrF|sFt |¡}n|js^|t |¡kr^d}|||f|j|j|jfkS)zj
        Check if the given ``url`` is a member of the same host as this
        connection pool.
        ú/TNr+)Ú
startswithr$r'r0rrer,r-)r1r{r,r-r0r2r2r3Ú is_same_hostÞs
 
 zHTTPConnectionPool.is_same_hostTc Ksþ|dkr|j}t|tƒs*tj|||jd}|
dkr>|  dd¡}
|rX| |¡sXt|||ƒ‚| d¡rrt     
t |ƒ¡}nt     
t |ƒj ¡}d}|
}|jdkr¨| ¡}| |j¡d}d}t|| ƒ} ztz˜| |¡}|j|    d}|j|_|jdk    oôt|d    dƒ }|r| |¡|j||||||| d
}|
s(|nd}|| d <|jj|f|||d œ| —Ž}d}WnÖtj k
rxt!|d ƒ‚Yn¶t"t#t$t%t&t't(fk
r,}zˆd}t|t&t(fƒr¶t'|ƒ}n>t|t$t)fƒrÚ|jrÚt*d|ƒ}nt|t$t#fƒrôt%d|ƒ}|j+||||t, -¡dd}| .¡|}W5d}~XYnXW5|sJ|oD| ¡}d}|rZ| |¡X|sœt/ 0d|||¡|j1|||||||f||    |
| | dœ| —ŽS|o¨| 2¡}|rN|j3dkrÀd}z|j+||||d}Wn,t4k
r|j5rú| 6¡‚|YSX| 6¡| 7|¡t/ 8d||¡|j1||||f|||||    |
| | dœ| —ŽSt9| :d¡ƒ}| ;||j3|¡rúz|j+||||d}Wn,t4k
r°|j<r¨| 6¡‚|YSX| 6¡| .|¡t/ 8d|¡|j1||||f|||||    |
| | dœ| —ŽS|S)aá
        Get a connection from the pool and perform an HTTP request. This is the
        lowest level call for making a request, so you'll need to specify all
        the raw details.
 
        .. note::
 
           More commonly, it's appropriate to use a convenience method provided
           by :class:`.RequestMethods`, such as :meth:`request`.
 
        .. note::
 
           `release_conn` will only behave as expected if
           `preload_content=False` because we want to make
           `preload_content=False` the default behaviour someday soon without
           breaking backwards compatibility.
 
        :param method:
            HTTP request method (such as GET, POST, PUT, etc.)
 
        :param body:
            Data to send in the request body (useful for creating
            POST requests, see HTTPConnectionPool.post_url for
            more convenience).
 
        :param headers:
            Dictionary of custom headers to send, such as User-Agent,
            If-None-Match, etc. If None, pool headers are used. If provided,
            these headers completely replace any pool-specific headers.
 
        :param retries:
            Configure the number of retries to allow before raising a
            :class:`~urllib3.exceptions.MaxRetryError` exception.
 
            Pass ``None`` to retry until you receive a response. Pass a
            :class:`~urllib3.util.retry.Retry` object for fine-grained control
            over different types of retries.
            Pass an integer number to retry connection errors that many times,
            but no other types of errors. Pass zero to never retry.
 
            If ``False``, then retries are disabled and any exception is raised
            immediately. Also, instead of raising a MaxRetryError on redirects,
            the redirect response will be returned.
 
        :type retries: :class:`~urllib3.util.retry.Retry`, False, or an int.
 
        :param redirect:
            If True, automatically handle redirects (status codes 301, 302,
            303, 307, 308). Each redirect counts as a retry. Disabling retries
            will disable redirect, too.
 
        :param assert_same_host:
            If ``True``, will make sure that the host of the pool requests is
            consistent else will raise HostChangedError. When False, you can
            use the pool on an HTTP proxy and request foreign hosts.
 
        :param timeout:
            If specified, overrides the default timeout for this one
            request. It may be a float (in seconds) or an instance of
            :class:`urllib3.util.Timeout`.
 
        :param pool_timeout:
            If set and the pool is set to block=True, then this method will
            block for ``pool_timeout`` seconds and raise EmptyPoolError if no
            connection is available within the time period.
 
        :param release_conn:
            If False, then the urlopen call will not release the connection
            back into the pool once a response is received (but will release if
            you read the entire contents of the response such as when
            `preload_content=True`). This is useful if you're not preloading
            the response's content immediately. You will need to call
            ``r.release_conn()`` on the response ``r`` to return the connection
            back into the pool. If None, it takes the value of
            ``response_kw.get('preload_content', True)``.
 
        :param chunked:
            If True, urllib3 will send the body using chunked transfer
            encoding. Otherwise, urllib3 will send the body using the standard
            content-length form. Defaults to False.
 
        :param int body_pos:
            Position to seek to in file-like body in the event of a retry or
            redirect. Typically this won't need to be set because urllib3 will
            auto-populate the value when needed.
 
        :param \**response_kw:
            Additional parameters are passed to
            :meth:`urllib3.response.HTTPResponse.from_httplib`
        N)ÚredirectÚdefaultÚpreload_contentTržrFF)rr~)rÚbodyrXr”Úrequest_method)rMÚ
connectionrLz"No pool connections are available.zCannot connect to proxy.zConnection aborted.é)rÚ_poolÚ _stacktracez1Retrying (%r) after connection broken by '%r': %s)rÚ pool_timeoutÚ release_connr”Úbody_posi/ÚGET)Úresponser¨zRedirecting %s -> %s)rLr¡Úassert_same_hostrrªr«r”r¬z Retry-Afterz    Retry: %s)=rXrIr"Úfrom_intrLrer r
rŸrÚ
ensure_strr(r%r{r,ÚcopyÚupdaterPr r;rmrsrir`rrOrhrpr›Ú ResponseClsÚ from_httplibrrgrrrrŽrrrrrr Ú    incrementÚsysrÚsleepr]rlÚurlopenÚget_redirect_locationrr Úraise_on_redirectÚ
drain_connÚsleep_for_retryr^ÚboolÚ    getheaderÚis_retryÚraise_on_status)r1r“r{r¤rXrLr¡r¯rrªr«r”r¬Ú response_kwrbÚrelease_this_connrzÚ
clean_exitr–Úis_new_proxy_connr˜Ú response_connr®r—Úredirect_locationÚhas_retry_afterr2r2r3r¹ósPj
 
 
 
 
  ÿ
ùÿüû    ù 
 
 
ÿ ÿùô ó 
 
üô ó
 
 üô ózHTTPConnectionPool.urlopen)N)r6rArBrCr,rr_rr´r#r†r4rcrirmrorprsr}rqr›r’r;r r¹r2r2r2r3rElsL;õ
1
' ÿ
eórEcspeZdZdZdZeZddejdddddddddddddddfdd„Z    dd    „Z
d
d „Z d d „Z ‡fdd„Z ‡ZS)ÚHTTPSConnectionPoolaÛ
    Same as :class:`.HTTPConnectionPool`, but HTTPS.
 
    When Python is compiled with the :mod:`ssl` module, then
    :class:`.VerifiedHTTPSConnection` is used, which *can* verify certificates,
    instead of :class:`.HTTPSConnection`.
 
    :class:`.VerifiedHTTPSConnection` uses one of ``assert_fingerprint``,
    ``assert_hostname`` and ``host`` in this order to verify connections.
    If ``assert_hostname`` is False, no verification is done.
 
    The ``key_file``, ``cert_file``, ``cert_reqs``, ``ca_certs``,
    ``ca_cert_dir``, ``ssl_version``, ``key_password`` are only used if :mod:`ssl`
    is available and are fed into :meth:`urllib3.util.ssl_wrap_socket` to upgrade
    the connection socket into an SSL socket.
    ÚhttpsNFrc Ks\tj||||||||||    |
f |Ž| |_| |_| |_||_||_||_||_||_    ||_
dSr9) rEr4Úkey_fileÚ    cert_fileÚ    cert_reqsÚ key_passwordÚca_certsÚ ca_cert_dirÚ ssl_versionÚassert_hostnameÚassert_fingerprint)r1r-r0rHrrWrNrXrLrYrZrËrÌrÍrÎrÏrÑrÒrÓrÐrUr2r2r3r4Ws0õ ôzHTTPSConnectionPool.__init__c
Cs@t|tƒr<|j|j|j|j|j|j|j|j    |j
d|j |_ |S)zˆ
        Prepare the ``connection`` for :meth:`urllib3.util.ssl_wrap_socket`
        and establish the tunnel if proxy is used.
        )rËrÎrÌrÍrÏrÐrÒrÓ) rIrÚset_certrËrÎrÌrÍrÏrÐrÒrÓrÑrar2r2r3Ú _prepare_connˆs
ø
z!HTTPSConnectionPool._prepare_conncCs | |j|j|j¡| ¡dS)zŒ
        Establish tunnel connection early, because otherwise httplib
        would improperly set Host: header to proxy's IP:port.
        N)Ú
set_tunnelr/r0rPÚconnectrar2r2r3rpœsz"HTTPSConnectionPool._prepare_proxyc
Csž|jd7_t d|j|j|jp$d¡|jr8|jtkr@tdƒ‚|j}|j}|jdk    rf|jj}|jj}|jf|||j    j
|j |j |j |jdœ|j—Ž}| |¡S)zB
        Return a fresh :class:`httplib.HTTPSConnection`.
        rz)Starting new HTTPS connection (%d): %s:%sÚ443zCCan't connect to HTTPS URL because the SSL module is not available.N)r-r0rrHrÌrËrÎ)rSr]r^r-r0r_rrrOrr`rHrÌrËrÎrUrÕ)r1Ú actual_hostÚ actual_portrbr2r2r3rc¤s8üÿ
ùø zHTTPSConnectionPool._new_conncs@tt|ƒ |¡t|ddƒs$| ¡|js<t d|jt    ¡dS)rnr~Nz¸Unverified HTTPS request is being made to host '%s'. Adding certificate verification is strongly advised. See: https://urllib3.readthedocs.io/en/latest/advanced-usage.html#ssl-warnings)
ÚsuperrÉrorhr×Ú is_verifiedÚwarningsÚwarnr-rra©Ú    __class__r2r3roÈs ýùz"HTTPSConnectionPool._validate_conn)r6rArBrCr,rr_r#r†r4rÕrprcroÚ __classcell__r2r2rßr3rÉBs4ì
1$rÉcKsRt|ƒ\}}}|pt |d¡}|dkr:t|fd|i|—ŽSt|fd|i|—ŽSdS)a€
    Given a url, return an :class:`.ConnectionPool` instance of its host.
 
    This is a shortcut for not having to parse out the scheme, host, and port
    of the url before creating an :class:`.ConnectionPool` instance.
 
    :param url:
        Absolute URL string that must include the scheme. Port is optional.
 
    :param \**kw:
        Passes additional parameters to the constructor of the appropriate
        :class:`.ConnectionPool`. Useful for specifying things like
        timeout, maxsize, headers, etc.
 
    Example::
 
        >>> conn = connection_from_url('http://google.com/')
        >>> r = conn.request('GET', '/')
    éPrÊr0N)r$rrerÉrE)r{Úkwr,r-r0r2r2r3Úconnection_from_urlÞs
räcCs.t||ƒ}| d¡r*| d¡r*|dd…}|S)z?
    Normalize hosts for comparisons and use with sockets.
    ú[ú]réÿÿÿÿ)Únormalize_hostrŸÚendswith)r-r,r2r2r3r'ús
 r')LÚ
__future__rruÚloggingr·rÝrˆrrŽrrvÚ
exceptionsrrrr    r
r r r rrrrrZpackages.ssl_match_hostnamerÚpackagesrZpackages.six.movesrr¦rrrrrrrr„rr®rZutil.connectionrZ util.requestr Z util.responser!Z
util.retryr"Z util.timeoutr#Zutil.urlr$r%r&r'rèr(Z
util.queuer)ÚmovesrQÚ    getLoggerr6r]Úobjectrqr*ÚEAGAINÚ EWOULDBLOCKrxrErÉrär2r2r2r3Ú<module>sF <   $            
) [