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.

Author Alex Corcoles
Recipients Alex Corcoles, barry, r.david.murray, xtreak
Date 2018-10-11.07:59:16
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1539244757.02.0.788709270274.issue34954@psf.upfronthosting.co.za>
In-reply-to
Content
Well, I think that having to choose the "HTTP" policy to get a message subject's without newlines goes against the expectations of anyone who is not well knowledgeable of email.

It's not very easy to deduct that, out of all the available policies, HTTP is the one that has this effect (or writing your own).

It's not obvious that a subject can have newlines, as I don't think I've ever seen a MUA that does not hide them.

You can be bitten quite easily by that (we have, more than once).

It's the stdlib's maintainers' prerrogative to decide that they are going to provide low-level libraries (and in general, I agree with that, high-level stdlibs have a lot of problems), but at least I'd include some warning like:

"Email is an old and annoying protocol, and parsing email is full of annoyances and exceptions. email provides low-level building blocks to handle email in detail. If you want high-level processing we advise you to look at libraries that build on it".

In any case, email.policy provides more hints as to headers being wordwrapped, and while it's not ideal, it certainly is an improvement WRT to Python 2, so this bug has helped me and I hope maybe someone will read it when Googling for the same problem, so while I think some more could be done, if you close this I won't complain.

Thanks,

Álex
History
Date User Action Args
2018-10-11 07:59:17Alex Corcolessetrecipients: + Alex Corcoles, barry, r.david.murray, xtreak
2018-10-11 07:59:17Alex Corcolessetmessageid: <1539244757.02.0.788709270274.issue34954@psf.upfronthosting.co.za>
2018-10-11 07:59:17Alex Corcoleslinkissue34954 messages
2018-10-11 07:59:16Alex Corcolescreate