Skip to content

gh-93243: Make smtpd private before porting its users #93246

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 19 commits into from
Aug 6, 2022
Merged
Show file tree
Hide file tree
Changes from 9 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
3 changes: 0 additions & 3 deletions Doc/library/email.rst
Original file line number Diff line number Diff line change
Expand Up @@ -147,6 +147,3 @@ Legacy API:
Module :mod:`mailbox`
Tools for creating, reading, and managing collections of messages on disk
using a variety standard formats.

Module :mod:`smtpd`
SMTP server framework (primarily useful for testing)
267 changes: 0 additions & 267 deletions Doc/library/smtpd.rst

This file was deleted.

1 change: 0 additions & 1 deletion Doc/library/superseded.rst
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,6 @@ backwards compatibility. They have been superseded by other modules.
optparse.rst
ossaudiodev.rst
pipes.rst
smtpd.rst
sndhdr.rst
spwd.rst
sunau.rst
Expand Down
12 changes: 12 additions & 0 deletions Doc/whatsnew/3.12.rst
Original file line number Diff line number Diff line change
Expand Up @@ -126,6 +126,14 @@ Removed
(and corresponding ``EXPERIMENTAL_ISOLATED_SUBINTERPRETERS``)
have been removed.

* ``smtpd`` has been removed according to the schedule in :pep:`594`,
having been deprecated in Python 3.4.7 and 3.5.4.
Use aiosmtpd_ PyPI module or any other
:keyword:`async`/:keyword:`await`-based server instead.
(Contributed by Oleg Iarygin in :gh:`93243`.)

.. _aiosmtpd: https://pypi.org/project/aiosmtpd/


Porting to Python 3.12
======================
Expand All @@ -151,6 +159,10 @@ Changes in the Python API
select from a larger range than ``randrange(10**25)``.
(Originally suggested by Serhiy Storchaka gh-86388.)

* Removed the strictly synchronous ``smtpd`` module, deprecated in Python 3.4.7
and 3.5.4. A recommended replacement is the
:keyword:`async`/:keyword:`await`-based aiosmtpd_ PyPI module.


Build Changes
=============
Expand Down
4 changes: 2 additions & 2 deletions Lib/test/mock_socket.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
"""Mock socket module used by the smtpd and smtplib tests.
"""Mock socket module used by the smtplib tests.
"""

# imported for _GLOBAL_DEFAULT_TIMEOUT
Expand Down Expand Up @@ -33,7 +33,7 @@ def close(self):


class MockSocket:
"""Mock socket object used by smtpd and smtplib tests.
"""Mock socket object used by the smtplib tests.
"""
def __init__(self, family=None):
global _reply_data
Expand Down
File renamed without changes.
3 changes: 2 additions & 1 deletion Lib/test/test_logging.py
Original file line number Diff line number Diff line change
Expand Up @@ -60,9 +60,10 @@
from socketserver import (ThreadingUDPServer, DatagramRequestHandler,
ThreadingTCPServer, StreamRequestHandler)

with warnings.catch_warnings():
from . import smtpd

asyncore = warnings_helper.import_deprecated('asyncore')
smtpd = warnings_helper.import_deprecated('smtpd')


try:
Expand Down
Loading