o
    !h
                  
   @   s\  d Z ddlmZ ddlZddlmZ dZzddlmZ	 W n e
y'   dZ	Y nw dd Zd	d
 Zz	eeje	e W n eefyP   edeje	ee Y nw z:ddlmZ es^e
dzddlZW n e
yo   dZY nw eeddsddlmZ e  ddlmZ ee W n	 e
y   Y nw 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/m0Z0m1Z1m2Z2m3Z3m4Z4m5Z5 ddl6m7Z7m8Z8 ddl9m:Z: ddlm;Z;m<Z<m=Z=m>Z>m?Z?m@Z@mAZAmBZBmCZCmDZD ddlEZEddlEmFZF eEGeHIeF  ejdeAd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.
    )urllib3N   )RequestsDependencyWarning)__version__c                 C   s<  |  d} | dgksJ t| dkr| d | \}}}t|t|t|}}}|dks0J |dks6J |dks<J |rk| dd d \}}}t|t|t|}}}d	|||f  krfd
k siJ  J d S |r| dd d \}}}t|t|t|}}}d|||f  krdk sJ  J d S td)N.dev   0r            )r   r   r   )   r   r   )r   r   r   )r   r   r   z7You need either charset_normalizer or chardet installed)splitlenappendint	Exception)urllib3_versionchardet_versioncharset_normalizer_versionmajorminorpatch r   ?/usr/lib/python3/dist-packages/pip/_vendor/requests/__init__.pycheck_compatibility6   s$   


&&r   c                 C   sX   zt tt| d} W n
 ty   Y d S w | g dk r*d| }t|t d S 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_cryptographyT   s   
r%   zWurllib3 ({}) or chardet ({})/charset_normalizer ({}) doesn't match a supported version!)WINDOWSz3pip internals: don't import cryptography on Windows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   )J__doc__pip._vendorr   r!   
exceptionsr   r   pip._vendor.chardetr   r   ImportErrorr   r%   AssertionErrorr   r"   r    pip._internal.utils.compatr&   sslgetattrpip._vendor.urllib3.contribr(   inject_into_urllib3cryptographyr#   pip._vendor.urllib3.exceptionsr)   simplefilterr+   r,   r-   r.   r/   r0   r1   r2   r3    r4   r5   modelsr6   r7   r8   apir9   r:   r;   r<   r   r=   r>   r?   sessionsr@   rA   status_codesrB   rC   rD   rE   rF   rG   rH   rI   rJ   rK   rL   loggingrM   	getLogger__name__
addHandlerr   r   r   r   <module>   sl   #(0