mirror of
https://github.com/davidhalter/typeshed.git
synced 2025-12-31 00:24:24 +08:00
@@ -183,18 +183,33 @@ class HTTPConnection:
|
||||
def send(self, data: _DataType) -> None: ...
|
||||
|
||||
class HTTPSConnection(HTTPConnection):
|
||||
def __init__(
|
||||
self,
|
||||
host: str,
|
||||
port: Optional[int] = ...,
|
||||
key_file: Optional[str] = ...,
|
||||
cert_file: Optional[str] = ...,
|
||||
timeout: Optional[float] = ...,
|
||||
source_address: Optional[Tuple[str, int]] = ...,
|
||||
*,
|
||||
context: Optional[ssl.SSLContext] = ...,
|
||||
check_hostname: Optional[bool] = ...,
|
||||
) -> None: ...
|
||||
if sys.version_info >= (3, 7):
|
||||
def __init__(
|
||||
self,
|
||||
host: str,
|
||||
port: Optional[int] = ...,
|
||||
key_file: Optional[str] = ...,
|
||||
cert_file: Optional[str] = ...,
|
||||
timeout: Optional[float] = ...,
|
||||
source_address: Optional[Tuple[str, int]] = ...,
|
||||
*,
|
||||
context: Optional[ssl.SSLContext] = ...,
|
||||
check_hostname: Optional[bool] = ...,
|
||||
blocksize: int = ...,
|
||||
) -> None: ...
|
||||
else:
|
||||
def __init__(
|
||||
self,
|
||||
host: str,
|
||||
port: Optional[int] = ...,
|
||||
key_file: Optional[str] = ...,
|
||||
cert_file: Optional[str] = ...,
|
||||
timeout: Optional[float] = ...,
|
||||
source_address: Optional[Tuple[str, int]] = ...,
|
||||
*,
|
||||
context: Optional[ssl.SSLContext] = ...,
|
||||
check_hostname: Optional[bool] = ...,
|
||||
) -> None: ...
|
||||
|
||||
class HTTPException(Exception): ...
|
||||
|
||||
|
||||
@@ -63,21 +63,39 @@ class DefaultCookiePolicy(CookiePolicy):
|
||||
DomainRFC2965Match: int
|
||||
DomainLiberal: int
|
||||
DomainStrict: int
|
||||
def __init__(
|
||||
self,
|
||||
blocked_domains: Optional[Sequence[str]] = ...,
|
||||
allowed_domains: Optional[Sequence[str]] = ...,
|
||||
netscape: bool = ...,
|
||||
rfc2965: bool = ...,
|
||||
rfc2109_as_netscape: Optional[bool] = ...,
|
||||
hide_cookie2: bool = ...,
|
||||
strict_domain: bool = ...,
|
||||
strict_rfc2965_unverifiable: bool = ...,
|
||||
strict_ns_unverifiable: bool = ...,
|
||||
strict_ns_domain: int = ...,
|
||||
strict_ns_set_initial_dollar: bool = ...,
|
||||
strict_ns_set_path: bool = ...,
|
||||
) -> None: ...
|
||||
if sys.version_info >= (3, 8):
|
||||
def __init__(
|
||||
self,
|
||||
blocked_domains: Optional[Sequence[str]] = ...,
|
||||
allowed_domains: Optional[Sequence[str]] = ...,
|
||||
netscape: bool = ...,
|
||||
rfc2965: bool = ...,
|
||||
rfc2109_as_netscape: Optional[bool] = ...,
|
||||
hide_cookie2: bool = ...,
|
||||
strict_domain: bool = ...,
|
||||
strict_rfc2965_unverifiable: bool = ...,
|
||||
strict_ns_unverifiable: bool = ...,
|
||||
strict_ns_domain: int = ...,
|
||||
strict_ns_set_initial_dollar: bool = ...,
|
||||
strict_ns_set_path: bool = ...,
|
||||
secure_protocols: Sequence[str] = ...,
|
||||
) -> None: ...
|
||||
else:
|
||||
def __init__(
|
||||
self,
|
||||
blocked_domains: Optional[Sequence[str]] = ...,
|
||||
allowed_domains: Optional[Sequence[str]] = ...,
|
||||
netscape: bool = ...,
|
||||
rfc2965: bool = ...,
|
||||
rfc2109_as_netscape: Optional[bool] = ...,
|
||||
hide_cookie2: bool = ...,
|
||||
strict_domain: bool = ...,
|
||||
strict_rfc2965_unverifiable: bool = ...,
|
||||
strict_ns_unverifiable: bool = ...,
|
||||
strict_ns_domain: int = ...,
|
||||
strict_ns_set_initial_dollar: bool = ...,
|
||||
strict_ns_set_path: bool = ...,
|
||||
) -> None: ...
|
||||
def blocked_domains(self) -> Tuple[str, ...]: ...
|
||||
def set_blocked_domains(self, blocked_domains: Sequence[str]) -> None: ...
|
||||
def is_blocked(self, domain: str) -> bool: ...
|
||||
|
||||
Reference in New Issue
Block a user