|
1 | 1 | import asynchat
|
2 | 2 | import asyncore
|
3 | 3 | import socket
|
| 4 | +import sys |
4 | 5 | from collections import defaultdict
|
5 | 6 | from typing import Any
|
6 | 7 |
|
7 |
| -__all__ = ["SMTPChannel", "SMTPServer", "DebuggingServer", "PureProxy", "MailmanProxy"] |
| 8 | +if sys.version_info >= (3, 11): |
| 9 | + __all__ = ["SMTPChannel", "SMTPServer", "DebuggingServer", "PureProxy"] |
| 10 | +else: |
| 11 | + __all__ = ["SMTPChannel", "SMTPServer", "DebuggingServer", "PureProxy", "MailmanProxy"] |
8 | 12 |
|
9 | 13 | _Address = tuple[str, int] # (host, port)
|
10 | 14 |
|
@@ -81,5 +85,6 @@ class DebuggingServer(SMTPServer): ...
|
81 | 85 | class PureProxy(SMTPServer):
|
82 | 86 | def process_message(self, peer: _Address, mailfrom: str, rcpttos: list[str], data: bytes | str) -> str | None: ... # type: ignore[override]
|
83 | 87 |
|
84 |
| -class MailmanProxy(PureProxy): |
85 |
| - def process_message(self, peer: _Address, mailfrom: str, rcpttos: list[str], data: bytes | str) -> str | None: ... # type: ignore[override] |
| 88 | +if sys.version_info < (3, 11): |
| 89 | + class MailmanProxy(PureProxy): |
| 90 | + def process_message(self, peer: _Address, mailfrom: str, rcpttos: list[str], data: bytes | str) -> str | None: ... # type: ignore[override] |
0 commit comments