Skip to content

Commit 6017245

Browse files
smtpd: MailmanProxy was removed in 3.11
python/cpython#26617
1 parent a3bb5af commit 6017245

File tree

1 file changed

+7
-3
lines changed

1 file changed

+7
-3
lines changed

stdlib/smtpd.pyi

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,10 @@ import socket
44
from collections import defaultdict
55
from typing import Any
66

7-
__all__ = ["SMTPChannel", "SMTPServer", "DebuggingServer", "PureProxy", "MailmanProxy"]
7+
if sys.version_info >= (3, 11):
8+
__all__ = ["SMTPChannel", "SMTPServer", "DebuggingServer", "PureProxy"]
9+
else:
10+
__all__ = ["SMTPChannel", "SMTPServer", "DebuggingServer", "PureProxy", "MailmanProxy"]
811

912
_Address = tuple[str, int] # (host, port)
1013

@@ -81,5 +84,6 @@ class DebuggingServer(SMTPServer): ...
8184
class PureProxy(SMTPServer):
8285
def process_message(self, peer: _Address, mailfrom: str, rcpttos: list[str], data: bytes | str) -> str | None: ... # type: ignore[override]
8386

84-
class MailmanProxy(PureProxy):
85-
def process_message(self, peer: _Address, mailfrom: str, rcpttos: list[str], data: bytes | str) -> str | None: ... # type: ignore[override]
87+
if sys.version_info < (3, 11):
88+
class MailmanProxy(PureProxy):
89+
def process_message(self, peer: _Address, mailfrom: str, rcpttos: list[str], data: bytes | str) -> str | None: ... # type: ignore[override]

0 commit comments

Comments
 (0)