This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

classification
Title: test_smtplib.py no longer butt slow
Type: performance Stage: commit review
Components: Tests Versions: Python 3.2
process
Status: closed Resolution: accepted
Dependencies: Superseder:
Assigned To: richard Nosy List: ajaksu2, jerry.seutter, richard
Priority: low Keywords: patch

Created on 2008-03-19 14:50 by jerry.seutter, last changed 2022-04-11 14:56 by admin. This issue is now closed.

Files
File name Uploaded Description Edit
test_smtplib_speedup.patch jerry.seutter, 2008-03-19 14:50 Changes to test_smtplib.py, rev 0
mock_socket.py jerry.seutter, 2008-03-19 14:51 mock socket library that patch depends on
Messages (4)
msg64058 - (view) Author: Jerry Seutter (jerry.seutter) * (Python committer) Date: 2008-03-19 14:50
Changes only affect test files.

test_smtplib.py before: 39.7s
test_smtplib.py after: 0.8s

socket.getfqdn() calls were causing all the slowness.  Added a
mock_socket.py file to handle some tests.  For other tests that tested
both server side and client side of the smtp libraries, mocked out
socket.getfqdn() only.
msg87913 - (view) Author: Daniel Diniz (ajaksu2) * (Python triager) Date: 2009-05-16 19:38
What platform is that? I'm sure I don't get such a long runtime for
test_smtplib on Linux. Maybe this was fixed by changes in socket or
smtplib itself?
msg112424 - (view) Author: Richard Jones (richard) * (Python committer) Date: 2010-08-02 06:37
The patch to test_smtplib.py no longer applies since trunk is now py3k. I'm looking into it - and seeing whether the mock socket work I implemented for test_smtpd.py will have any common code. I'm hitting some "fun" areas of py3k-ness with bytes/str stuff in smtplib at the moment though ;-)
msg112556 - (view) Author: Richard Jones (richard) * (Python committer) Date: 2010-08-03 06:39
Merged mock socket from test_smtpd.py and committed.
History
Date User Action Args
2022-04-11 14:56:32adminsetgithub: 46675
2010-08-03 06:39:59richardsetstatus: open -> closed
keywords: patch, patch
resolution: accepted
messages: + msg112556
2010-08-02 06:37:34richardsetkeywords: patch, patch
assignee: richard
messages: + msg112424
2010-07-31 23:17:17eric.araujosetkeywords: patch, patch
nosy: + richard
stage: commit review

versions: - Python 2.7
2009-05-16 19:38:31ajaksu2setversions: + Python 2.7, Python 3.2, - Python 2.6
nosy: + ajaksu2

messages: + msg87913

keywords: patch, patch
2008-03-19 14:51:50jerry.seuttersetkeywords: patch, patch
files: + mock_socket.py
2008-03-19 14:50:48jerry.seuttercreate