https://github.com/python/cpython/commit/58fdd15d5a70b0274ed5d4fc491700138aa51cdf
commit: 58fdd15d5a70b0274ed5d4fc491700138aa51cdf
branch: 3.12
author: Miss Islington (bot) <[email protected]>
committer: vstinner <[email protected]>
date: 2024-01-22T14:08:31Z
summary:

[3.12] gh-108303: Move `smtpd` to `test.support` (GH-114368) (#114427)

gh-108303: Move `smtpd` to `test.support` (GH-114368)

Update test_logging.py and test_smtplib.py.
(cherry picked from commit 8f5e7d739f56a75022dfe8fa24675b6c7b321ab5)

Co-authored-by: Nikita Sobolev <[email protected]>

files:
A Lib/test/support/smtpd.py
D Lib/test/smtpd.py
M Lib/test/test_logging.py
M Lib/test/test_smtplib.py

diff --git a/Lib/test/smtpd.py b/Lib/test/support/smtpd.py
similarity index 100%
rename from Lib/test/smtpd.py
rename to Lib/test/support/smtpd.py
diff --git a/Lib/test/test_logging.py b/Lib/test/test_logging.py
index 635dd7c26f6eed..d1ec2d6cf7a7d2 100644
--- a/Lib/test/test_logging.py
+++ b/Lib/test/test_logging.py
@@ -49,6 +49,7 @@
 from test.support import threading_helper
 from test.support import warnings_helper
 from test.support import asyncore
+from test.support import smtpd
 from test.support.logging_helper import TestHandler
 import textwrap
 import threading
@@ -63,9 +64,6 @@
 from socketserver import (ThreadingUDPServer, DatagramRequestHandler,
                           ThreadingTCPServer, StreamRequestHandler)
 
-with warnings.catch_warnings():
-    from . import smtpd
-
 try:
     import win32evtlog, win32evtlogutil, pywintypes
 except ImportError:
diff --git a/Lib/test/test_smtplib.py b/Lib/test/test_smtplib.py
index b6d5b8c3d82580..4d8e1438deb0f5 100644
--- a/Lib/test/test_smtplib.py
+++ b/Lib/test/test_smtplib.py
@@ -22,10 +22,9 @@
 from test.support import socket_helper
 from test.support import threading_helper
 from test.support import asyncore
+from test.support import smtpd
 from unittest.mock import Mock
 
-from . import smtpd
-
 
 support.requires_working_socket(module=True)
 

_______________________________________________
Python-checkins mailing list -- [email protected]
To unsubscribe send an email to [email protected]
https://mail.python.org/mailman3/lists/python-checkins.python.org/
Member address: [email protected]

Reply via email to