# Stubs for http.cookiejar (Python 3.4)
#
# NOTE: This dynamically typed stub was automatically generated by stubgen.

from typing import Undefined, Any

class Cookie:
    version = Undefined(Any)
    name = Undefined(Any)
    value = Undefined(Any)
    port = Undefined(Any)
    port_specified = Undefined(Any)
    domain = Undefined(Any)
    domain_specified = Undefined(Any)
    domain_initial_dot = Undefined(Any)
    path = Undefined(Any)
    path_specified = Undefined(Any)
    secure = Undefined(Any)
    expires = Undefined(Any)
    discard = Undefined(Any)
    comment = Undefined(Any)
    comment_url = Undefined(Any)
    rfc2109 = Undefined(Any)
    def __init__(self, version, name, value, port, port_specified, domain, domain_specified,
                 domain_initial_dot, path, path_specified, secure, expires, discard, comment,
                 comment_url, rest, rfc2109=False): pass
    def has_nonstandard_attr(self, name): pass
    def get_nonstandard_attr(self, name, default=None): pass
    def set_nonstandard_attr(self, name, value): pass
    def is_expired(self, now=None): pass

class CookiePolicy:
    def set_ok(self, cookie, request): pass
    def return_ok(self, cookie, request): pass
    def domain_return_ok(self, domain, request): pass
    def path_return_ok(self, path, request): pass

class DefaultCookiePolicy(CookiePolicy):
    DomainStrictNoDots = Undefined(Any)
    DomainStrictNonDomain = Undefined(Any)
    DomainRFC2965Match = Undefined(Any)
    DomainLiberal = Undefined(Any)
    DomainStrict = Undefined(Any)
    netscape = Undefined(Any)
    rfc2965 = Undefined(Any)
    rfc2109_as_netscape = Undefined(Any)
    hide_cookie2 = Undefined(Any)
    strict_domain = Undefined(Any)
    strict_rfc2965_unverifiable = Undefined(Any)
    strict_ns_unverifiable = Undefined(Any)
    strict_ns_domain = Undefined(Any)
    strict_ns_set_initial_dollar = Undefined(Any)
    strict_ns_set_path = Undefined(Any)
    def __init__(self, blocked_domains=None, allowed_domains=None, netscape=True, rfc2965=False,
                 rfc2109_as_netscape=None, hide_cookie2=False, strict_domain=False,
                 strict_rfc2965_unverifiable=True, strict_ns_unverifiable=False,
                 strict_ns_domain=Undefined, strict_ns_set_initial_dollar=False,
                 strict_ns_set_path=False): pass
    def blocked_domains(self): pass
    def set_blocked_domains(self, blocked_domains): pass
    def is_blocked(self, domain): pass
    def allowed_domains(self): pass
    def set_allowed_domains(self, allowed_domains): pass
    def is_not_allowed(self, domain): pass
    def set_ok(self, cookie, request): pass
    def set_ok_version(self, cookie, request): pass
    def set_ok_verifiability(self, cookie, request): pass
    def set_ok_name(self, cookie, request): pass
    def set_ok_path(self, cookie, request): pass
    def set_ok_domain(self, cookie, request): pass
    def set_ok_port(self, cookie, request): pass
    def return_ok(self, cookie, request): pass
    def return_ok_version(self, cookie, request): pass
    def return_ok_verifiability(self, cookie, request): pass
    def return_ok_secure(self, cookie, request): pass
    def return_ok_expires(self, cookie, request): pass
    def return_ok_port(self, cookie, request): pass
    def return_ok_domain(self, cookie, request): pass
    def domain_return_ok(self, domain, request): pass
    def path_return_ok(self, path, request): pass

class Absent: pass

class CookieJar:
    non_word_re = Undefined(Any)
    quote_re = Undefined(Any)
    strict_domain_re = Undefined(Any)
    domain_re = Undefined(Any)
    dots_re = Undefined(Any)
    magic_re = Undefined(Any)
    def __init__(self, policy=None): pass
    def set_policy(self, policy): pass
    def add_cookie_header(self, request): pass
    def make_cookies(self, response, request): pass
    def set_cookie_if_ok(self, cookie, request): pass
    def set_cookie(self, cookie): pass
    def extract_cookies(self, response, request): pass
    def clear(self, domain=None, path=None, name=None): pass
    def clear_session_cookies(self): pass
    def clear_expired_cookies(self): pass
    def __iter__(self): pass
    def __len__(self): pass

class LoadError(OSError): pass

class FileCookieJar(CookieJar):
    filename = Undefined(Any)
    delayload = Undefined(Any)
    def __init__(self, filename=None, delayload=False, policy=None): pass
    def save(self, filename=None, ignore_discard=False, ignore_expires=False): pass
    def load(self, filename=None, ignore_discard=False, ignore_expires=False): pass
    def revert(self, filename=None, ignore_discard=False, ignore_expires=False): pass

class LWPCookieJar(FileCookieJar):
    def as_lwp_str(self, ignore_discard=True, ignore_expires=True): pass
    def save(self, filename=None, ignore_discard=False, ignore_expires=False): pass

class MozillaCookieJar(FileCookieJar):
    magic_re = Undefined(Any)
    header = Undefined(Any)
    def save(self, filename=None, ignore_discard=False, ignore_expires=False): pass
