Issue 26176: EmailMessage example doesn't work (original ) (raw )Created on 2016-01-22 01:58 by Srujan Chaitanya , last changed 2022-04-11 14:58 by admin . This issue is now closed .
Files
File name
Uploaded
Description
Edit
emailexample.patch
nharold,2016-05-31 18:50
fixes Address constructor usage
review
Messages (8)
msg258781 - (view)
Author: Srujan Chaitanya (Srujan Chaitanya)
Date: 2016-01-22 01:58
Example provided in 19.1.14.1. Examples using the Provisional API at https://docs.python.org/3.4/library/email-examples.html?highlight=email%20example Doesn't work. This could be a EmailMessage class issue also?
msg261650 - (view)
Author: HyeSoo Park (flyjwayur) *
Date: 2016-03-12 13:42
Could you please specify which example of the Provisional API among 2 examples of the documentation and how does it not work? Thank you
msg261664 - (view)
Author: Julien Palard (mdk) *
Date: 2016-03-12 21:36
Is this your bug: Traceback (most recent call last): File "/tmp/email_example.py", line 9, in with open(textfile) as fp: NameError: name 'textfile' is not defined ? If not, can you please provide us the full traceback ?
msg261690 - (view)
Author: Ezio Melotti (ezio.melotti) *
Date: 2016-03-13 09:55
#26426 has been marked as duplicate of this, and contains more information about the error.
msg266768 - (view)
Author: Nathan Harold (nharold) *
Date: 2016-05-31 18:50
emailexample.patch fixes the specific issue mentioned in #26426 : the Address constructor is now used as documented. It changes the final output of the two combined examples (as presented in the documentation) accordingly. In general it seems as though these examples (the two in in 19.1.14.1) were meant to be read, not run. To run them, the user would have to supply (1) their own roasted-asparagus.jpg, (2) their own local SMTP server, and (3) their own implementation of imaginary.magic_html_parser. However, the Address constructor usage issue was real, and I was able to generate the relevant output without (2) and (3).
msg266779 - (view)
Author: R. David Murray (r.david.murray) *
Date: 2016-05-31 21:03
Thank you for the patch. I blame the mistake on too great a familiarity with the old API :)
msg270114 - (view)
Author: Roundup Robot (python-dev)
Date: 2016-07-10 18:01
New changeset 1530fd9a7089 by R David Murray in branch '3.5': #26176 : fix usage of Address constructor in email examples. https://hg.python.org/cpython/rev/1530fd9a7089 New changeset a9c11fecd83b by R David Murray in branch 'default': Merge: #26176 : fix usage of Address constructor in email examples. https://hg.python.org/cpython/rev/a9c11fecd83b
msg270115 - (view)
Author: R. David Murray (r.david.murray) *
Date: 2016-07-10 18:02
Thanks, Nathan.
History
Date
User
Action
Args
2022-04-11 14:58:26
admin
set
github: 70364
2016-07-10 18:02:35
r.david.murray
set
status: open -> closedresolution: fixedmessages: + stage: commit review -> resolved
2016-07-10 18:01:12
python-dev
set
nosy: + python-dev messages: +
2016-05-31 21:04:09
r.david.murray
set
stage: needs patch -> commit review
2016-05-31 21:03:53
r.david.murray
set
nosy: + r.david.murray messages: +
2016-05-31 18:50:00
nharold
set
files: + emailexample.patch nosy: + nharold messages: + keywords: + patch
2016-03-13 09:55:40
ezio.melotti
set
versions: + Python 3.5, Python 3.6, - Python 3.4nosy: + ezio.melotti messages: + stage: needs patch
2016-03-12 21:36:07
mdk
set
nosy: + mdk messages: +
2016-03-12 13:42:49
flyjwayur
set
nosy: + flyjwayur messages: +
2016-02-29 22:26:03
maciej.szulik
set
nosy: + maciej.szulik
2016-02-24 13:54:05
barry
set
nosy: + barry
2016-02-24 13:45:47
berker.peksag
link
issue26426 superseder
2016-01-22 01:58:36
Srujan Chaitanya
create