ok
Direktori : /opt/alt/python36/lib/python3.6/site-packages/pip/_vendor/requests/ |
Current File : //opt/alt/python36/lib/python3.6/site-packages/pip/_vendor/requests/cookies.pyo |
� Bu�_c @ 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( ( sM /opt/alt/python36/lib/python3.6/site-packages/pip/_vendor/requests/cookies.pyt __init__% s c C s | j S( N( R ( R ( ( sM /opt/alt/python36/lib/python3.6/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 ( ( sM /opt/alt/python36/lib/python3.6/site-packages/pip/_vendor/requests/cookies.pyt get_host- s c C s | j � S( N( R ( R ( ( sM /opt/alt/python36/lib/python3.6/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( ( sM /opt/alt/python36/lib/python3.6/site-packages/pip/_vendor/requests/cookies.pyt get_full_url3 s c C s t S( N( t True( R ( ( sM /opt/alt/python36/lib/python3.6/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( ( sM /opt/alt/python36/lib/python3.6/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( ( sM /opt/alt/python36/lib/python3.6/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( ( sM /opt/alt/python36/lib/python3.6/site-packages/pip/_vendor/requests/cookies.pyt add_headerJ s c C s | | j | <d S( N( R ( R R t value( ( sM /opt/alt/python36/lib/python3.6/site-packages/pip/_vendor/requests/cookies.pyt add_unredirected_headerN s c C s | j S( N( R ( R ( ( sM /opt/alt/python36/lib/python3.6/site-packages/pip/_vendor/requests/cookies.pyt get_new_headersQ s c C s | j � S( N( R ( R ( ( sM /opt/alt/python36/lib/python3.6/site-packages/pip/_vendor/requests/cookies.pyt unverifiableT s c C s | j � S( N( R ( R ( ( sM /opt/alt/python36/lib/python3.6/site-packages/pip/_vendor/requests/cookies.pyt origin_req_hostX s c C s | j � S( N( R ( R ( ( sM /opt/alt/python36/lib/python3.6/site-packages/pip/_vendor/requests/cookies.pyR \ s N( t __name__t __module__t __doc__R R R R R R R! t NoneR# R'