Skip to content
Merged
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
8 changes: 5 additions & 3 deletions stdlib/3/smtplib.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ bCRLF: bytes
OLDSTYLE_AUTH: Pattern[str]

class SMTPException(OSError): ...
class SMTPNotSupportedError(SMTPException): ...
class SMTPServerDisconnected(SMTPException): ...

class SMTPResponseException(SMTPException):
Expand Down Expand Up @@ -53,12 +54,13 @@ class _AuthObject(Protocol):

class SMTP:
debuglevel: int = ...
sock: Optional[socket] = ...
# Type of file should match what socket.makefile() returns
file: Any = ...
file: Optional[Any] = ...
helo_resp: Optional[bytes] = ...
ehlo_msg: str = ...
ehlo_resp: Optional[bytes] = ...
does_esmtp: int = ...
does_esmtp: bool = ...
default_port: int = ...
timeout: float
esmtp_features: Dict[str, str]
Expand All @@ -73,7 +75,6 @@ class SMTP:
exc_value: Optional[BaseException],
tb: Optional[TracebackType]) -> None: ...
def set_debuglevel(self, debuglevel: int) -> None: ...
sock: Optional[socket]
def connect(self, host: str = ..., port: int = ...,
source_address: Optional[_SourceAddress] = ...) -> _Reply: ...
def send(self, s: Union[bytes, str]) -> None: ...
Expand Down Expand Up @@ -116,6 +117,7 @@ class SMTP:
def quit(self) -> _Reply: ...

class SMTP_SSL(SMTP):
default_port: int = ...
keyfile: Optional[str]
certfile: Optional[str]
context: SSLContext
Expand Down