관리-도구
편집 파일: connectionpool.cpython-311.pyc
� �ReӒ � �< � 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#jA jB ZB ejC eD� � ZE eF� � ZG G d� deF� � ZHejI ejJ hZK G d� deHe)� � ZL G d� deL� � ZMd� ZNd� Z=dS )� )�absolute_importN)�error��timeout� )�BaseSSLError�BrokenPipeError�DummyConnection�HTTPConnection� HTTPException�HTTPSConnection�VerifiedHTTPSConnection�port_by_scheme) �ClosedPoolError�EmptyPoolError�HeaderParsingError�HostChangedError�InsecureRequestWarning�LocationValueError� MaxRetryError�NewConnectionError� ProtocolError� ProxyError�ReadTimeoutError�SSLError�TimeoutError)�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 �: � e Zd ZdZdZeZdd�Zd� Zd� Z d� Z d� 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 � � |st d� � �t || j �� � | _ |� � � | _ || _ d S )NzNo host specified.��scheme)r r+ r2 �host�lower�_proxy_host�port)�selfr3 r6 s ��/builddir/build/BUILDROOT/alt-python311-pip-21.3.1-3.el8.x86_64/opt/alt/python311/lib/python3.11/site-packages/pip/_vendor/urllib3/connectionpool.py�__init__zConnectionPool.__init__J sJ � �� ;�$�%9�:�:�:�#�D���=�=�=�� ��:�:�<�<����� � � � c �P � t | � � j �d| j �d| j �d�S )Nz(host=z, port=�))�type�__name__r3 r6 �r7 s r8 �__str__zConnectionPool.__str__R s* � �)-�d���)<�)<�)<�d�i�i�i�����S�Sr: c � � | S �N� r? s r8 � __enter__zConnectionPool.__enter__U s � ��r: c �. � | � � � dS )NF)�close)r7 �exc_type�exc_val�exc_tbs r8 �__exit__zConnectionPool.__exit__X s � �� � �����ur: c � � dS )�D Close all pooled connections and disable the pool. NrC r? s r8 rF zConnectionPool.close] � � � �r: rB )r>