behaviour change with EmailMessage.set_content #85378
Copy link
Copy link
Closed
Labels
Description
| BPO | 41206 |
|---|---|
| Nosy | @warsaw, @doko42, @bitdancer, @ambv, @maxking, @tirkarthi, @ivyl |
| PRs |
Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.
Show more details
GitHub fields:
assignee = None
closed_at = <Date 2020-07-09.00:13:38.485>
created_at = <Date 2020-07-03.23:14:58.577>
labels = ['3.8', 'expert-email', 'release-blocker']
title = 'behaviour change with EmailMessage.set_content'
updated_at = <Date 2020-07-09.00:13:38.483>
user = 'https://bugs.python.org/bremner'bugs.python.org fields:
activity = <Date 2020-07-09.00:13:38.483>
actor = 'maxking'
assignee = 'none'
closed = True
closed_date = <Date 2020-07-09.00:13:38.485>
closer = 'maxking'
components = ['email']
creation = <Date 2020-07-03.23:14:58.577>
creator = 'bremner'
dependencies = []
files = []
hgrepos = []
issue_num = 41206
keywords = ['patch', '3.8regression', '3.9regression']
message_count = 10.0
messages = ['372971', '372979', '373080', '373099', '373101', '373110', '373113', '373115', '373248', '373361']
nosy_count = 8.0
nosy_names = ['barry', 'doko', 'r.david.murray', 'bremner', 'lukasz.langa', 'maxking', 'xtreak', 'ivyl']
pr_nums = ['21349']
priority = 'release blocker'
resolution = 'fixed'
stage = 'resolved'
status = 'closed'
superseder = None
type = None
url = 'https://bugs.python.org/issue41206'
versions = ['Python 3.8']Reactions are currently unavailable
Activity
bremner commentedon Jul 3, 2020
Works in 3.8.3, but not in 3.8.4rc1
Apparently now at least one newline is required.
tirkarthi commentedon Jul 4, 2020
This is caused due to c1f1ddf introduced as part of bpo-40597 which is reported back in the issue with https://bugs.python.org/msg370395
doko42 commentedon Jul 6, 2020
that's a regression for the 3.8 branch, marking as a release blocker for 3.8.4. This should be a documented change for 3.9, and probably reverted/fixed for 3.8.
ambv commentedon Jul 6, 2020
Good catch!
No need to revert anything. The raised ValueError is a relatively simple thing to fix. xtreak, mind making a follow-up PR to restore behavior with no \n characters?
tirkarthi commentedon Jul 6, 2020
Sure, I guess the fix would be to check for lines to be non-empty before doing a call to max and also convert the report as a test case?
tirkarthi commentedon Jul 6, 2020
There is a behavior change with my fix. 7bit is returned for Content-Transfer-Encoding before commit and skipping the heuristic if line is empty to avoid ValueError will return quoted-printable for Content-Transfer-Encoding. This is a behavior change even if the ValueError is fixed. I would like to confirm which is the correct behavior and to be documented appropriately.
Test Case in test_contentmanager.py :
ambv commentedon Jul 6, 2020
Yes.
tirkarthi commentedon Jul 6, 2020
Łukasz, There is already a PR open for this from May linking to original issue at #20542 . I missed it during triaging this issue. I guess someone needs to approve that PR and merge it to master to backport to 3.9 and 3.8 to fix the error.
bitdancer commentedon Jul 7, 2020
I'm short of time, if someone could approve Mark's PR and merge it it would be great. There wasn't supposed to be any behavior change other than the one documented in bpo-40597.
maxking commentedon Jul 9, 2020
I have merged #20542 and backported to 3.8 and 3.9 branches (#21404 & #21405).
Closing this issue.