Viewing File: /opt/alt/python38/lib/python3.8/site-packages/urllib3/__pycache__/connectionpool.cpython-38.pyc
U
` @ s d dl mZ d dlZd dlZd dlZd dlZd dlZd dlmZ d dlm Z
ddlmZm
Z
mZmZmZmZmZmZ ddlmZmZmZmZmZmZmZmZmZmZmZm Z m!Z! ddl"m#Z# dd l$m%Z% dd
l&m'Z' ddl(m)Z) ddl*m+Z+ dd
l,m-Z- ddl.m/Z/ ddl0m1Z1 ddl2m3Z3 ddl4m5Z5 ddl6m7Z7 ddl8m9Z9 ddl:m;Z;m<Z< ddl:m=Z> ddl:m?Z?m@Z@ e#jAjBZBeCeDZEeF ZGG dd deFZHejIejJhZKG dd deHe)ZLG dd deLZMdd ZNdd Z=dS )! )absolute_importN)errortimeout )BaseSSLErrorBrokenPipeErrorDummyConnectionHTTPConnection
HTTPExceptionHTTPSConnectionVerifiedHTTPSConnectionport_by_scheme)
ClosedPoolErrorEmptyPoolErrorHeaderParsingErrorHostChangedErrorInsecureRequestWarningLocationValueError
MaxRetryErrorNewConnectionError
ProtocolError
ProxyErrorReadTimeoutErrorSSLErrorTimeoutError)six)queue)CertificateError)RequestMethods)HTTPResponse)is_connection_dropped)connection_requires_http_tunnel) LifoQueue)set_file_position)assert_header_parsing)Retry)Timeout)Url_encode_target)_normalize_host)get_host parse_urlc @ sB e Zd ZdZdZeZd
ddZdd Zdd Z d d
Z
dd ZdS )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.
Nc C s0 |st dt|| jd| _| | _|| _d S )NzNo host specified.scheme)r r* r/ hostlower_proxy_hostport)selfr0 r3 r5 G/opt/alt/python38/lib/python3.8/site-packages/urllib3/connectionpool.py__init__J s
zConnectionPool.__init__c C s dt | j| j| jf S )Nz%s(host=%r, port=%r))type__name__r0 r3 r4 r5 r5 r6 __str__R s zConnectionPool.__str__c C s | S Nr5 r: r5 r5 r6 __enter__U s zConnectionPool.__enter__c C s | dS )NF)close)r4 exc_typeZexc_valZexc_tbr5 r5 r6 __exit__X s zConnectionPool.__exit__c C s dS )D
Close all pooled connections and disable the pool.
Nr5 r: r5 r5 r6 r>