← 返回首页
gh-108303: Move `smtpd` to `test.support` by sobolevn · Pull Request #114368 · python/cpython · GitHub
Skip to content

Navigation Menu

Toggle navigation
Sign in
Appearance settings
Search or jump to...

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Include my email address so I can be contacted

Saved searches

Use saved searches to filter your results more quickly

Appearance settings
Resetting focus

gh-108303: Move smtpd to test.support#114368

Merged
vstinner merged 1 commit into
python:mainfrom
sobolevn:issue-108303-smtpd
Jan 22, 2024
Merged

gh-108303: Move smtpd to test.support#114368
vstinner merged 1 commit into
python:mainfrom
sobolevn:issue-108303-smtpd

Conversation

sobolevn commented Jan 21, 2024
edited
Loading

Copy link
Copy Markdown
Member

This module was removed from stdlib in #93246
But, since it is not really a test file, it should have been moved to Lib/test/support, not Lib/test. This PR fixes that :)

Now this is in line with asyncore and asynchat.

sobolevn requested review from a team and vsajip as code owners January 21, 2024 07:19
sobolevn added skip news needs backport to 3.11 only security fixes needs backport to 3.12 only security fixes labels Jan 21, 2024
AlexWaygood changed the title gh-108303: Move stmpd to test.support gh-108303: Move smtpd to test.support Jan 21, 2024
vstinner removed the needs backport to 3.11 only security fixes label Jan 22, 2024

Copy link
Copy Markdown
Member

This change should not be backported to 3.11: it was done in Python 3.12.

vstinner left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality Hide comment

LGTM.

Comment thread Lib/test/test_logging.py
from socketserver import (ThreadingUDPServer, DatagramRequestHandler,
ThreadingTCPServer, StreamRequestHandler)

with warnings.catch_warnings():

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality Hide comment

The change removes with warnings.catch_warnings(): but apparently, it's useless. The test still pass without it:

$ ./python -Werror -m test test_logging test_smtplib -j0 Using random seed: 1598323201 0:00:00 load avg: 0.96 Run 2 tests in parallel using 2 worker processes 0:00:02 load avg: 1.37 [1/2] test_smtplib passed 0:00:18 load avg: 1.22 [2/2] test_logging passed == Tests result: SUCCESS == All 2 tests OK. Total duration: 18.9 sec Total tests: run=317 skipped=2 Total test files: run=2/2 Result: SUCCESS

vstinner merged commit 8f5e7d7 into python:main Jan 22, 2024

Copy link
Copy Markdown

Thanks @sobolevn for the PR, and @vstinner for merging it 🌮🎉.. I'm working now to backport this PR to: 3.12.
🐍🍒⛏🤖

miss-islington pushed a commit to miss-islington/cpython that referenced this pull request Jan 22, 2024
Update test_logging.py and test_smtplib.py. (cherry picked from commit 8f5e7d7) Co-authored-by: Nikita Sobolev <mail@sobolevn.me>

bedevere-app Bot commented Jan 22, 2024

Copy link
Copy Markdown

GH-114427 is a backport of this pull request to the 3.12 branch.

bedevere-app Bot removed the needs backport to 3.12 only security fixes label Jan 22, 2024

Copy link
Copy Markdown
Member

Merged, thanks.

vstinner pushed a commit that referenced this pull request Jan 22, 2024
gh-108303: Move `smtpd` to `test.support` (GH-114368) Update test_logging.py and test_smtplib.py. (cherry picked from commit 8f5e7d7) Co-authored-by: Nikita Sobolev <mail@sobolevn.me>
aisk pushed a commit to aisk/cpython that referenced this pull request Feb 11, 2024
Update test_logging.py and test_smtplib.py.
Glyphack pushed a commit to Glyphack/cpython that referenced this pull request Sep 2, 2024
Update test_logging.py and test_smtplib.py.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants

Footer

© 2026 GitHub, Inc.