Issue 12448: smtplib's main doesn't flush when prompting (original ) (raw )Created on 2011-06-30 06:20 by anacrolix , last changed 2022-04-11 14:57 by admin . This issue is now closed .
Messages (6)
msg139461 - (view)
Author: Matt Joiner (anacrolix)
Date: 2011-06-30 06:20
The smptlib module's __main__ doesn't flush stdout when prompting: sys.stdout.write(prompt + ": ") return sys.stdin.readline().strip() stdout is usually line buffered, and so running python3 smptlib.py doesn't actually prompt the user. The line `sys.stdout.flush()` needs to be added.
msg139699 - (view)
Author: Petri Lehtinen (petri.lehtinen) *
Date: 2011-07-03 20:05
Behaves incorrectly for me, too. Attached a patch with the suggested fix.
msg141063 - (view)
Author: Raymond Hettinger (rhettinger) *
Date: 2011-07-24 23:24
Looks good. Thx.
msg145787 - (view)
Author: Petri Lehtinen (petri.lehtinen) *
Date: 2011-10-18 08:54
Raymond: Would you also like to commit the patch? :)
msg145793 - (view)
Author: Roundup Robot (python-dev)
Date: 2011-10-18 10:27
New changeset 2c50343d0500 by Ezio Melotti in branch '3.2': #12448 : smtplib now flushes stdout while running ``python -m smtplib`` http://hg.python.org/cpython/rev/2c50343d0500 New changeset e08397a5537a by Ezio Melotti in branch 'default': #12448 : merge with 3.2. http://hg.python.org/cpython/rev/e08397a5537a
msg145794 - (view)
Author: Ezio Melotti (ezio.melotti) *
Date: 2011-10-18 10:29
Fixed, thanks for the patch!
History
Date
User
Action
Args
2022-04-11 14:57:19
admin
set
github: 56657
2011-10-18 10:29:29
ezio.melotti
set
status: open -> closedassignee: rhettinger -> ezio.melotti versions: + Python 3.3nosy: + ezio.melotti messages: + resolution: fixedstage: patch review -> resolved
2011-10-18 10:27:02
python-dev
set
nosy: + python-dev messages: +
2011-10-18 08:54:36
petri.lehtinen
set
keywords: - needs review messages: +
2011-07-24 23:24:32
rhettinger
set
assignee: rhettinger messages: + nosy: + rhettinger
2011-07-24 19:44:25
petri.lehtinen
set
stage: patch review
2011-07-03 20:05:25
petri.lehtinen
set
files: + smtplib_main_prompt.patch nosy: + petri.lehtinen messages: + keywords: + patch , needs review
2011-06-30 14:10:35
r.david.murray
set
nosy: + r.david.murray
2011-06-30 06:20:26
anacrolix
create