ó
ïRec @ sH d Z d d l Z d d l Z d d l Z d d l m Z d d l m Z m Z m Z m
Z
m Z y d d l Z Wn e
k
r‘ d d l Z n Xd e f d „ ƒ YZ d e f d „ ƒ YZ d
„ Z d „ Z e e d „ Z d
e f d „ ƒ YZ d e j e f d „ ƒ YZ d „ Z d „ Z d „ Z e e d „ Z d „ Z d S( s
requests.cookies
~~~~~~~~~~~~~~~~
Compatibility code to be able to use `cookielib.CookieJar` with requests.
requests.utils imports from here, so be careful with imports.
iÿÿÿÿNi ( t to_native_string( t cookielibt urlparset
urlunparset Morselt MutableMappingt MockRequestc B s¡ e Z d Z d „ Z d „ Z d „ Z d „ Z d „ Z d „ Z d „ Z d d „ Z d „ Z d
„ Z
d „ Z e d „ ƒ Z e d
„ ƒ Z e d „ ƒ Z RS( sò Wraps a `requests.Request` to mimic a `urllib2.Request`.
The code in `cookielib.CookieJar` expects this interface in order to correctly
manage cookie policies, i.e., determine whether a cookie can be set, given the
domains of the request and the cookie.
The original request object is read-only. The client is responsible for collecting
the new headers via `get_new_headers()` and interpreting them appropriately. You
probably want `get_cookie_header`, defined below.
c C s. | | _ i | _ t | j j ƒ j | _ d S( N( t _rt _new_headersR t urlt schemet type( t selft request( ( s‹ /builddir/build/BUILDROOT/alt-python27-pip-20.2.4-5.el8.x86_64/opt/alt/python27/lib/python2.7/site-packages/pip/_vendor/requests/cookies.pyt __init__% s c C s | j S( N( R ( R ( ( s‹ /builddir/build/BUILDROOT/alt-python27-pip-20.2.4-5.el8.x86_64/opt/alt/python27/lib/python2.7/site-packages/pip/_vendor/requests/cookies.pyt get_type* s c C s t | j j ƒ j S( N( R R R t netloc( R ( ( s‹ /builddir/build/BUILDROOT/alt-python27-pip-20.2.4-5.el8.x86_64/opt/alt/python27/lib/python2.7/site-packages/pip/_vendor/requests/cookies.pyt get_host- s c C s
| j ƒ S( N( R ( R ( ( s‹ /builddir/build/BUILDROOT/alt-python27-pip-20.2.4-5.el8.x86_64/opt/alt/python27/lib/python2.7/site-packages/pip/_vendor/requests/cookies.pyt get_origin_req_host0 s c C sx | j j j d ƒ s | j j St | j j d d d ƒ} t | j j ƒ } t | j | | j | j | j
| j g ƒ S( Nt Hostt encodings utf-8( R t headerst getR R R R R
t patht paramst queryt fragment( R t hostt parsed( ( s‹ /builddir/build/BUILDROOT/alt-python27-pip-20.2.4-5.el8.x86_64/opt/alt/python27/lib/python2.7/site-packages/pip/_vendor/requests/cookies.pyt get_full_url3 s
c C s t S( N( t True( R ( ( s‹ /builddir/build/BUILDROOT/alt-python27-pip-20.2.4-5.el8.x86_64/opt/alt/python27/lib/python2.7/site-packages/pip/_vendor/requests/cookies.pyt is_unverifiableA s c C s | | j j k p | | j k S( N( R R R ( R t name( ( s‹ /builddir/build/BUILDROOT/alt-python27-pip-20.2.4-5.el8.x86_64/opt/alt/python27/lib/python2.7/site-packages/pip/_vendor/requests/cookies.pyt
has_headerD s c C s% | j j j | | j j | | ƒ ƒ S( N( R R R R ( R R t default( ( s‹ /builddir/build/BUILDROOT/alt-python27-pip-20.2.4-5.el8.x86_64/opt/alt/python27/lib/python2.7/site-packages/pip/_vendor/requests/cookies.pyt
get_headerG s c C s t d ƒ ‚ d S( sM cookielib has no legitimate use for this method; add it back if you find one.s= Cookie headers should be added with add_unredirected_header()N( t NotImplementedError( R t keyt val( ( s‹ /builddir/build/BUILDROOT/alt-python27-pip-20.2.4-5.el8.x86_64/opt/alt/python27/lib/python2.7/site-packages/pip/_vendor/requests/cookies.pyt
add_headerJ s c C s | | j |