imaplib.pyi: Add ssl_context parameter for Python >= 3.3 (#3310)

Fixes: #3289
This commit is contained in:
Utkarsh Gupta
2019-10-06 22:27:22 +05:30
committed by Sebastian Rittau
parent b9342eca0a
commit 717cd1f96f

View File

@@ -5,7 +5,7 @@ import subprocess
import sys
import time
from socket import socket as _socket
from ssl import SSLSocket
from ssl import SSLSocket, SSLContext
from typing import Any, Callable, Dict, IO, List, Optional, Pattern, Text, Tuple, Type, Union
CommandResults = Tuple[str, List[Any]]
@@ -89,7 +89,10 @@ class IMAP4:
class IMAP4_SSL(IMAP4):
keyfile: str = ...
certfile: str = ...
def __init__(self, host: str = ..., port: int = ..., keyfile: Optional[str] = ..., certfile: Optional[str] = ...) -> None: ...
if 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: ...
host: str = ...
port: int = ...
sock: _socket = ...