o
    .jQ                  
   @  s  d Z ddlmZ ddlZddlZddlZddlmZ ddlmZ ddl	m
Z
 ddlmZmZ dd	lmZ dd
lmZmZ ddlmZ ddlmZ ddlmZ ddlmZmZ ddlmZ ddlmZm Z m!Z! ddl"m#Z#m$Z$mZ ddl%m&Z& ddl'm(Z( ddl)m*Z* ddl+m,Z,m-Z-mZ ddl.m/Z/m0Z0 ddl1m2Z2 ddl3m4Z4 ddl5m6Z6 dZ7dZ8eZdZ9e:e;<e  ej=fdGd!d"Z>[e?d#dduse?d$ddure@d%e
jA ejBd&e
jAd'd( ejBd)e
jCd'd( e
jDfdHd-d.ZEe, ZFdddd'd'd'dd/dd0	dIdEdFZGdS )Jze
Python HTTP library with thread-safe connection pooling, file post support, user-friendly, and more
    )annotationsN)NullHandler)environ   )
exceptions)AsyncHTTPConnectionPoolAsyncHTTPSConnectionPool)connection_from_url)AsyncPoolManagerAsyncProxyManager)proxy_from_url)AsyncHTTPResponse)HTTPHeaderDict)
_TYPE_BODY_TYPE_FIELDS)__version__)ConnectionInfoHttpVersionResponsePromise)HTTPConnectionPoolHTTPSConnectionPoolr	   )ResolverDescription)AsyncResolverDescription)encode_multipart_formdata)PoolManagerProxyManagerr   )BaseHTTPResponseHTTPResponse)make_headers)Retry)Timeoutz(Andrey Petrov (andrey.petrov@shazow.net)MIT)r   r   r   r   r   r   r   r    add_stderr_loggerr	   disable_warningsr   r   r   requestr   r   r   r   r   r   r   r   r   r
   r   async_proxy_from_urlasync_connection_from_urllevelintreturn$logging.StreamHandler[typing.TextIO]c                 C  sF   t t}t  }|t d || ||  |dt |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 r6   E/home/thesage/.local/lib/python3.10/site-packages/urllib3/__init__.pyr"   H   s   


r"   SSHKEYLOGFILE
QUICLOGDIRzurllib3.future detected that development/debug environment variable are set. If you are unaware of it please audit your environment. Variables 'SSHKEYLOGFILE' and 'QUICLOGDIR' can only be set in a non-production environment.alwaysT)appenddefaultcategorytype[Warning]Nonec                 C  s   t d|  dS )z<
    Helper for quickly disabling all urllib3 warnings.
    ignoreN)warningssimplefilter)r=   r6   r6   r7   r#   t   s   r#      	bodyfieldsheaderspreload_contentdecode_contentredirectretriestimeoutjsonmethodstrurlrE   _TYPE_BODY | NonerF   _TYPE_FIELDS | NonerG   typing.Mapping[str, str] | NonerH   bool | NonerI   rJ   rK   Retry | bool | int | NonerL   Timeout | float | int | NonerM   typing.Any | Noner   c       	         C  s    t j| |||||||||	|
dS )aF  
    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``.
    rD   )_DEFAULT_POOLr$   )rN   rP   rE   rF   rG   rH   rI   rJ   rK   rL   rM   r6   r6   r7   r$   ~   s   r$   )r'   r(   r)   r*   )r=   r>   r)   r?   )rN   rO   rP   rO   rE   rQ   rF   rR   rG   rS   rH   rT   rI   rT   rJ   rT   rK   rU   rL   rV   rM   rW   r)   r   )H__doc__
__future__r   r+   typingrA   r   osr    r   _async.connectionpoolr   r   r	   r&   _async.poolmanagerr
   r   r   r%   _async.responser   _collectionsr   _typingr   r   _versionr   backendr   r   r   connectionpoolr   r   contrib.resolverr   contrib.resolver._asyncr   filepostr   poolmanagerr   r   responser   r   util.requestr   
util.retryr   util.timeoutr    
__author____license____all__r,   r-   r1   DEBUGr"   getwarnSecurityWarningrB   InsecurePlatformWarningHTTPWarningr#   rX   r$   r6   r6   r6   r7   <module>   sl    