imaplib: update for py39 (#4271)

This commit is contained in:
Shantanu
2020-06-26 03:40:27 -07:00
committed by GitHub
parent 1c3f526fbf
commit 2ba6939788
2 changed files with 17 additions and 6 deletions

View File

@@ -30,13 +30,17 @@ class IMAP4:
welcome: bytes = ...
capabilities: Tuple[str] = ...
PROTOCOL_VERSION: str = ...
def __init__(self, host: str = ..., port: int = ...) -> None: ...
if sys.version_info >= (3, 9):
def __init__(self, host: str = ..., port: int = ..., timeout: Optional[float] = ...) -> None: ...
def open(self, host: str = ..., port: int = ..., timeout: Optional[float] = ...) -> None: ...
else:
def __init__(self, host: str = ..., port: int = ...) -> None: ...
def open(self, host: str = ..., port: int = ...) -> None: ...
def __getattr__(self, attr: str) -> Any: ...
host: str = ...
port: int = ...
sock: _socket = ...
file: Union[IO[Text], IO[bytes]] = ...
def open(self, host: str = ..., port: int = ...) -> None: ...
def read(self, size: int) -> bytes: ...
def readline(self) -> bytes: ...
def send(self, data: bytes) -> None: ...
@@ -94,7 +98,9 @@ class IMAP4:
class IMAP4_SSL(IMAP4):
keyfile: str = ...
certfile: str = ...
if sys.version_info >= (3, 3):
if sys.version_info >= (3, 9):
def __init__(self, host: str = ..., port: int = ..., keyfile: Optional[str] = ..., certfile: Optional[str] = ..., ssl_context: Optional[SSLContext] = ..., timeout: Optional[float] = ...) -> None: ...
elif sys.version_info >= (3, 3):
def __init__(self, host: str = ..., port: int = ..., keyfile: Optional[str] = ..., certfile: Optional[str] = ..., ssl_context: Optional[SSLContext] = ...) -> None: ...
else:
def __init__(self, host: str = ..., port: int = ..., keyfile: Optional[str] = ..., certfile: Optional[str] = ...) -> None: ...
@@ -103,7 +109,10 @@ class IMAP4_SSL(IMAP4):
sock: _socket = ...
sslobj: SSLSocket = ...
file: IO[Any] = ...
def open(self, host: str = ..., port: Optional[int] = ...) -> None: ...
if sys.version_info >= (3, 9):
def open(self, host: str = ..., port: Optional[int] = ..., timeout: Optional[float] = ...) -> None: ...
else:
def open(self, host: str = ..., port: Optional[int] = ...) -> None: ...
def read(self, size: int) -> bytes: ...
def readline(self) -> bytes: ...
def send(self, data: bytes) -> None: ...
@@ -122,7 +131,10 @@ class IMAP4_stream(IMAP4):
process: subprocess.Popen[bytes] = ...
writefile: IO[Any] = ...
readfile: IO[Any] = ...
def open(self, host: str = ..., port: Optional[int] = ...) -> None: ...
if sys.version_info >= (3, 9):
def open(self, host: Optional[str] = ..., port: Optional[int] = ..., timeout: Optional[float] = ...) -> None: ...
else:
def open(self, host: Optional[str] = ..., port: Optional[int] = ...) -> None: ...
def read(self, size: int) -> bytes: ...
def readline(self) -> bytes: ...
def send(self, data: bytes) -> None: ...