3
Req @ s@ d Z ddlmZ ddlmZ ddlZddlmZ dd Zd d
Zyeej ej W n0 e
efk
r ejdj
ej ej e Y nX yvddlmZ esed
yddlZW n ek
r dZY nX eeddsddlmZ ej ddlm Z ee W n ek
r Y nX ddlmZ ejde ddl mZmZmZm Z ddl mZmZm Z m!Z! ddl m"Z"m#Z# ddl$m%Z% ddl$m&Z& ddl'm(Z(m)Z)m*Z* ddl+m,Z,m-Z-m.Z.m/Z/m0Z0m1Z1m2Z2m3Z3 ddl4m5Z5m6Z6 ddl7m8Z8 ddlm9Z9m:Z:m;Z;mZ>m?Z?m@Z@mAZA ddlBZBddlBmCZC eBjDeEjFeC ejde?d d! dS )"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 .
:copyright: (c) 2017 by Kenneth Reitz.
:license: Apache 2.0, see LICENSE for more details.
)urllib3)chardetN )RequestsDependencyWarningc C s | j d} | dgkstt| dkr.| jd | \}}}t|t|t| }}}|dks`t|dkslt|dksxt|j dd d \}}}t|t|t| }}}|dkst|dk st|dkstd S ) N.dev 0r )splitAssertionErrorlenappendint)urllib3_versionchardet_versionmajorminorpatch r /builddir/build/BUILDROOT/alt-python36-pip-20.2.4-5.el9.x86_64/opt/alt/python36/lib/python3.6/site-packages/pip/_vendor/requests/__init__.pycheck_compatibility1 s
r c C sV yt tt| jd} W n tk
r, d S X | dddgk rRdj| }tj|t d S )Nr r r z4Old version of cryptography ({}) may cause slowdown.) listmapr r
ValueErrorformatwarningswarnr )cryptography_versionwarningr r r _check_cryptographyJ s
r# z?urllib3 ({}) or chardet ({}) doesn't match a supported version!)WINDOWSz3pip internals: don't import cryptography on WindowsHAS_SNIF) pyopenssl)__version__)DependencyWarningignore) __title____description____url__r' ) __build__
__author____author_email____license__)
__copyright____cake__)utils)packages)RequestResponsePreparedRequest)requestgetheadpostr putdeleteoptions)sessionSession)codes) RequestExceptionTimeoutURLRequiredTooManyRedirects HTTPErrorConnectionErrorFileModeWarningConnectTimeoutReadTimeout)NullHandlerdefaultT)r )G__doc__pip._vendorr r r
exceptionsr r r# r' r r r r pip._internal.utils.compatr$ ImportErrorsslgetattrpip._vendor.urllib3.contribr&