|
| 1 | +# Stubs for cookielib (Python 2) |
| 2 | +# |
| 3 | +# NOTE: This dynamically typed stub was automatically generated by stubgen. |
| 4 | + |
| 5 | +from typing import Any |
| 6 | + |
| 7 | +class Cookie: |
| 8 | + version = ... # type: Any |
| 9 | + name = ... # type: Any |
| 10 | + value = ... # type: Any |
| 11 | + port = ... # type: Any |
| 12 | + port_specified = ... # type: Any |
| 13 | + domain = ... # type: Any |
| 14 | + domain_specified = ... # type: Any |
| 15 | + domain_initial_dot = ... # type: Any |
| 16 | + path = ... # type: Any |
| 17 | + path_specified = ... # type: Any |
| 18 | + secure = ... # type: Any |
| 19 | + expires = ... # type: Any |
| 20 | + discard = ... # type: Any |
| 21 | + comment = ... # type: Any |
| 22 | + comment_url = ... # type: Any |
| 23 | + rfc2109 = ... # type: Any |
| 24 | + 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): ... |
| 25 | + def has_nonstandard_attr(self, name): ... |
| 26 | + def get_nonstandard_attr(self, name, default=None): ... |
| 27 | + def set_nonstandard_attr(self, name, value): ... |
| 28 | + def is_expired(self, now=None): ... |
| 29 | + |
| 30 | +class CookiePolicy: |
| 31 | + def set_ok(self, cookie, request): ... |
| 32 | + def return_ok(self, cookie, request): ... |
| 33 | + def domain_return_ok(self, domain, request): ... |
| 34 | + def path_return_ok(self, path, request): ... |
| 35 | + |
| 36 | +class DefaultCookiePolicy(CookiePolicy): |
| 37 | + DomainStrictNoDots = ... # type: Any |
| 38 | + DomainStrictNonDomain = ... # type: Any |
| 39 | + DomainRFC2965Match = ... # type: Any |
| 40 | + DomainLiberal = ... # type: Any |
| 41 | + DomainStrict = ... # type: Any |
| 42 | + netscape = ... # type: Any |
| 43 | + rfc2965 = ... # type: Any |
| 44 | + rfc2109_as_netscape = ... # type: Any |
| 45 | + hide_cookie2 = ... # type: Any |
| 46 | + strict_domain = ... # type: Any |
| 47 | + strict_rfc2965_unverifiable = ... # type: Any |
| 48 | + strict_ns_unverifiable = ... # type: Any |
| 49 | + strict_ns_domain = ... # type: Any |
| 50 | + strict_ns_set_initial_dollar = ... # type: Any |
| 51 | + strict_ns_set_path = ... # type: Any |
| 52 | + 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=..., strict_ns_set_initial_dollar=False, strict_ns_set_path=False): ... |
| 53 | + def blocked_domains(self): ... |
| 54 | + def set_blocked_domains(self, blocked_domains): ... |
| 55 | + def is_blocked(self, domain): ... |
| 56 | + def allowed_domains(self): ... |
| 57 | + def set_allowed_domains(self, allowed_domains): ... |
| 58 | + def is_not_allowed(self, domain): ... |
| 59 | + def set_ok(self, cookie, request): ... |
| 60 | + def set_ok_version(self, cookie, request): ... |
| 61 | + def set_ok_verifiability(self, cookie, request): ... |
| 62 | + def set_ok_name(self, cookie, request): ... |
| 63 | + def set_ok_path(self, cookie, request): ... |
| 64 | + def set_ok_domain(self, cookie, request): ... |
| 65 | + def set_ok_port(self, cookie, request): ... |
| 66 | + def return_ok(self, cookie, request): ... |
| 67 | + def return_ok_version(self, cookie, request): ... |
| 68 | + def return_ok_verifiability(self, cookie, request): ... |
| 69 | + def return_ok_secure(self, cookie, request): ... |
| 70 | + def return_ok_expires(self, cookie, request): ... |
| 71 | + def return_ok_port(self, cookie, request): ... |
| 72 | + def return_ok_domain(self, cookie, request): ... |
| 73 | + def domain_return_ok(self, domain, request): ... |
| 74 | + def path_return_ok(self, path, request): ... |
| 75 | + |
| 76 | +class Absent: ... |
| 77 | + |
| 78 | +class CookieJar: |
| 79 | + non_word_re = ... # type: Any |
| 80 | + quote_re = ... # type: Any |
| 81 | + strict_domain_re = ... # type: Any |
| 82 | + domain_re = ... # type: Any |
| 83 | + dots_re = ... # type: Any |
| 84 | + magic_re = ... # type: Any |
| 85 | + def __init__(self, policy=None): ... |
| 86 | + def set_policy(self, policy): ... |
| 87 | + def add_cookie_header(self, request): ... |
| 88 | + def make_cookies(self, response, request): ... |
| 89 | + def set_cookie_if_ok(self, cookie, request): ... |
| 90 | + def set_cookie(self, cookie): ... |
| 91 | + def extract_cookies(self, response, request): ... |
| 92 | + def clear(self, domain=None, path=None, name=None): ... |
| 93 | + def clear_session_cookies(self): ... |
| 94 | + def clear_expired_cookies(self): ... |
| 95 | + def __iter__(self): ... |
| 96 | + def __len__(self): ... |
| 97 | + |
| 98 | +class LoadError(IOError): ... |
| 99 | + |
| 100 | +class FileCookieJar(CookieJar): |
| 101 | + filename = ... # type: Any |
| 102 | + delayload = ... # type: Any |
| 103 | + def __init__(self, filename=None, delayload=False, policy=None): ... |
| 104 | + def save(self, filename=None, ignore_discard=False, ignore_expires=False): ... |
| 105 | + def load(self, filename=None, ignore_discard=False, ignore_expires=False): ... |
| 106 | + def revert(self, filename=None, ignore_discard=False, ignore_expires=False): ... |
| 107 | + |
| 108 | +MozillaCookieJar = FileCookieJar |
| 109 | +LWPCookieJar = FileCookieJar |
| 110 | +def lwp_cookie_str(cookie: Cookie) -> str: ... |
0 commit comments