a
    Ba_-                  	   @   s  d Z ddlZddlZddlZddlmZ dd Zdd Zzeejej W n. e	e
fyx   ed	ejeje Y n0 z\zddlZW n ey   dZY n0 eed
dsddlmZ e  ddlmZ ee W n ey   Y n0 ddlmZ ede ddlmZmZmZmZ ddlmZmZmZmZ ddlmZ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)m*Z*m+Z+m,Z,m-Z-m.Z.m/Z/m0Z0 ddl1m2Z2m3Z3 ddl4m5Z5 ddlm6Z6m7Z7m8Z8m9Z9m:Z:m;Z;m<Z<m=Z=m>Z> ddl?Z?ddl?m@Z@ e?AeBCe@  ejde<dd dS )a  
Requests HTTP Library
~~~~~~~~~~~~~~~~~~~~~

Requests is an HTTP library, written in Python, for human beings.
Basic GET usage:

   >>> import requests
   >>> r = requests.get('https://www.python.org')
   >>> r.status_code
   200
   >>> b'Python is a programming language' in r.content
   True

... or POST:

   >>> payload = dict(key1='value1', key2='value2')
   >>> r = requests.post('https://httpbin.org/post', data=payload)
   >>> print(r.text)
   {
     ...
     "form": {
       "key1": "value1",
       "key2": "value2"
     },
     ...
   }

The other HTTP methods are supported - see `requests.api`. Full documentation
is at <https://requests.readthedocs.io>.

:copyright: (c) 2017 by Kenneth Reitz.
:license: Apache 2.0, see LICENSE for more details.
    N   )RequestsDependencyWarningc                 C   s   |  d} | dgksJ t| dkr.| d | \}}}t|t|t|  }}}|dks`J |dkslJ |dksxJ | dd d \}}}t|t|t|  }}}d	|||f  krd
k sn J d S )N.Zdev   0r            )r	   r   r   )   r   r   )splitlenappendint)Zurllib3_versionZchardet_versionmajorminorpatch r   3/usr/lib/python3/dist-packages/requests/__init__.pycheck_compatibility1   s    


r   c                 C   sT   zt tt| d} W n ty,   Y d S 0 | g dk rPd| }t|t d S )Nr   )r   r	      z4Old version of cryptography ({}) may cause slowdown.)	listmapr   r   
ValueErrorformatwarningswarnr   )cryptography_versionZwarningr   r   r   _check_cryptographyH   s    
r   z?urllib3 ({}) or chardet ({}) doesn't match a supported version!ZHAS_SNIF)	pyopenssl)__version__)DependencyWarningignore)	__title____description____url__r   )	__build__
__author____author_email____license__)__copyright____cake__)utils)packages)RequestResponsePreparedRequest)requestgetheadpostr   putdeleteoptions)sessionSession)codes)	RequestExceptionTimeoutURLRequiredTooManyRedirects	HTTPErrorConnectionErrorFileModeWarningConnectTimeoutReadTimeout)NullHandlerdefaultT)r   )D__doc__Zurllib3Zchardetr   
exceptionsr   r   r   r   AssertionErrorr   r   r   ZsslImportErrorgetattrZurllib3.contribr   Zinject_into_urllib3Zcryptographyr   Zurllib3.exceptionsr    simplefilterr"   r#   r$   r%   r&   r'   r(   r)   r*    r+   r,   Zmodelsr-   r.   r/   Zapir0   r1   r2   r3   r   r4   r5   r6   Zsessionsr7   r8   Zstatus_codesr9   r:   r;   r<   r=   r>   r?   r@   rA   rB   ZloggingrC   Z	getLogger__name__Z
addHandlerr   r   r   r   <module>   sT   #

(,