관리-도구
편집 파일: __init__.cpython-38.pyc
U )�e7 � @ s d Z ddlmZ ddlZddlZddlZddlZddlmZ ddlm Z ddl mZ ddlm Z dd lmZ dd lmZmZmZ ddlmZmZ ddlmZmZmZ dd lmZmZ ddlmZ ddl m!Z! ddl"m#Z# zddl$Z$W n e%k r� Y nHX e$j&�'d��s"e�(de$j&�d�e j)� ne$j*dk �r@e%de$j&�d���dZ+dZ,eZdZ-e�.e/��0e� � ej1fddd�dd�Z2[ej3de j4dd � ej3d!e j5dd � e j6fd"d#d$�d%d&�Z7e� Z8dddddddd'dd(� d)d)d*d+d,d-d-d-d.d/d0d1d2�d3d4�Z9ej:d5k�rdd6l;m<Z< e<� dS )7ze Python HTTP library with thread-safe connection pooling, file post support, user friendly, and more � )�annotationsN)�NullHandler� )� exceptions)� _TYPE_BODY)�HTTPHeaderDict)�__version__)�HTTPConnectionPool�HTTPSConnectionPool�connection_from_url)�_TYPE_FIELDS�encode_multipart_formdata)�PoolManager�ProxyManager�proxy_from_url)�BaseHTTPResponse�HTTPResponse)�make_headers)�Retry)�TimeoutzOpenSSL zUurllib3 v2 only supports OpenSSL 1.1.1+, currently the 'ssl' module is compiled with z5. See: https://github.com/urllib3/urllib3/issues/3020)r r r z5. See: https://github.com/urllib3/urllib3/issues/2168z(Andrey Petrov (andrey.petrov@shazow.net)�MIT)r r r r r r r r �add_stderr_loggerr �disable_warningsr r r �requestr �intz$logging.StreamHandler[typing.TextIO])�level�returnc C sF t �t�}t �� }|�t �d�� |�|� |�| � |�dt� |S )z� Helper for quickly adding a StreamHandler to the logger. Useful for debugging. Returns the handler after adding it. z%%(asctime)s %(levelname)s %(message)sz,Added a stderr logging handler to logger: %s) �logging� getLogger�__name__� StreamHandler�setFormatter� Formatter� addHandler�setLevel�debug)r �logger�handler� r( �>/opt/hc_python/lib/python3.8/site-packages/urllib3/__init__.pyr J s r �alwaysT)�append�defaultz type[Warning]�None)�categoryr c C s t �d| � dS )z< Helper for quickly disabling all urllib3 warnings. �ignoreN)�warnings�simplefilter)r. r( r( r) r k s r � � �body�fields�headers�preload_content�decode_content�redirect�retries�timeout�json�strz_TYPE_BODY | Nonez_TYPE_FIELDS | Noneztyping.Mapping[str, str] | Nonezbool | NonezRetry | bool | int | NonezTimeout | float | int | Noneztyping.Any | Noner )�method�urlr4 r5 r6 r7 r8 r9 r: r; r<