Fixing stubtest issues (#5339)

* Fix stubtest issues
This commit is contained in:
hatal175
2021-05-05 17:23:43 +03:00
committed by GitHub
parent 8379386bd4
commit 461791db27
16 changed files with 96 additions and 97 deletions

View File

@@ -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): ...

View File

@@ -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: ...