U
    5r\Q                  	   @   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 n0 e	e
fk
rz   ed	ejeje Y nX z,dd
lmZ e  ddlmZ ee W n ek
r   Y nX 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-m.Z. ddl/m0Z0m1Z1 ddl2m3Z3 ddlm4Z4m5Z5m6Z6m7Z7m8Z8m9Z9m:Z:m;Z;m<Z< ddl=Z=ddl=m>Z> e=?e@Ae>  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
   >>> '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": {
       "key2": "value2",
       "key1": "value1"
     },
     ...
   }

The other HTTP methods are supported - see `requests.api`. Full documentation
is at <http://python-requests.org>.

:copyright: (c) 2017 by Kenneth Reitz.
:license: Apache 2.0, see LICENSE for more details.
    N   )RequestsDependencyWarningc                 C   s   |  d} | dgkstt| dkr.| d | \}}}t|t|t|  }}}|dks`t|dkslt|dksxt| dd d \}}}t|t|t|  }}}|dkst|dk st|dkstd S )	N.Zdev   0r            )splitAssertionError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   sX   zt tt| d} W n tk
r.   Y d S X | dddgk rTd| }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_cryptographyJ   s    
r   z?urllib3 ({}) or chardet ({}) doesn't match a supported version!)	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   )B__doc__Zurllib3Zchardetr   
exceptionsr   r   r   r   r   r   r   r   Zurllib3.contribr   Zinject_into_urllib3Zcryptographyr   ImportErrorZ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>   sL   # 
(,