K iC"rUddlmZddlZddlZddlmZddlmZddlmZddl m Z m Z m Z ddl mZdd lmZdd lmZdd lmZmZdd lmZd dlmZmZmZmZd dlmZd dlmZm Z ejBrddlm"Z"m#Z#GddZ$Gdde$Z%ejBre$ddZ&de'd<e%ddZ(de'd<yy)) annotationsN) HTTPException)ResponseNotReady) _TYPE_BODY)HTTPConnection ProxyConfigport_by_scheme) TimeoutError)BaseHTTPResponse)_TYPE_SOCKET_OPTIONS)_DEFAULT_TIMEOUT _TYPE_TIMEOUT)Url) _RequestError _TimeoutError send_requestsend_streaming_request)EmscriptenRequest)EmscriptenHttpResponseWrapperEmscriptenResponse)BaseHTTPConnectionBaseHTTPSConnectionceZdZUedZded<ded<ded<ded <d ed <d ed <d ed<ded<ded<ded<dZded<dZded<ded< d*edddddd d+dZ d, d-d Z d.d!Z d/dd"d"d"d# d0d$Z d1d%Z d.d&Zed2d'Zed2d(Zed2d)Zy)3EmscriptenHTTPConnectionhttpztyping.ClassVar[int] default_portz%typing.ClassVar[_TYPE_SOCKET_OPTIONS]default_socket_optionsz None | floattimeoutstrhostintport blocksizetuple[str, int] | Nonesource_address_TYPE_SOCKET_OPTIONS | Nonesocket_options Url | NoneproxyProxyConfig | None proxy_configFbool is_verifiedNz bool | Noneproxy_is_verifiedzEmscriptenResponse | None _responsei )r r'r%r)r+r-c||_||_t|tr|nd|_d|_d|_d|_d|_d|_ ||_ d|_ d|_ d|_ y)NgrTF)r"r$ isinstancefloatr scheme_closedr1r+r-r%r'r)r/) selfr"r$r r'r%r)r+r-s k/mnt/ssd/data/python-lab/Trading/venv/lib/python3.12/site-packages/urllib3/contrib/emscripten/connection.py__init__z!EmscriptenHTTPConnection.__init__-si  ",We"rCrDrErFrequestkves r8rRz EmscriptenHTTPConnection.requestTs  >># [[MTYYKq > %0"&..NN**..  #$ $r:c d|_d|_y)NT)r6r1rAs r8closezEmscriptenHTTPConnection.closes r:c|jS)zWhether the connection either is brand new or has been previously closed. If this property is True then both ``is_connected`` and ``has_connected_to_proxy`` properties must be False. )r6rAs r8 is_closedz"EmscriptenHTTPConnection.is_closeds ||r:cy)zLWhether the connection is actively connected to any origin (proxy or target)Tr=rAs r8 is_connectedz%EmscriptenHTTPConnection.is_connectedsr:cy)zWhether the connection has successfully connected to its proxy. This returns False if no proxy is in use. Used to determine whether errors are coming from the proxy layer or from tunnelling to the target origin. Fr=rAs r8has_connected_to_proxyz/EmscriptenHTTPConnection.has_connected_to_proxys r:r)r"r!r$r#r rr'r&r%r#r)r(r+r*r-r,returnNone)rNr) r"r!r$ int | Noner>typing.Mapping[str, str] | Noner5r!rcrd)rcrd)NN)rKr!rJr!rQz_TYPE_BODY | Noner>rfrCr.rDr.rEr.rFr.rcrd)rcr )rcr.)__name__ __module__ __qualname__r r__annotations__r/r0rr9r?rBrRrYr[propertyr]r_rar=r:r8rrs)7)?L&?AA  I IN**// $$K%){)(( ! "2156: +/!!!  ! / !!4!!)! !<37    1       #'37 &2 $#'+&2&2&2 &2 1 &2&2&2&2!%&2 &2P%r:rceZdZUedZdZded<dZded<dZded<dZ ded <ded <ded <ded <d ed<dZ ded<dZ ded<dZ ded<ded<dZ ded< deddej ddddddddddddddddd dfdZ d ddZxZS)EmscriptenHTTPSConnectionhttpsNint | str | None cert_reqs str | Noneca_certs ca_cert_dirNone | str | bytes ca_cert_data cert_filekey_file key_passwordtyping.Any | None ssl_context ssl_versionressl_minimum_versionssl_maximum_version"None | str | typing.Literal[False]assert_hostnameassert_fingerprinti@)r r'r%r)r+r-rprrserver_hostnamerzrrrsrur|r}r{rvrwrxc t|||||||||d|_||_||_||_| |_| |_| |_| |_ ||_ ||_ ||_ |xrtjj||_|xrtjj||_||_d|_d|_y)N)r$r r'r%r)r+r-rnT)superr9r5rwrvrxrzrrrr{r|r}ospath expanduserrrrsrurpr/)r7r"r$r r'r%r)r+r-rprrrrzrrrsrur|r}r{rvrwrx __class__s r8r9z"EmscriptenHTTPSConnection.__init__s8  ))%     "(&.."4&#6 #6  ARWW%7%7%A &J277+=+=k+J( r:c yr<r=) r7rwrvrprxrrrrrsrus r8set_certz"EmscriptenHTTPSConnection.set_certs r:rb).r"r!r$r#r rr'r&r%r#r)zNone | _TYPE_SOCKET_OPTIONSr+r*r-r,rprorr~rrqrrqrzryrrrqrsrqrurtr|rer}rer{rorvrqrwrqrxrqrcrd) NNNNNNNNN)rwrqrvrqrprorxrqrrrqrr~rrqrsrqrurtrcrd)rgrhrir rrprjrrrsrur{r|r}rrrrr9r __classcell__)rs@r8rmrms?!'*L"&I&Hj"K"'+L$+""$(K!(&**&**77%) ) : "215  1 1 +/&*>B)-&*)-#"&+/*.*.(, $##'5: : :  : / : :  (: : ): $: <: ': $!: "'#: $%: & ': ()): *(+: ,(-: .&/: 01: 23: 4!5: 6 7: | $ $&*#'#>B)-"&+/      $  !    <  '     )     r:rmr_supports_http_protocolr_supports_https_protocol)) __future__rrtyping http.clientrr_base_connectionrrXrr r exceptionsr responser util.connectionr util.timeoutrrutil.urlrfetchrrrrrRrrr TYPE_CHECKINGrrrrmrrjrr=r:r8rs" 7(*EE&(3;UU&G KDDNY 8Y z 2J2q2Q/Q4MbRS4T1Tr: