[stdlib] Deprecate old functions (#14553)

* [stdlib] Deprecate many functions

* Fix typo

* Imporove message for asyncio/trsock

* Apply suggestions from code review

Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>

* Add Python before version

* [pre-commit.ci] auto fixes from pre-commit.com hooks

* Wrap comment lines

* fix the rest

---------

Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
This commit is contained in:
Semyon Moroz
2025-08-10 22:27:35 +01:00
committed by GitHub
co-authored by Alex Waygood pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
parent 91ba0da4aa
commit fb0940e6c1
27 changed files with 163 additions and 34 deletions
+2 -1
View File
@@ -4,7 +4,7 @@ import socket
import sys
from collections import defaultdict
from typing import Any
from typing_extensions import TypeAlias
from typing_extensions import TypeAlias, deprecated
if sys.version_info >= (3, 11):
__all__ = ["SMTPChannel", "SMTPServer", "DebuggingServer", "PureProxy"]
@@ -87,5 +87,6 @@ class PureProxy(SMTPServer):
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):
@deprecated("Deprecated since Python 3.9; removed in Python 3.11.")
class MailmanProxy(PureProxy):
def process_message(self, peer: _Address, mailfrom: str, rcpttos: list[str], data: bytes | str) -> str | None: ... # type: ignore[override]