Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 9 additions & 11 deletions stdlib/2and3/ssl.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -181,8 +181,8 @@ if sys.version_info < (3,):
else:
class _ASN1Object(NamedTuple('_ASN1Object', [('nid', int), ('shortname', str), ('longname', str), ('oid', str)])): ...
class Purpose(_ASN1Object, enum.Enum):
SERVER_AUTH = ...
CLIENT_AUTH = ...
SERVER_AUTH: _ASN1Object
CLIENT_AUTH: _ASN1Object

class SSLSocket(socket.socket):
context: SSLContext
Expand All @@ -208,17 +208,15 @@ class SSLSocket(socket.socket):
def version(self) -> Optional[str]: ...
def pending(self) -> int: ...


if sys.version_info >= (3, 7):
class TLSVersion(enum.IntEnum):
MINIMUM_SUPPORTED = ...
MAXIMUM_SUPPORTED = ...
SSLv3 = ...
TLSv1 = ...
TLSv1_1 = ...
TLSv1_2 = ...
TLSv1_3 = ...

MINIMUM_SUPPORTED: int
MAXIMUM_SUPPORTED: int
SSLv3: int
TLSv1: int
TLSv1_1: int
TLSv1_2: int
TLSv1_3: int

class SSLContext:
check_hostname: bool
Expand Down
18 changes: 11 additions & 7 deletions stdlib/3/http/client.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -112,14 +112,18 @@ class HTTPResponse(io.BufferedIOBase, BinaryIO):
# urllib.request uses it for a parameter.
class _HTTPConnectionProtocol(Protocol):
if sys.version_info >= (3, 7):
def __call__(self, host: str, port: Optional[int] = ...,
timeout: float = ...,
source_address: Optional[Tuple[str, int]] = ...,
blocksize: int = ...): ...
def __call__(
self,
host: str,
port: Optional[int] = ...,
timeout: float = ...,
source_address: Optional[Tuple[str, int]] = ...,
blocksize: int = ...,
) -> HTTPConnection: ...
else:
def __call__(self, host: str, port: Optional[int] = ...,
timeout: float = ...,
source_address: Optional[Tuple[str, int]] = ...): ...
def __call__(
self, host: str, port: Optional[int] = ..., timeout: float = ..., source_address: Optional[Tuple[str, int]] = ...,
) -> HTTPConnection: ...

class HTTPConnection:
timeout: float
Expand Down