Current File : //usr/lib/python3/dist-packages/urllib3/__pycache__/__init__.cpython-312.pyc
�

�g��
��dZddlmZddlZddlZddlZddlmZddlmZddl	m
Z
ddlmZdd	l
mZdd
lmZmZmZddlmZmZddlmZmZmZdd
lmZmZddlmZddlm Z ddl!m"Z"	ddl#Z#e#jHjKd�s,ejLde#jH�d�ejN�n%e#jPdkre)de#jH�d���	ddl*Z*ejLde+d��dZ-dZ.eZdZ/ej`e1�jee��ejff			d%d�Z4[ejjdejld��ejjd ejnd��ejpfd&d!�Z9e�Z:dddddddd"dd#�																								d'd$�Z;y#e)$rY��wxYw#e,$rY��wxYw)(ze
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 zWurllib3 v2.0 only supports OpenSSL 1.1.1+, currently the 'ssl' module is compiled with z5. See: https://github.com/urllib3/urllib3/issues/3020)rrrz5. See: https://github.com/urllib3/urllib3/issues/2168z�'urllib3[secure]' extra is deprecated and will be removed in urllib3 v2.1.0. Read more in this issue: https://github.com/urllib3/urllib3/issues/2680�)�category�
stacklevelz(Andrey Petrov (andrey.petrov@shazow.net)�MIT)r
rrrrrrr�add_stderr_loggerr�disable_warningsrrr�requestrc��tjt�}tj�}|j	tj
d��|j
|�|j|�|jdt�|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)�level�logger�handlers   �2/usr/lib/python3/dist-packages/urllib3/__init__.pyrrZsj���
�
�x�
(�F��#�#�%�G�����*�*�+R�S�T�
���g��
�O�O�E��
�L�L�?��J��N��alwaysT)�append�defaultc�0�tjd|�y)z<
    Helper for quickly disabling all urllib3 warnings.
    �ignoreN)�warnings�simplefilter)rs r+rr{s��
���(�H�-r,��	�body�fields�headers�preload_content�decode_content�redirect�retries�timeout�jsonc	
�B�tj||||||||||	|
��S)aX
    A convenience, top-level request method. It uses a module-global ``PoolManager`` instance.
    Therefore, its side effects could be shared across dependencies relying on it.
    To avoid side effects create a new ``PoolManager`` instance and use it instead.
    The method does not accept low-level ``**urlopen_kw`` keyword arguments.
    r5)�
_DEFAULT_POOLr)�method�urlr6r7r8r9r:r;r<r=r>s           r+rr�s=��*� � ���
���'�%����
�!��r,)r(�int�returnz$logging.StreamHandler[typing.TextIO])rz
type[Warning]rD�None)rA�strrBrFr6z_TYPE_BODY | Noner7z_TYPE_FIELDS | Noner8ztyping.Mapping[str, str] | Noner9�bool | Noner:rGr;rGr<zRetry | bool | int | Noner=zTimeout | float | int | Noner>ztyping.Any | NonerDr)<�__doc__�
__future__rr�typingr2r�r�_base_connectionr�_collectionsr�_versionr	�connectionpoolr
rr�filepostr
r�poolmanagerrrr�responserr�util.requestr�
util.retryr�util.timeoutr�ssl�OPENSSL_VERSION�
startswith�warn�NotOpenSSLWarning�OPENSSL_VERSION_INFO�ImportError�urllib3_secure_extra�DeprecationWarning�ModuleNotFoundError�
__author__�__license__�__all__r r!r%�DEBUGrr3�SecurityWarning�InsecurePlatformWarning�HTTPWarningrr@r�r,r+�<module>rhs`���#��
����(�(�!�X�X�=�B�B�4�&��!�

�����)�)�*�5���
�
�
1�14�1D�1D�0G�HB�
B�
�(�(�		
�

�	!�	!�I�	-��
1�14�1D�1D�0G�HB�
B�
�	
����H�M�M�	9�$���8�
�������&����(��&�&�{�}�5�������)��*�����h�
� :� :�4�H�����i��!C�!C�D�Q�0:�/E�/E�.��
�
�#�"&�/3�#'�"&� �)-�,-�"�!��!�	�!��	!�

 �!�-�
!�!�!� �!��!�'�!�*�!��!��!��O�	��	��.�	��	�s$�*F2�F=�2F:�9F:�=G�G