hyb
2025-12-30 5e753a15ff53faab2261a53367e44d38caf87041
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
Ë
ñúhNãóÄ—ddlmZddlZddlZddlZddlmZmZddlm    Z    m
Z
m Z ddl m Z mZmZmZmZddlmZddlmZdd    lmZdd
lmZdd lmZdd lmZgd ¢Zej>e «Z!dZ"dZ#ejHde#«Z%dZ&ejHde&«Z'd„Z(ejRe(e%«ejRe(e%«dœZ*e    e
dœZ+Gd„de«Z,Gd„de,«Z-d„Z.y)é)Úabsolute_importNé)ÚHTTPHeaderDictÚRecentlyUsedContainer)ÚHTTPConnectionPoolÚHTTPSConnectionPoolÚport_by_scheme)ÚLocationValueErrorÚ MaxRetryErrorÚProxySchemeUnknownÚProxySchemeUnsupportedÚURLSchemeUnknown)Úsix)Úurljoin)ÚRequestMethods)Úconnection_requires_http_tunnel)ÚRetry)Ú    parse_url)Ú PoolManagerÚ ProxyManagerÚproxy_from_url)    Úkey_fileÚ    cert_fileÚ    cert_reqsÚca_certsÚ ssl_versionÚ ca_cert_dirÚ ssl_contextÚ key_passwordÚserver_hostname)Ú
key_schemeÚkey_hostÚkey_portÚ key_timeoutÚ key_retriesÚ
key_strictÚ    key_blockÚkey_source_addressÚ key_key_fileÚkey_key_passwordÚ key_cert_fileÚ key_cert_reqsÚ key_ca_certsÚkey_ssl_versionÚkey_ca_cert_dirÚkey_ssl_contextÚ key_maxsizeÚ key_headersÚ
key__proxyÚkey__proxy_headersÚkey__proxy_configÚkey_socket_optionsÚkey__socks_optionsÚkey_assert_hostnameÚkey_assert_fingerprintÚkey_server_hostnameÚPoolKey)rÚuse_forwarding_for_httpsÚ ProxyConfigcóΗ|j«}|dj«|d<|dj«|d<dD],}||vsŒ||€Œt||j««||<Œ.|j    d«}|t |«|d<t |j««D]}|j|«|d|z<Œ|jD] }||vsŒd||<Œ|di|¤ŽS)a÷
    Create a pool key out of a request context dictionary.
 
    According to RFC 3986, both the scheme and host are case-insensitive.
    Therefore, this function normalizes both before constructing the pool
    key for an HTTPS request. If you wish to change this behaviour, provide
    alternate callables to ``key_fn_by_scheme``.
 
    :param key_class:
        The class to use when constructing the key. This should be a namedtuple
        with the ``scheme`` and ``host`` keys at a minimum.
    :type  key_class: namedtuple
    :param request_context:
        A dictionary-like object that contain the context for a request.
    :type  request_context: dict
 
    :return: A namedtuple that can be used as a connection pool key.
    :rtype:  PoolKey
    ÚschemeÚhost)ÚheadersÚ_proxy_headersÚ_socks_optionsNÚsocket_optionsÚkey_©)
ÚcopyÚlowerÚ    frozensetÚitemsÚgetÚtupleÚlistÚkeysÚpopÚ_fields)Ú    key_classÚrequest_contextÚcontextÚkeyÚ socket_optsÚfields      úRH:\Change_password\venv_build\Lib\site-packages\pip/_vendor/urllib3/poolmanager.pyÚ_default_key_normalizerrXOs€ð*×"Ñ"Ó$€GØ Ñ)×/Ñ/Ó1€GˆHÑØ˜f‘o×+Ñ+Ó-€GˆFOð?ò;ˆØ 'Š>˜g c™lÑ6Ü$ W¨S¡\×%7Ñ%7Ó%9Ó:ˆGCŠLð;ð —+‘+Ð.Ó/€KØÐÜ$)¨+Ó$6ˆÐ Ñ!ôG—L‘L“NÓ#ò1ˆØ '§ ¡ ¨CÓ 0ˆ˜‘ Òð1ð×"Ñ"ò"ˆØ ˜Ò Ø!ˆGEŠNð"ñ Ñ wÑ Ðó©ÚhttpÚhttpscór—eZdZdZdZdZdd„Zd„Zd„Zdd„Z    d„Z
dd„Z d    „Z dd
„Z dd „Zd „Zd „Zd„Zdd„Zy)ra$
    Allows for arbitrary requests while transparently keeping track of
    necessary connection pools for you.
 
    :param num_pools:
        Number of connection pools to cache before discarding the least
        recently used pool.
 
    :param headers:
        Headers to include with all requests, unless other headers are given
        explicitly.
 
    :param \**connection_pool_kw:
        Additional parameters are used to create fresh
        :class:`urllib3.connectionpool.ConnectionPool` instances.
 
    Example::
 
        >>> manager = PoolManager(num_pools=2)
        >>> r = manager.request('GET', 'http://google.com/')
        >>> r = manager.request('GET', 'http://google.com/mail')
        >>> r = manager.request('GET', 'http://yahoo.com/')
        >>> len(manager.pools)
        2
 
    Nc ó¦—tj||«||_t|«|_t
