massive update, probably broken
[dotfiles/.git] / .config / coc / extensions / coc-python-data / languageServer.0.5.59 / Typeshed / stdlib / 2 / urllib2.pyi
diff --git a/.config/coc/extensions/coc-python-data/languageServer.0.5.59/Typeshed/stdlib/2/urllib2.pyi b/.config/coc/extensions/coc-python-data/languageServer.0.5.59/Typeshed/stdlib/2/urllib2.pyi
new file mode 100644 (file)
index 0000000..9f6a869
--- /dev/null
@@ -0,0 +1,169 @@
+\r
+import ssl\r
+from typing import Any, AnyStr, Dict, List, Union, Optional, Mapping, Callable, Sequence, Tuple, Type\r
+from urllib import addinfourl\r
+from httplib import HTTPResponse\r
+\r
+_string = Union[str, unicode]\r
+\r
+class URLError(IOError):\r
+    reason = ...  # type: Union[str, BaseException]\r
+\r
+class HTTPError(URLError, addinfourl):\r
+    code = ...  # type: int\r
+    headers = ...  # type: Dict[str, str]\r
+\r
+class Request(object):\r
+    host = ...  # type: str\r
+    port = ...  # type: str\r
+    data = ...  # type: str\r
+    headers = ...  # type: Dict[str, str]\r
+    unverifiable = ...  # type: bool\r
+    type = ...  # type: Optional[str]\r
+    origin_req_host = ...\r
+    unredirected_hdrs = ...\r
+\r
+    def __init__(self, url: str, data: Optional[str] = ..., headers: Dict[str, str] = ...,\r
+                 origin_req_host: Optional[str] = ..., unverifiable: bool = ...) -> None: ...\r
+    def __getattr__(self, attr): ...\r
+    def get_method(self) -> str: ...\r
+    def add_data(self, data) -> None: ...\r
+    def has_data(self) -> bool: ...\r
+    def get_data(self) -> str: ...\r
+    def get_full_url(self) -> str: ...\r
+    def get_type(self): ...\r
+    def get_host(self) -> str: ...\r
+    def get_selector(self): ...\r
+    def set_proxy(self, host, type) -> None: ...\r
+    def has_proxy(self) -> bool: ...\r
+    def get_origin_req_host(self) -> str: ...\r
+    def is_unverifiable(self) -> bool: ...\r
+    def add_header(self, key: str, val: str) -> None: ...\r
+    def add_unredirected_header(self, key: str, val: str) -> None: ...\r
+    def has_header(self, header_name: str) -> bool: ...\r
+    def get_header(self, header_name: str, default: Optional[str] = ...) -> str: ...\r
+    def header_items(self): ...\r
+\r
+class OpenerDirector(object):\r
+    def add_handler(self, handler: BaseHandler) -> None: ...\r
+    def open(self, url: Union[Request, _string], data: Optional[_string] = ..., timeout: int = ...): ...\r
+    def error(self, proto: _string, *args: Any): ...\r
+\r
+def urlopen(url: Union[Request, _string], data: Optional[_string] = ..., timeout: int = ...,\r
+            cafile: Optional[_string] = ..., capath: Optional[_string] = ..., cadefault: bool = ...,\r
+            context: Optional[ssl.SSLContext] = ...): ...\r
+def install_opener(opener: OpenerDirector) -> None: ...\r
+def build_opener(*handlers: Union[BaseHandler, Type[BaseHandler]]) -> OpenerDirector: ...\r
+\r
+class BaseHandler:\r
+    handler_order = ...  # type: int\r
+    parent = ...  # type: OpenerDirector\r
+\r
+    def add_parent(self, parent: OpenerDirector) -> None: ...\r
+    def close(self) -> None: ...\r
+    def __lt__(self, other: Any) -> bool: ...\r
+\r
+class HTTPErrorProcessor(BaseHandler):\r
+    def http_response(self, request, response): ...\r
+\r
+class HTTPDefaultErrorHandler(BaseHandler):\r
+    def http_error_default(self, req, fp, code, msg, hdrs): ...\r
+\r
+class HTTPRedirectHandler(BaseHandler):\r
+    max_repeats = ...  # type: int\r
+    max_redirections = ...  # type: int\r
+    def redirect_request(self, req, fp, code, msg, headers, newurl): ...\r
+    def http_error_301(self, req, fp, code, msg, headers): ...\r
+    def http_error_302(self, req, fp, code, msg, headers): ...\r
+    def http_error_303(self, req, fp, code, msg, headers): ...\r
+    def http_error_307(self, req, fp, code, msg, headers): ...\r
+    inf_msg = ...  # type: str\r
+\r
+\r
+class ProxyHandler(BaseHandler):\r
+    def __init__(self, proxies=None): ...\r
+    def proxy_open(self, req, proxy, type): ...\r
+\r
+class HTTPPasswordMgr:\r
+    def __init__(self) -> None: ...\r
+    def add_password(self, realm: _string, uri: Union[_string, Sequence[_string]], user: _string, passwd: _string) -> None: ...\r
+    def find_user_password(self, realm: _string, authuri: _string) -> Tuple[Any, Any]: ...\r
+    def reduce_uri(self, uri: _string, default_port: bool = ...) -> Tuple[Any, Any]: ...\r
+    def is_suburi(self, base: _string, test: _string) -> bool: ...\r
+\r
+class HTTPPasswordMgrWithDefaultRealm(HTTPPasswordMgr): ...\r
+\r
+class AbstractBasicAuthHandler:\r
+    def __init__(self, password_mgr: Optional[HTTPPasswordMgr] = ...) -> None: ...\r
+    def http_error_auth_reqed(self, authreq, host, req, headers): ...\r
+    def retry_http_basic_auth(self, host, req, realm): ...\r
+\r
+class HTTPBasicAuthHandler(AbstractBasicAuthHandler, BaseHandler):\r
+    auth_header = ...  # type: str\r
+    def http_error_401(self, req, fp, code, msg, headers): ...\r
+\r
+class ProxyBasicAuthHandler(AbstractBasicAuthHandler, BaseHandler):\r
+    auth_header = ...  # type: str\r
+    def http_error_407(self, req, fp, code, msg, headers): ...\r
+\r
+class AbstractDigestAuthHandler:\r
+    def __init__(self, passwd: Optional[HTTPPasswordMgr] = ...) -> None: ...\r
+    def reset_retry_count(self) -> None: ...\r
+    def http_error_auth_reqed(self, auth_header: str, host: str, req: Request,\r
+                              headers: Mapping[str, str]) -> None: ...\r
+    def retry_http_digest_auth(self, req: Request, auth: str) -> Optional[HTTPResponse]: ...\r
+    def get_cnonce(self, nonce: str) -> str: ...\r
+    def get_authorization(self, req: Request, chal: Mapping[str, str]) -> str: ...\r
+    def get_algorithm_impls(self, algorithm: str) -> Tuple[Callable[[str], str], Callable[[str, str], str]]: ...\r
+    def get_entity_digest(self, data: Optional[bytes], chal: Mapping[str, str]) -> Optional[str]: ...\r
+\r
+class HTTPDigestAuthHandler(BaseHandler, AbstractDigestAuthHandler):\r
+    auth_header = ...  # type: str\r
+    handler_order = ...  # type: int\r
+    def http_error_401(self, req, fp, code, msg, headers): ...\r
+\r
+class ProxyDigestAuthHandler(BaseHandler, AbstractDigestAuthHandler):\r
+    auth_header = ...  # type: str\r
+    handler_order = ...  # type: int\r
+    def http_error_407(self, req, fp, code, msg, headers): ...\r
+\r
+class AbstractHTTPHandler(BaseHandler):\r
+    def __init__(self, debuglevel: int = ...) -> None: ...\r
+    def do_request_(self, request): ...\r
+    def do_open(self, http_class, req): ...\r
+\r
+class HTTPHandler(AbstractHTTPHandler):\r
+    def http_open(self, req): ...\r
+    def http_request(self, request): ...\r
+\r
+class HTTPSHandler(AbstractHTTPHandler):\r
+    def __init__(self, debuglevel=0, context=None): ...\r
+    def https_open(self, req): ...\r
+    def https_request(self, request): ...\r
+\r
+class HTTPCookieProcessor(BaseHandler):\r
+    def __init__(self, cookiejar=None): ...\r
+    def http_request(self, request): ...\r
+    def http_response(self, request, response): ...\r
+\r
+class UnknownHandler(BaseHandler):\r
+    def unknown_open(self, req): ...\r
+\r
+class FileHandler(BaseHandler):\r
+    def file_open(self, req): ...\r
+    def get_names(self): ...\r
+    def open_local_file(self, req): ...\r
+\r
+class FTPHandler(BaseHandler):\r
+    def ftp_open(self, req): ...\r
+    def connect_ftp(self, user, passwd, host, port, dirs, timeout): ...\r
+\r
+class CacheFTPHandler(FTPHandler):\r
+    def __init__(self) -> None: ...\r
+    def setTimeout(self, t): ...\r
+    def setMaxConns(self, m): ...\r
+    def check_cache(self): ...\r
+    def clear_cache(self): ...\r
+\r
+def parse_http_list(s: AnyStr) -> List[AnyStr]: ...\r
+def parse_keqv_list(l: List[AnyStr]) -> Dict[AnyStr, AnyStr]: ...\r