smtpd: MailmanProxy was removed in 3.11 (#7365)

python/cpython#26617
This commit is contained in:
Jelle Zijlstra
2022-02-22 17:06:39 -08:00
committed by GitHub
parent a3bb5af4a0
commit 4781dbf752

View File

@@ -1,10 +1,14 @@
import asynchat
import asyncore
import socket
import sys
from collections import defaultdict
from typing import Any
__all__ = ["SMTPChannel", "SMTPServer", "DebuggingServer", "PureProxy", "MailmanProxy"]
if sys.version_info >= (3, 11):
__all__ = ["SMTPChannel", "SMTPServer", "DebuggingServer", "PureProxy"]
else:
__all__ = ["SMTPChannel", "SMTPServer", "DebuggingServer", "PureProxy", "MailmanProxy"]
_Address = tuple[str, int] # (host, port)
@@ -81,5 +85,6 @@ class DebuggingServer(SMTPServer): ...
class PureProxy(SMTPServer):
def process_message(self, peer: _Address, mailfrom: str, rcpttos: list[str], data: bytes | str) -> str | None: ... # type: ignore[override]
class MailmanProxy(PureProxy):
def process_message(self, peer: _Address, mailfrom: str, rcpttos: list[str], data: bytes | str) -> str | None: ... # type: ignore[override]
if sys.version_info < (3, 11):
class MailmanProxy(PureProxy):
def process_message(self, peer: _Address, mailfrom: str, rcpttos: list[str], data: bytes | str) -> str | None: ... # type: ignore[override]