|_t j«|_y©N)rÚ__init__Úconnection_pool_kwrÚpoolsÚpool_classes_by_schemeÚkey_fn_by_schemerG)ÚselfÚ    num_poolsrAras    rWr`zPoolManager.__init__«sA€Ü×Ñ  gÔ.Ø"4ˆÔÜ*¨9Ó5ˆŒ
ô'=ˆÔ#Ü 0× 5Ñ 5Ó 7ˆÕrYcó—|Sr_rF©res rWÚ    __enter__zPoolManager.__enter__µs€Øˆ rYcó$—|j«y)NF)Úclear)reÚexc_typeÚexc_valÚexc_tbs    rWÚ__exit__zPoolManager.__exit__¸s€Ø 
‰
Œ àrYcóâ—|j|}|€|jj«}dD]}|j|d«Œ|dk(rtD]}|j|d«Œ|||fi|¤ŽS)aÎ
        Create a new :class:`urllib3.connectionpool.ConnectionPool` based on host, port, scheme, and
        any additional pool keyword arguments.
 
        If ``request_context`` is provided, it is provided as keyword arguments
        to the pool class used. This method is used to actually create the
        connection pools handed out by :meth:`connection_from_url` and
        companion methods. It is intended to be overridden for customization.
        N)r?r@Úportr[)rcrarGrOÚ SSL_KEYWORDS)rer?r@rqrRÚpool_clsrTÚkws        rWÚ    _new_poolzPoolManager._new_pool½sŒ€ð×.Ñ.¨vÑ6ˆØ Ð "Ø"×5Ñ5×:Ñ:Ó<ˆOð .ò    +ˆCØ × Ñ   TÕ *ð    +ð VÒ Ü"ò .Ø×#Ñ# B¨Õ-ð .ñ˜˜dÑ6 oÑ6Ð6rYcó8—|jj«y)z´
        Empty our store of pools and direct them all to close.
 
        This will not affect in-flight connections, but they will not be
        re-used after completion.
        N)rbrkrhs rWrkzPoolManager.clearØs€ð     
‰
×ÑÕrYcóؗ|s td«‚|j|«}|xsd|d<|s'tj|dj    «d«}||d<||d<|j |«S)a¤
        Get a :class:`urllib3.connectionpool.ConnectionPool` based on the host, port, and scheme.
 
        If ``port`` isn't given, it will be derived from the ``scheme`` using
        ``urllib3.connectionpool.port_by_scheme``. If ``pool_kwargs`` is
        provided, it is merged with the instance's ``connection_pool_kw``
        variable and used to create the new connection pool, if one is
        needed.
        zNo host specified.r[r?éPrqr@)r
Ú_merge_pool_kwargsr    rKrHÚconnection_from_context)rer@rqr?Ú pool_kwargsrRs      rWÚconnection_from_hostz PoolManager.connection_from_hostász€ñÜ$Ð%9Ó:Ð :à×1Ñ1°+Ó>ˆØ$*Ò$4¨fˆ˜Ñ!ÙÜ!×%Ñ% o°hÑ&?×&EÑ&EÓ&GÈÓLˆDØ"&ˆ˜ÑØ"&ˆ˜Ñà×+Ñ+¨OÓ<Ð<rYcó®—|dj«}|jj|«}|s t|«‚||«}|j    ||¬«S)zù
        Get a :class:`urllib3.connectionpool.ConnectionPool` based on the request context.
 
        ``request_context`` must at least contain the ``scheme`` key and its
        value must be a key in ``key_fn_by_scheme`` instance variable.
        r?©rR)rHrdrKrÚconnection_from_pool_key)rerRr?Úpool_key_constructorÚpool_keys     rWrzz#PoolManager.connection_from_contextøs\€ð! Ñ*×0Ñ0Ó2ˆØ#×4Ñ4×8Ñ8¸Ó@ÐÙ#Ü" 6Ó*Ð *Ù'¨Ó8ˆà×,Ñ,¨XÀÐ,ÓWÐWrYcó—|jj5|jj|«}|r |cddd«S|d}|d}|d}|j||||¬«}||j|<ddd«|S#1swYSxYw)a
        Get a :class:`urllib3.connectionpool.ConnectionPool` based on the provided pool key.
 
        ``pool_key`` should be a namedtuple that only contains immutable
        objects. At a minimum it must have the ``scheme``, ``host``, and
        ``port`` fields.
        Nr?r@rqr~)rbÚlockrKru)rerrRÚpoolr?r@rqs       rWrz$PoolManager.connection_from_pool_keys•€ðZ‰Z_‰_ñ     (ð—:‘:—>‘> (Ó+ˆDÙØ÷     (ñ     (ð% XÑ.ˆFØ" 6Ñ*ˆDØ" 6Ñ*ˆDØ—>‘> &¨$°Ào>ÓVˆDØ#'ˆDJ‰JxÑ  ÷     (ðˆ ÷     (ðˆ ús—A=Á3A=Á=Bcó~—t|«}|j|j|j|j|¬«S)aÖ
        Similar to :func:`urllib3.connectionpool.connection_from_url`.
 
        If ``pool_kwargs`` is not provided and a new pool needs to be
        constructed, ``self.connection_pool_kw`` is used to initialize
        the :class:`urllib3.connectionpool.ConnectionPool`. If ``pool_kwargs``
        is provided, it is used instead. Note that if a new pool does not
        need to be created for the request, the provided ``pool_kwargs`` are
        not used.
        )rqr?r{)rr|r@rqr?)reÚurlr{Úus    rWÚconnection_from_urlzPoolManager.connection_from_urls:€ô c‹NˆØ×(Ñ(Ø F‰F˜Ÿ™¨¯©¸kð)ó
ð    
rYcó¤—|jj«}|r$|j«D]\}}|€    ||=Œ |||<Œ|S#t$rYŒ!wxYw)a
        Merge a dictionary of override values for self.connection_pool_kw.
 
        This does not modify self.connection_pool_kw and returns a new dict.
        Any keys in the override dictionary with a value of ``None`` are
        removed from the merged dictionary.
        )rarGrJÚKeyError)reÚoverrideÚbase_pool_kwargsrTÚvalues     rWryzPoolManager._merge_pool_kwargs/sq€ð ×2Ñ2×7Ñ7Ó9ÐÙ Ø&Ÿn™nÓ.ò 2‘
Uؐ=ðØ,¨SÑ1ð-2Ð$ SÒ)ð 2ð Ðøô    $òÙðús¶AÁ    AÁAcót—|j€yt|j|j|j« S)z³
        Indicates if the proxy requires the complete destination URL in the
        request.  Normally this is only needed when not using an HTTP CONNECT
        tunnel.
        F)ÚproxyrÚ proxy_configr?)reÚ
parsed_urls  rWÚ!_proxy_requires_url_absolute_formz-PoolManager._proxy_requires_url_absolute_formCs:€ð :‰:Ð Øä2Ø J‰J˜×)Ñ)¨:×+<Ñ+<ó
ð
ð    
rYcóÀ—|j|dk7ry|jjdk7rytjr"|jj
s t d«‚yy)z
        Validates that were not attempting to do TLS in TLS connections on
        Python2 or with unsupported SSL implementations.
        Nr\zfContacting HTTPS destinations through HTTPS proxies 'via CONNECT tunnels' is not supported in Python 2)rr?rÚPY2rr<r )reÚ
url_schemes  rWÚ$_validate_proxy_scheme_url_selectionz0PoolManager._validate_proxy_scheme_url_selectionPs]€ð
:‰:Ð  ¨wÒ!6Ø à :‰:× Ñ  Ò 'Ø ä 7Š7˜4×,Ñ,×EÒEÜ(ðEóð ðFˆ7rYc ó²—t|«}|j|j«|j|j|j
|j¬«}d|d<d|d<d|vr|j j«|d<|j|«r|j||fi|¤Ž}n|j||jfi|¤Ž}|xr|j«}|s|St||«}|jdk(r&d}d|d    <t|d«j«|d<|j!d
«}    t#|    t$«st%j&|    |¬ «}    |    j(rk|j+|«sZt-t/j0|d««}
|
D]4} | j3«|    j(vsŒ |dj5| d«Œ6    |    j7||||¬ «}    |    |d
<||d<t>jAd ||«|j=«|j||fi|¤ŽS#t8$r"|    j:r|j=«‚|cYSwxYw)aN
        Same as :meth:`urllib3.HTTPConnectionPool.urlopen`
        with custom cross-host redirect logic and only sends the request-uri
        portion of the ``url``.
 
        The given ``url`` parameter must be absolute, such that an appropriate
        :class:`urllib3.connectionpool.ConnectionPool` can be chosen for it.
        )rqr?FÚassert_same_hostÚredirectrAi/ÚGETNÚbodyÚretries)r™)ÚresponseÚ_poolzRedirecting %s -> %s)!rr–r?r|r@rqrArGr’ÚurlopenÚ request_uriÚget_redirect_locationrÚstatusrÚ_prepare_for_method_changerKÚ
isinstancerÚfrom_intÚremove_headers_on_redirectÚ is_same_hostrMrÚiterkeysrHrOÚ    incrementr Úraise_on_redirectÚ
drain_connÚlogÚinfo) reÚmethodr†r™rtr‡ÚconnrÚredirect_locationrœrAÚheaders             rWrŸzPoolManager.urlopenas?€ô c‹NˆØ ×1Ñ1°!·(±(Ô;à×(Ñ(¨¯©°a·f±fÀQÇXÁXÐ(ÓNˆà!&ˆÐ ÑØˆˆ:‰à ˜BÑ Ø ŸL™L×-Ñ-Ó/ˆBˆy‰Mà × 1Ñ 1°!Ô 4Ø#t—|‘| F¨CÑ6°2Ñ6‰Hà#t—|‘| F¨A¯M©MÑ@¸RÑ@ˆHà$ÒI¨×)GÑ)GÓ)IÐ٠؈Oô$ CÐ):Ó;Ðà ?‰?˜cÒ !àˆFàˆBˆv‰JÜ*¨2¨i©=Ó9×TÑTÓVˆBˆy‰Mà—&‘&˜Ó#ˆÜ˜'¤5Ô)Ü—n‘n W°xÔ@ˆGð
× -Ò -°d×6GÑ6GØ ô7
ôœ3Ÿ<™<¨¨9© Ó6Ó7ˆGØ!ò 4Ø—<‘<“> W×%GÑ%GÒGؐy‘M×%Ñ% f¨dÕ3ð 4ð    Ø×'Ñ'¨°¸hÈdÐ'ÓSˆG𠈈9‰ Ø!ˆˆ:‰ä ‰Ð'¨Ð.?Ô@à×ÑÔØˆt|‰|˜FÐ$5Ñ<¸Ñ<Ð<øôò    Ø×(Ò(Ø×#Ñ#Ô%ØØŠOð        úsÇH+È+(IÉI)é
Nr_©Nr[N©T)Ú__name__Ú
__module__Ú __qualname__Ú__doc__rrr`rirorurkr|rzrrˆryr’r–rŸrFrYrWrrŒsV„ñð6 €EØ€Ló8òòó
7ò6ó=ò. Xóó0
ò  ò( 
òô"D=rYrcóN‡—eZdZdZ                    dˆfd„    Zdˆfd„    Zdd„Zd    ˆfd„    ZˆxZS)
ra>
    Behaves just like :class:`PoolManager`, but sends all requests through
    the defined proxy, using the CONNECT method for HTTPS URLs.
 
    :param proxy_url:
        The URL of the proxy to be used.
 
    :param proxy_headers:
        A dictionary containing headers that will be sent to the proxy. In case
        of HTTP they are being sent with each request, while in the
        HTTPS/CONNECT case they are sent only once. Could be used for proxy
        authentication.
 
    :param proxy_ssl_context:
        The proxy SSL context is used to establish the TLS connection to the
        proxy when using HTTPS proxies.
 
    :param use_forwarding_for_https:
        (Defaults to False) If set to True will forward requests to the HTTPS
        proxy to be made on behalf of the client instead of creating a TLS
        tunnel via the CONNECT method. **Enabling this flag means that request
        and response headers and content will be visible from the HTTPS proxy**
        whereas tunneling keeps request and response headers and content
        private.  IP address, target hostname, SNI, and port are always visible
        to an HTTPS proxy even when this flag is disabled.
 
    Example:
        >>> proxy = urllib3.ProxyManager('http://localhost:3128/')
        >>> r1 = proxy.request('GET', 'http://google.com/')
        >>> r2 = proxy.request('GET', 'http://httpbin.org/')
        >>> len(proxy.pools)
        1
        >>> r3 = proxy.request('GET', 'https://httpbin.org/')
        >>> r4 = proxy.request('GET', 'https://twitter.com/')
        >>> len(proxy.pools)
        3
 
    c ó"•—t|t«r&d|j|j|jfz}t |«}|jdvrt |j«‚|js2tj|jd«}    |j|    ¬«}||_
|xsi|_ ||_ t||«|_|j|d<|j|d<|j|d<tt |F||fi|¤Žy)Nz
%s://%s:%irZrx)rqÚ_proxyrBÚ _proxy_config)r¤rr?r@rqrr r    rKÚ_replacerÚ proxy_headersÚproxy_ssl_contextr=rÚsuperrr`) reÚ    proxy_urlrfrAr¾r¿r<rarrqÚ    __class__s           €rWr`zProxyManager.__init__Ðsø€ô iÔ!3Ô 4Ø$Ø× Ñ Ø—‘Ø—‘ð(ñˆIô
˜)Ó$ˆà <‰<Ð0Ñ 0Ü$ U§\¡\Ó2Ð 2àzŠzÜ!×%Ñ% e§l¡l°BÓ7ˆDØ—N‘N¨NÓ-ˆEàˆŒ
Ø*Ò0¨bˆÔØ!2ˆÔÜ'Ð(9Ð;SÓTˆÔà'+§z¡zИ8Ñ$Ø/3×/AÑ/AÐÐ+Ñ,Ø.2×.?Ñ.?И?Ñ+ä Œl˜DÑ*¨9°gÑTÐASÓTrYcóâ•—|dk(rtt| ||||¬«Stt| |jj|jj
|jj |¬«S)Nr\)r{)rÀrr|rr@rqr?)rer@rqr?r{rÂs     €rWr|z!ProxyManager.connection_from_hostõslø€Ø WÒ Üœ tÑAؐd˜F° ðBóð ô”\ 4Ñ=Ø J‰JO‰O˜TŸZ™ZŸ_™_¨d¯j©j×.?Ñ.?È[ð>ó
ð    
rYcól—ddi}t|«j}|r||d<|r|j|«|S)z
        Sets headers needed by proxies: specifically, the Accept and Host
        headers. Only sets headers not provided by the user.
        ÚAcceptz*/*ÚHost)rÚnetlocÚupdate)rer†rAÚheaders_rÇs     rWÚ_set_proxy_headerszProxyManager._set_proxy_headersÿs>€ð
˜eÐ$ˆä˜3“×&Ñ&ˆÙ Ø%ˆHVÑ á Ø O‰O˜GÔ $؈rYc ó•—t|«}t|j|j|j«s1|j d|j «}|j||«|d<tt|*||fd|i|¤ŽS)z@Same as HTTP(S)ConnectionPool.urlopen, ``url`` must be absolute.rAr™) rrrrr?rKrArÊrÀrrŸ)rer®r†r™rtr‡rArÂs       €rWrŸzProxyManager.urlopensqø€ä c‹NˆÜ.¨t¯z©z¸4×;LÑ;LÈaÏhÉhÔWð—f‘f˜Y¨¯ © Ó5ˆGØ ×3Ñ3°C¸ÓAˆBˆy‰Mä”\ 4Ñ0°¸ÑVÀxÐVÐSUÑVÐVrY)r²NNNFr³r_r´)    rµr¶r·r¸r`r|rÊrŸÚ __classcell__)rÂs@rWrr¨s7ø„ñ%ðTØØØØ!&õ#UõJ
ó ÷
Wñ
WrYrc ó—tdd|i|¤ŽS)NrÁrF)r)r†rts  rWrrs€Ü Ñ , #Ð ,¨Ñ ,Ð,rY)/Ú
__future__rÚ collectionsÚ    functoolsÚloggingÚ _collectionsrrÚconnectionpoolrrr    Ú
exceptionsr
r r r rÚpackagesrÚpackages.six.moves.urllib.parserÚrequestrÚ
util.proxyrÚ
util.retryrÚutil.urlrÚ__all__Ú    getLoggerrµr¬rrÚ _key_fieldsÚ
namedtupler;Ú_proxy_config_fieldsr=rXÚpartialrdrcrrrrFrYrWú<module>rásùðÝ&ãÛÛç?ßSÑS÷õõÝ4Ý#Ý7ÝÝâ
;€ð€g×јÓ!€ð
€ ð€ ð> !ˆ+×
 Ñ
  ¨KÓ
8€àBÐØ$ˆk×$Ñ$ ]Ð4HÓI€ ò. ðl ˆI× Ñ Ð5°wÓ ?Ø ˆY× Ñ Ð6¸Ó @ñÐð
#5Ð?RÑSÐôY=.ôY=ôxpW;ôpWóf-rY