/usr/lib/python3.9/site-packages/urllib3/__pycache__
NameSizeModeActions
connection.cpython-39.opt-1.pyc133270644editdlrm
connection.cpython-39.pyc133270644editdlrm
connectionpool.cpython-39.opt-1.pyc246710644editdlrm
connectionpool.cpython-39.pyc246710644editdlrm
exceptions.cpython-39.opt-1.pyc115980644editdlrm
exceptions.cpython-39.pyc115980644editdlrm
fields.cpython-39.opt-1.pyc81130644editdlrm
fields.cpython-39.pyc81130644editdlrm
filepost.cpython-39.opt-1.pyc27140644editdlrm
filepost.cpython-39.pyc27140644editdlrm
poolmanager.cpython-39.opt-1.pyc152330644editdlrm
poolmanager.cpython-39.pyc152330644editdlrm
request.cpython-39.opt-1.pyc55770644editdlrm
request.cpython-39.pyc55770644editdlrm
response.cpython-39.opt-1.pyc259890644editdlrm
response.cpython-39.pyc259890644editdlrm
_collections.cpython-39.opt-1.pyc112270644editdlrm
_collections.cpython-39.pyc112270644editdlrm
_version.cpython-39.opt-1.pyc1650644editdlrm
_version.cpython-39.pyc1650644editdlrm
__init__.cpython-39.opt-1.pyc21410644editdlrm
__init__.cpython-39.pyc21410644editdlrm
Edit: /usr/lib/python3.9/site-packages/urllib3/__pycache__/connection.cpython-39.pyc (13327B)
a sd#d$„Z?Gd%d&„d&e<ƒZ@e�se@Z=e=ZAdS)'é)Úabsolute_importN)Úerror)Útimeouté)Úsix)ÚHTTPConnection)Ú HTTPException)Úcreate_proxy_ssl_contextc@s eZdZdS)Ú BaseSSLErrorN©Ú__name__Ú __module__Ú __qualname__©rrú6/usr/lib/python3.9/site-packages/urllib3/connection.pyr sr c@s eZdZdS)ÚConnectionErrorNr rrrrr!src@s eZdZdS)ÚBrokenPipeErrorNr rrrrr*sr)ÚHTTPHeaderDict©Ú __version__)ÚConnectTimeoutErrorÚNewConnectionErrorÚSubjectAltNameWarningÚSystemTimeWarning)ÚCertificateErrorÚmatch_hostname)Ú SKIP_HEADERÚSKIPPABLE_HEADERSÚ connection)Úassert_fingerprintÚcreate_urllib3_contextÚresolve_cert_reqsÚresolve_ssl_versionÚssl_wrap_socketéPi»)ÚhttpÚhttpsiéé éz[^-!#$%&'*+.^_`|~0-9a-zA-Z]csšeZdZdZedZejejdfgZ dZ dd„Z e dd„ƒZ e jd d„ƒZ d d „Zd d „Zdd„Zdd„Zdd„Zdd„Zd‡fdd„ Zddd„Z‡ZS)ra5 Based on :class:`http.client.HTTPConnection` but provides an extra constructor backwards-compatibility layer between older and newer Pythons. Additional keyword parameters are used to configure attributes of the connection. Accepted parameters include: - ``strict``: See the documentation on :class:`urllib3.connectionpool.HTTPConnectionPool` - ``source_address``: Set the source address for the current connection. - ``socket_options``: Set specific options on the underlying socket. If not specified, then defaults are loaded from ``HTTPConnection.default_socket_options`` which includes disabling Nagle's algorithm (sets TCP_NODELAY to 1) unless the connection is behind a proxy. For example, if you wish to enable TCP Keep Alive in addition to the defaults, you might pass: .. code-block:: python HTTPConnection.default_socket_options + [ (socket.SOL_SOCKET, socket.SO_KEEPALIVE, 1), ] Or you may want to disable the defaults by passing an empty list (e.g., ``[]``). r%rFcOsftjs| dd¡| d¡|_| d|j¡|_| dd¡|_| dd¡|_t j |g|¢Ri|¤ŽdS)NÚstrictÚsource_addressÚsocket_optionsÚproxyÚ proxy_config) rZPY2ÚpopÚgetr*Údefault_socket_optionsr+r,r-Ú_HTTPConnectionÚ__init__)ÚselfÚargsÚkwrrrr2ns  zHTTPConnection.__init__cCs |j d¡S)aŸ Getter method to remove any trailing dots that indicate the hostname is an FQDN. In general, SSL certificates don't include the trailing dot indicating a fully-qualified domain name, and thus, they don't validate properly when checked against a domain name that includes the dot. In addition, some servers may not expect to receive the trailing dot when provided. However, the hostname with trailing dot is critical to DNS resolution; doing a lookup with the trailing dot will properly only resolve the appropriate FQDN, whereas a lookup without a trailing dot will search the system's search domain list. Thus, it's important to keep the original host around for use only in those cases where it's appropriate (i.e., when doing DNS lookup to establish the actual TCP connection across which we're going to send HTTP requests). Ú.)Ú _dns_hostÚrstrip©r3rrrÚhostszHTTPConnection.hostcCs ||_dS)z× Setter for the `host` property. We assume that only urllib3 uses the _dns_host attribute; httplib itself only uses `host`, and it seems reasonable that other libraries follow suit. N)r7)r3Úvaluerrrr:’sc Cs¤i}|jr|j|d<|jr$|j|d<z"tj|j|jf|jfi|¤Ž}WnXtynt|d|j |jfƒ‚Yn2t yž}zt |d|ƒ‚WYd}~n d}~00|S)zoEstablish a socket connection and set nodelay settings on it. :return: New socket connection. r*r+z0Connection to %s timed out. (connect timeout=%s)z(Failed to establish a new connection: %sN) r*r+rZcreate_connectionr7ÚportrÚ SocketTimeoutrr:Ú SocketErrorr)r3Zextra_kwÚconnÚerrrÚ _new_connœs.  ÿÿ   ÿþÿzHTTPConnection._new_conncCs t|ddƒS)NÚ _tunnel_host)Úgetattrr9rrrÚ_is_using_tunnel»szHTTPConnection._is_using_tunnelcCs ||_| ¡r| ¡d|_dS)Nr)ÚsockrDÚ_tunnelÚ auto_open©r3r?rrrÚ _prepare_conn¿szHTTPConnection._prepare_conncCs| ¡}| |¡dS©N)rArIrHrrrÚconnectÇszHTTPConnection.connectcOs>t |¡}|r"td|| ¡fƒ‚tj|||g|¢Ri|¤ŽS)ú zAMethod cannot contain non-token characters %r (found at least %r))Ú_CONTAINS_CONTROL_CHAR_REÚsearchÚ ValueErrorÚgroupr1Ú putrequest)r3ÚmethodÚurlr4ÚkwargsÚmatchrrrrQËs  ÿÿzHTTPConnection.putrequestcGs^tdd„|Dƒƒs(tj||g|¢RŽn2t | ¡¡tvrZtdd t t j t tƒƒ¡fƒ‚dS)rLcss |]}t|tƒo|tkVqdSrJ)Ú isinstanceÚstrr)Ú.0ÚvrrrÚ Úóz+HTTPConnection.putheader..z+urllib3.util.SKIP_HEADER only supports '%s'z', 'N) Úanyr1Ú putheaderrÚ ensure_strÚlowerrrOÚjoinÚmaprWÚtitleÚsorted)r3ÚheaderÚvaluesrrrr]ØsÿÿzHTTPConnection.putheaderNcsN|duri}n| ¡}ddd„|Dƒvr2tƒ|d<tt|ƒj||||d�dS)Nú user-agentcss|]}t | ¡¡VqdSrJ©rr^r_©rXÚkrrrrZèr[z)HTTPConnection.request..ú User-Agent)ÚbodyÚheaders)ÚcopyÚ_get_default_user_agentÚsuperrÚrequest)r3rRrSrkrl©Ú __class__rrrpâs  zHTTPConnection.requestcCs&|pi}tdd„|Dƒƒ}d|v}d|v}|j||||d�d|vrR| dtƒ¡| ¡D]\}} | || ¡qZd|vr„| d d ¡| ¡|d u�rtjtf} t || ƒr²|f}|D]`} | sÀq¶t | tƒsÔ|   d ¡} t t | ƒƒd d …} t |   ¡ƒ} | d7} | | 7} | d7} | | ¡q¶| d¡d S)zƒ Alternative to the common request method, which sends the body with chunked encoding and not as one block cSsg|]}t | ¡¡‘qSrrgrhrrrÚ òr[z2HTTPConnection.request_chunked..zaccept-encodingr:)Úskip_accept_encodingÚ skip_hostrfrjztransfer-encodingzTransfer-EncodingZchunkedNÚutf8és s0 )ÚsetrQr]rnÚitemsZ endheadersrZ string_typesÚbytesrVÚencodeÚhexÚlenÚ bytearrayÚsend)r3rRrSrkrlZ header_keysrtrurdr;Zstringish_typesÚchunkZlen_strZto_sendrrrÚrequest_chunkedìs<ÿ        zHTTPConnection.request_chunked)NN)NN)r r rÚ__doc__Úport_by_schemeÚ default_portÚsocketZ IPPROTO_TCPZ TCP_NODELAYr0Ú is_verifiedr2Úpropertyr:ÚsetterrArDrIrKrQr]rpr�Ú __classcell__rrrqrrKs"     rc @sjeZdZdZedZdZdZdZdZ dZ dZ dZ ddddde jddfdd„Zd dd„Zd d „Zd d „ZdS)ÚHTTPSConnectionz• Many of the parameters to this constructor are passed to the underlying SSL socket by means of :py:func:`urllib3.util.ssl_wrap_socket`. r&NFc KsDtj|||f||dœ| ¤Ž||_||_||_||_| |_d|_dS)N)r)rr&)rr2Úkey_fileÚ cert_fileÚ key_passwordÚ ssl_contextÚserver_hostnameZ _protocol) r3r:r<r‹rŒr�r)rrŽr�r5rrrr2$szHTTPSConnection.__init__c Csv|dur$|jdur|jj}ntdƒ}||_||_||_||_||_||_|oVt j   |¡|_ |oht j   |¡|_ | |_dS)zX This method should only be called once, before the connection is used. N)rŽÚ verify_moder!r‹rŒÚ cert_reqsr�Úassert_hostnamerÚosÚpathÚ expanduserÚca_certsÚ ca_cert_dirÚ ca_cert_data) r3r‹rŒr‘r�r–r’rr—r˜rrrÚset_cert>s  zHTTPSConnection.set_certc Cs| ¡}|j}d}| ¡rJ|jr0| ||¡}d}||_| ¡d|_|j}|}|j dur^|j }t j   ¡t k}|r‚t d t ¡t¡d}|jdur®d}tt|jƒt|jƒd�|_|j}t|jƒ|_|jsè|jsè|jsè|rèt|dƒrè| ¡t||j|j |j!|j|j|j|||d� |_|�r^|jdu�r^t|jdƒ�r^|j "¡d v�r^t d |j|j "¡ft#¡|j$�r~t$|jj%dd �|j$ƒnd|jt&j'k�rât(|d dƒ�sâ|j)du�râ|j %¡}| *d d¡�sÐt d |¡t+¡t,||j)�pÞ|ƒ|jt&j-k�pø|j$du|_.dS)NFTrzWSystem time is way off (before {0}). This will probably lead to SSL verification errors)Ú ssl_versionr‘Úload_default_certs) rEZkeyfileZcertfiler�r–r—r˜r�rŽÚ tls_in_tlsÚversion>ZTLSv1zTLSv1.1z±Negotiating TLSv1/TLSv1.1 by default is deprecated and will be disabled in urllib3 v2.0.0. Connecting to '%s' with '%s' can be enabled by explicitly opting-in with 'ssl_version')Z binary_formÚcheck_hostnameZsubjectAltNamerzëCertificate for {0} has no `subjectAltName`, falling back to check for a `commonName` for now. This feature is being removed by major browsers and deprecated by RFC 2818. (See https://github.com/urllib3/urllib3/issues/497 for details.))/rAr:rDÚtls_in_tls_requiredÚ_connect_tls_proxyrErFrGrBr�ÚdatetimeÚdateZtodayÚ RECENT_DATEÚwarningsÚwarnÚformatrrŽr r"ršr!r‘r�r–r—r˜Úhasattrr›r#r‹rŒr�r�ÚDeprecationWarningrZ getpeercertÚsslZ CERT_NONErCr’r/rÚ_match_hostnameZ CERT_REQUIREDr†) r3r?Úhostnamerœr�Z is_time_offZdefault_ssl_contextÚcontextÚcertrrrrK_s¶  ÿýû  þ ÿþýüûöÿþ ý üýûÿ ÿ þý ýù þzHTTPSConnection.connectcCsX|j}|j}|rt|||d�St|j|j|j|j|jƒ}d|_ t||j|j|j||d�S)zY Establish a TLS connection to the proxy using the provided SSL context. )rEr�rŽT)rEr–r—r˜r�rŽ) r-rŽr#r ršr‘r–r—r˜rž)r3r«r?r-rŽrrrr ×s0ýû úz"HTTPSConnection._connect_tls_proxy) NNNNNNNNN)r r rr‚rƒr„r‘r–r—r˜ršrrŸr…Z_GLOBAL_DEFAULT_TIMEOUTr2r™rKr rrrrrŠs<ö ö !xrŠc CsNzt||ƒWn:tyH}z"t d||¡||_‚WYd}~n d}~00dS)Nz@Certificate did not match expected hostname: %s. Certificate: %s)rrÚlogZwarningZ _peer_cert)r­Zasserted_hostnamer@rrrrªþsýrªcCsdtS)Nzpython-urllib3/%srrrrrrn srnc@seZdZdZdS)ÚDummyConnectionz-Used to detect a failed ConnectionCls import.N)r r rr‚rrrrr¯sr¯)BZ __future__rr¡Zloggingr“Úrer…r¤rr>rr=ZpackagesrZpackages.six.moves.http_clientrr1rZ util.proxyr r©ZSSLErrorr Ú ImportErrorÚAttributeErrorÚ BaseExceptionrÚ NameErrorÚ ExceptionrÚ _collectionsrÚ_versionrÚ exceptionsrrrrZpackages.ssl_match_hostnamerrÚutilrrrZ util.ssl_rr r!r"r#Z getLoggerr r®rƒr¢r£ÚcompilerMÚobjectrŠrªrnr¯ZVerifiedHTTPSConnectionrrrrÚs\              Jk