U
    ½b<                  
   @   sr  d Z ddlZddlZddlmZ zddlmZ W n ek
rH   dZY nX zddl	mZ
 W n ek
rr   dZ
Y nX dd Zdd	 Zzeeje
e W n0 eefk
r   ed
eje
ee Y nX z`zddlZW n ek
r   dZY nX eedds&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/m0Z0m1Z1m2Z2m3Z3 ddl4m5Z5m6Z6 ddl7m8Z8 ddlm9Z9m:Z:m;Z;m<Z<m=Z=m>Z>m?Z?m@Z@mAZAmBZB ddlCZCddlCmDZD eCEeFGeD  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   )RequestsDependencyWarning)__version__c                 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|r| dd d \}}}t|t|t|  }}}d	|||f  krd
k sn tnh|r2| dd d \}}}t|t|t|  }}}d|||f  kr*dk s:n tntdd S )N.dev   0r            )r   r   r   )   r   r   )r   r   r   )r   r   r   z7You need either charset_normalizer or chardet installed)splitAssertionErrorlenappendint	Exception)urllib3_versionchardet_versioncharset_normalizer_versionmajorminorpatch r   5/tmp/pip-unpacked-wheel-pr7jkl2n/requests/__init__.pycheck_compatibility9   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_versionwarningr   r   r   _check_cryptographyW   s    
r%   zWurllib3 ({}) or chardet ({})/charset_normalizer ({}) doesn't match a supported version!HAS_SNIF)	pyopenssl)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JSONDecodeError)NullHandlerdefaultT)r   )H__doc__urllib3r!   
exceptionsr   Zcharset_normalizerr   r   ImportErrorchardetr   r   r%   r   r   r"   r    sslgetattrZurllib3.contribr'   inject_into_urllib3Zcryptographyr#   Zurllib3.exceptionsr(   simplefilterr*   r+   r,   r-   r.   r/   r0   r1   r2    r3   r4   modelsr5   r6   r7   apir8   r9   r:   r;   r   r<   r=   r>   sessionsr?   r@   status_codesrA   rB   rC   rD   rE   rF   rG   rH   rI   rJ   rK   loggingrL   	getLogger__name__
addHandlerr   r   r   r   <module>   sf   #

  

(0