mirror of
https://github.com/davidhalter/typeshed.git
synced 2025-12-08 13:04:46 +08:00
Add cpython specific constants to ssl (#291)
* Revert "Revert "add types to ssl for py2 (#251)""
This reverts commit 0b19fb471c (thus re-adding types to ssl).
* add some undocumented ssl constants
This commit is contained in:
committed by
Guido van Rossum
parent
cf655f6f02
commit
d5938ee76c
@@ -250,3 +250,25 @@ if sys.version_info >= (3, 5):
|
||||
def read(self, n: int = ...) -> bytes: ...
|
||||
def write(self, buf: bytes) -> int: ...
|
||||
def write_eof(self) -> None: ...
|
||||
|
||||
|
||||
# TODO below documented in cpython but not in docs.python.org
|
||||
# taken from python 3.4
|
||||
SSL_ERROR_EOF = ... # type: int
|
||||
SSL_ERROR_INVALID_ERROR_CODE = ... # type: int
|
||||
SSL_ERROR_SSL = ... # type: int
|
||||
SSL_ERROR_SYSCALL = ... # type: int
|
||||
SSL_ERROR_WANT_CONNECT = ... # type: int
|
||||
SSL_ERROR_WANT_READ = ... # type: int
|
||||
SSL_ERROR_WANT_WRITE = ... # type: int
|
||||
SSL_ERROR_WANT_X509_LOOKUP = ... # type: int
|
||||
SSL_ERROR_ZERO_RETURN = ... # type: int
|
||||
|
||||
def get_protocol_name(protocol_code: int) -> str: ...
|
||||
|
||||
AF_INET = ... # type: int
|
||||
PEM_FOOTER = ... # type: str
|
||||
PEM_HEADER = ... # type: str
|
||||
SOCK_STREAM = ... # type: int
|
||||
SOL_SOCKET = ... # type: int
|
||||
SO_TYPE = ... # type: int
|
||||
|
||||
Reference in New Issue
Block a user